| /** |
| * Autogenerated by Thrift Compiler (0.9.3) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.sentry.api.service.thrift; |
| |
| import org.apache.thrift.scheme.IScheme; |
| import org.apache.thrift.scheme.SchemeFactory; |
| import org.apache.thrift.scheme.StandardScheme; |
| |
| import org.apache.thrift.scheme.TupleScheme; |
| import org.apache.thrift.protocol.TTupleProtocol; |
| import org.apache.thrift.protocol.TProtocolException; |
| import org.apache.thrift.EncodingUtils; |
| import org.apache.thrift.TException; |
| import org.apache.thrift.async.AsyncMethodCallback; |
| import org.apache.thrift.server.AbstractNonblockingServer.*; |
| import java.util.List; |
| import java.util.ArrayList; |
| import java.util.Map; |
| import java.util.HashMap; |
| import java.util.EnumMap; |
| import java.util.Set; |
| import java.util.HashSet; |
| import java.util.EnumSet; |
| import java.util.Collections; |
| import java.util.BitSet; |
| import java.nio.ByteBuffer; |
| import java.util.Arrays; |
| import javax.annotation.Generated; |
| import org.slf4j.Logger; |
| import org.slf4j.LoggerFactory; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) |
| @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") |
| public class SentryPolicyService { |
| |
| public interface Iface { |
| |
| public TCreateSentryRoleResponse create_sentry_role(TCreateSentryRoleRequest request) throws org.apache.thrift.TException; |
| |
| public TDropSentryRoleResponse drop_sentry_role(TDropSentryRoleRequest request) throws org.apache.thrift.TException; |
| |
| public TAlterSentryRoleGrantPrivilegeResponse alter_sentry_role_grant_privilege(TAlterSentryRoleGrantPrivilegeRequest request) throws org.apache.thrift.TException; |
| |
| public TAlterSentryRoleRevokePrivilegeResponse alter_sentry_role_revoke_privilege(TAlterSentryRoleRevokePrivilegeRequest request) throws org.apache.thrift.TException; |
| |
| public TAlterSentryRoleAddGroupsResponse alter_sentry_role_add_groups(TAlterSentryRoleAddGroupsRequest request) throws org.apache.thrift.TException; |
| |
| public TAlterSentryRoleDeleteGroupsResponse alter_sentry_role_delete_groups(TAlterSentryRoleDeleteGroupsRequest request) throws org.apache.thrift.TException; |
| |
| public TAlterSentryRoleAddUsersResponse alter_sentry_role_add_users(TAlterSentryRoleAddUsersRequest request) throws org.apache.thrift.TException; |
| |
| public TAlterSentryRoleDeleteUsersResponse alter_sentry_role_delete_users(TAlterSentryRoleDeleteUsersRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryRolesResponse list_sentry_roles_by_group(TListSentryRolesRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryRolesResponse list_sentry_roles_by_user(TListSentryRolesForUserRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryPrivilegesResponse list_sentry_privileges_by_role(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryPrivilegesResponse list_sentry_privileges_by_user(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryPrivilegesResponse list_sentry_privileges_by_user_and_itsgroups(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryPrivilegesForProviderResponse list_sentry_privileges_for_provider(TListSentryPrivilegesForProviderRequest request) throws org.apache.thrift.TException; |
| |
| public TDropPrivilegesResponse drop_sentry_privilege(TDropPrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| public TRenamePrivilegesResponse rename_sentry_privilege(TRenamePrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| public TListSentryPrivilegesByAuthResponse list_sentry_privileges_by_authorizable(TListSentryPrivilegesByAuthRequest request) throws org.apache.thrift.TException; |
| |
| public TSentryConfigValueResponse get_sentry_config_value(TSentryConfigValueRequest request) throws org.apache.thrift.TException; |
| |
| public TSentryExportMappingDataResponse export_sentry_mapping_data(TSentryExportMappingDataRequest request) throws org.apache.thrift.TException; |
| |
| public TSentryImportMappingDataResponse import_sentry_mapping_data(TSentryImportMappingDataRequest request) throws org.apache.thrift.TException; |
| |
| public TSentrySyncIDResponse sentry_sync_notifications(TSentrySyncIDRequest request) throws org.apache.thrift.TException; |
| |
| public TSentryHmsEventNotificationResponse sentry_notify_hms_event(TSentryHmsEventNotification request) throws org.apache.thrift.TException; |
| |
| public TSentryPrivilegesResponse list_roles_privileges(TSentryPrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| public TSentryPrivilegesResponse list_users_privileges(TSentryPrivilegesRequest request) throws org.apache.thrift.TException; |
| |
| } |
| |
| public interface AsyncIface { |
| |
| public void create_sentry_role(TCreateSentryRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void drop_sentry_role(TDropSentryRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void alter_sentry_role_grant_privilege(TAlterSentryRoleGrantPrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void alter_sentry_role_revoke_privilege(TAlterSentryRoleRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void alter_sentry_role_add_groups(TAlterSentryRoleAddGroupsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void alter_sentry_role_delete_groups(TAlterSentryRoleDeleteGroupsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void alter_sentry_role_add_users(TAlterSentryRoleAddUsersRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void alter_sentry_role_delete_users(TAlterSentryRoleDeleteUsersRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_roles_by_group(TListSentryRolesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_roles_by_user(TListSentryRolesForUserRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_privileges_by_role(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_privileges_by_user(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_privileges_by_user_and_itsgroups(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_privileges_for_provider(TListSentryPrivilegesForProviderRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void drop_sentry_privilege(TDropPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void rename_sentry_privilege(TRenamePrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_sentry_privileges_by_authorizable(TListSentryPrivilegesByAuthRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void get_sentry_config_value(TSentryConfigValueRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void export_sentry_mapping_data(TSentryExportMappingDataRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void import_sentry_mapping_data(TSentryImportMappingDataRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void sentry_sync_notifications(TSentrySyncIDRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void sentry_notify_hms_event(TSentryHmsEventNotification request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_roles_privileges(TSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void list_users_privileges(TSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| } |
| |
| public static class Client extends org.apache.thrift.TServiceClient implements Iface { |
| public static class Factory implements org.apache.thrift.TServiceClientFactory<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 TCreateSentryRoleResponse create_sentry_role(TCreateSentryRoleRequest request) throws org.apache.thrift.TException |
| { |
| send_create_sentry_role(request); |
| return recv_create_sentry_role(); |
| } |
| |
| public void send_create_sentry_role(TCreateSentryRoleRequest request) throws org.apache.thrift.TException |
| { |
| create_sentry_role_args args = new create_sentry_role_args(); |
| args.setRequest(request); |
| sendBase("create_sentry_role", args); |
| } |
| |
| public TCreateSentryRoleResponse recv_create_sentry_role() throws org.apache.thrift.TException |
| { |
| create_sentry_role_result result = new create_sentry_role_result(); |
| receiveBase(result, "create_sentry_role"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_sentry_role failed: unknown result"); |
| } |
| |
| public TDropSentryRoleResponse drop_sentry_role(TDropSentryRoleRequest request) throws org.apache.thrift.TException |
| { |
| send_drop_sentry_role(request); |
| return recv_drop_sentry_role(); |
| } |
| |
| public void send_drop_sentry_role(TDropSentryRoleRequest request) throws org.apache.thrift.TException |
| { |
| drop_sentry_role_args args = new drop_sentry_role_args(); |
| args.setRequest(request); |
| sendBase("drop_sentry_role", args); |
| } |
| |
| public TDropSentryRoleResponse recv_drop_sentry_role() throws org.apache.thrift.TException |
| { |
| drop_sentry_role_result result = new drop_sentry_role_result(); |
| receiveBase(result, "drop_sentry_role"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_sentry_role failed: unknown result"); |
| } |
| |
| public TAlterSentryRoleGrantPrivilegeResponse alter_sentry_role_grant_privilege(TAlterSentryRoleGrantPrivilegeRequest request) throws org.apache.thrift.TException |
| { |
| send_alter_sentry_role_grant_privilege(request); |
| return recv_alter_sentry_role_grant_privilege(); |
| } |
| |
| public void send_alter_sentry_role_grant_privilege(TAlterSentryRoleGrantPrivilegeRequest request) throws org.apache.thrift.TException |
| { |
| alter_sentry_role_grant_privilege_args args = new alter_sentry_role_grant_privilege_args(); |
| args.setRequest(request); |
| sendBase("alter_sentry_role_grant_privilege", args); |
| } |
| |
| public TAlterSentryRoleGrantPrivilegeResponse recv_alter_sentry_role_grant_privilege() throws org.apache.thrift.TException |
| { |
| alter_sentry_role_grant_privilege_result result = new alter_sentry_role_grant_privilege_result(); |
| receiveBase(result, "alter_sentry_role_grant_privilege"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_sentry_role_grant_privilege failed: unknown result"); |
| } |
| |
| public TAlterSentryRoleRevokePrivilegeResponse alter_sentry_role_revoke_privilege(TAlterSentryRoleRevokePrivilegeRequest request) throws org.apache.thrift.TException |
| { |
| send_alter_sentry_role_revoke_privilege(request); |
| return recv_alter_sentry_role_revoke_privilege(); |
| } |
| |
| public void send_alter_sentry_role_revoke_privilege(TAlterSentryRoleRevokePrivilegeRequest request) throws org.apache.thrift.TException |
| { |
| alter_sentry_role_revoke_privilege_args args = new alter_sentry_role_revoke_privilege_args(); |
| args.setRequest(request); |
| sendBase("alter_sentry_role_revoke_privilege", args); |
| } |
| |
| public TAlterSentryRoleRevokePrivilegeResponse recv_alter_sentry_role_revoke_privilege() throws org.apache.thrift.TException |
| { |
| alter_sentry_role_revoke_privilege_result result = new alter_sentry_role_revoke_privilege_result(); |
| receiveBase(result, "alter_sentry_role_revoke_privilege"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_sentry_role_revoke_privilege failed: unknown result"); |
| } |
| |
| public TAlterSentryRoleAddGroupsResponse alter_sentry_role_add_groups(TAlterSentryRoleAddGroupsRequest request) throws org.apache.thrift.TException |
| { |
| send_alter_sentry_role_add_groups(request); |
| return recv_alter_sentry_role_add_groups(); |
| } |
| |
| public void send_alter_sentry_role_add_groups(TAlterSentryRoleAddGroupsRequest request) throws org.apache.thrift.TException |
| { |
| alter_sentry_role_add_groups_args args = new alter_sentry_role_add_groups_args(); |
| args.setRequest(request); |
| sendBase("alter_sentry_role_add_groups", args); |
| } |
| |
| public TAlterSentryRoleAddGroupsResponse recv_alter_sentry_role_add_groups() throws org.apache.thrift.TException |
| { |
| alter_sentry_role_add_groups_result result = new alter_sentry_role_add_groups_result(); |
| receiveBase(result, "alter_sentry_role_add_groups"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_sentry_role_add_groups failed: unknown result"); |
| } |
| |
| public TAlterSentryRoleDeleteGroupsResponse alter_sentry_role_delete_groups(TAlterSentryRoleDeleteGroupsRequest request) throws org.apache.thrift.TException |
| { |
| send_alter_sentry_role_delete_groups(request); |
| return recv_alter_sentry_role_delete_groups(); |
| } |
| |
| public void send_alter_sentry_role_delete_groups(TAlterSentryRoleDeleteGroupsRequest request) throws org.apache.thrift.TException |
| { |
| alter_sentry_role_delete_groups_args args = new alter_sentry_role_delete_groups_args(); |
| args.setRequest(request); |
| sendBase("alter_sentry_role_delete_groups", args); |
| } |
| |
| public TAlterSentryRoleDeleteGroupsResponse recv_alter_sentry_role_delete_groups() throws org.apache.thrift.TException |
| { |
| alter_sentry_role_delete_groups_result result = new alter_sentry_role_delete_groups_result(); |
| receiveBase(result, "alter_sentry_role_delete_groups"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_sentry_role_delete_groups failed: unknown result"); |
| } |
| |
| public TAlterSentryRoleAddUsersResponse alter_sentry_role_add_users(TAlterSentryRoleAddUsersRequest request) throws org.apache.thrift.TException |
| { |
| send_alter_sentry_role_add_users(request); |
| return recv_alter_sentry_role_add_users(); |
| } |
| |
| public void send_alter_sentry_role_add_users(TAlterSentryRoleAddUsersRequest request) throws org.apache.thrift.TException |
| { |
| alter_sentry_role_add_users_args args = new alter_sentry_role_add_users_args(); |
| args.setRequest(request); |
| sendBase("alter_sentry_role_add_users", args); |
| } |
| |
| public TAlterSentryRoleAddUsersResponse recv_alter_sentry_role_add_users() throws org.apache.thrift.TException |
| { |
| alter_sentry_role_add_users_result result = new alter_sentry_role_add_users_result(); |
| receiveBase(result, "alter_sentry_role_add_users"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_sentry_role_add_users failed: unknown result"); |
| } |
| |
| public TAlterSentryRoleDeleteUsersResponse alter_sentry_role_delete_users(TAlterSentryRoleDeleteUsersRequest request) throws org.apache.thrift.TException |
| { |
| send_alter_sentry_role_delete_users(request); |
| return recv_alter_sentry_role_delete_users(); |
| } |
| |
| public void send_alter_sentry_role_delete_users(TAlterSentryRoleDeleteUsersRequest request) throws org.apache.thrift.TException |
| { |
| alter_sentry_role_delete_users_args args = new alter_sentry_role_delete_users_args(); |
| args.setRequest(request); |
| sendBase("alter_sentry_role_delete_users", args); |
| } |
| |
| public TAlterSentryRoleDeleteUsersResponse recv_alter_sentry_role_delete_users() throws org.apache.thrift.TException |
| { |
| alter_sentry_role_delete_users_result result = new alter_sentry_role_delete_users_result(); |
| receiveBase(result, "alter_sentry_role_delete_users"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_sentry_role_delete_users failed: unknown result"); |
| } |
| |
| public TListSentryRolesResponse list_sentry_roles_by_group(TListSentryRolesRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_roles_by_group(request); |
| return recv_list_sentry_roles_by_group(); |
| } |
| |
| public void send_list_sentry_roles_by_group(TListSentryRolesRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_roles_by_group_args args = new list_sentry_roles_by_group_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_roles_by_group", args); |
| } |
| |
| public TListSentryRolesResponse recv_list_sentry_roles_by_group() throws org.apache.thrift.TException |
| { |
| list_sentry_roles_by_group_result result = new list_sentry_roles_by_group_result(); |
| receiveBase(result, "list_sentry_roles_by_group"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_roles_by_group failed: unknown result"); |
| } |
| |
| public TListSentryRolesResponse list_sentry_roles_by_user(TListSentryRolesForUserRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_roles_by_user(request); |
| return recv_list_sentry_roles_by_user(); |
| } |
| |
| public void send_list_sentry_roles_by_user(TListSentryRolesForUserRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_roles_by_user_args args = new list_sentry_roles_by_user_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_roles_by_user", args); |
| } |
| |
| public TListSentryRolesResponse recv_list_sentry_roles_by_user() throws org.apache.thrift.TException |
| { |
| list_sentry_roles_by_user_result result = new list_sentry_roles_by_user_result(); |
| receiveBase(result, "list_sentry_roles_by_user"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_roles_by_user failed: unknown result"); |
| } |
| |
| public TListSentryPrivilegesResponse list_sentry_privileges_by_role(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_privileges_by_role(request); |
| return recv_list_sentry_privileges_by_role(); |
| } |
| |
| public void send_list_sentry_privileges_by_role(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_role_args args = new list_sentry_privileges_by_role_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_privileges_by_role", args); |
| } |
| |
| public TListSentryPrivilegesResponse recv_list_sentry_privileges_by_role() throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_role_result result = new list_sentry_privileges_by_role_result(); |
| receiveBase(result, "list_sentry_privileges_by_role"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_role failed: unknown result"); |
| } |
| |
| public TListSentryPrivilegesResponse list_sentry_privileges_by_user(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_privileges_by_user(request); |
| return recv_list_sentry_privileges_by_user(); |
| } |
| |
| public void send_list_sentry_privileges_by_user(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_user_args args = new list_sentry_privileges_by_user_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_privileges_by_user", args); |
| } |
| |
| public TListSentryPrivilegesResponse recv_list_sentry_privileges_by_user() throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_user_result result = new list_sentry_privileges_by_user_result(); |
| receiveBase(result, "list_sentry_privileges_by_user"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_user failed: unknown result"); |
| } |
| |
| public TListSentryPrivilegesResponse list_sentry_privileges_by_user_and_itsgroups(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_privileges_by_user_and_itsgroups(request); |
| return recv_list_sentry_privileges_by_user_and_itsgroups(); |
| } |
| |
| public void send_list_sentry_privileges_by_user_and_itsgroups(TListSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_user_and_itsgroups_args args = new list_sentry_privileges_by_user_and_itsgroups_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_privileges_by_user_and_itsgroups", args); |
| } |
| |
| public TListSentryPrivilegesResponse recv_list_sentry_privileges_by_user_and_itsgroups() throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_user_and_itsgroups_result result = new list_sentry_privileges_by_user_and_itsgroups_result(); |
| receiveBase(result, "list_sentry_privileges_by_user_and_itsgroups"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_user_and_itsgroups failed: unknown result"); |
| } |
| |
| public TListSentryPrivilegesForProviderResponse list_sentry_privileges_for_provider(TListSentryPrivilegesForProviderRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_privileges_for_provider(request); |
| return recv_list_sentry_privileges_for_provider(); |
| } |
| |
| public void send_list_sentry_privileges_for_provider(TListSentryPrivilegesForProviderRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_for_provider_args args = new list_sentry_privileges_for_provider_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_privileges_for_provider", args); |
| } |
| |
| public TListSentryPrivilegesForProviderResponse recv_list_sentry_privileges_for_provider() throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_for_provider_result result = new list_sentry_privileges_for_provider_result(); |
| receiveBase(result, "list_sentry_privileges_for_provider"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_privileges_for_provider failed: unknown result"); |
| } |
| |
| public TDropPrivilegesResponse drop_sentry_privilege(TDropPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_drop_sentry_privilege(request); |
| return recv_drop_sentry_privilege(); |
| } |
| |
| public void send_drop_sentry_privilege(TDropPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| drop_sentry_privilege_args args = new drop_sentry_privilege_args(); |
| args.setRequest(request); |
| sendBase("drop_sentry_privilege", args); |
| } |
| |
| public TDropPrivilegesResponse recv_drop_sentry_privilege() throws org.apache.thrift.TException |
| { |
| drop_sentry_privilege_result result = new drop_sentry_privilege_result(); |
| receiveBase(result, "drop_sentry_privilege"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_sentry_privilege failed: unknown result"); |
| } |
| |
| public TRenamePrivilegesResponse rename_sentry_privilege(TRenamePrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_rename_sentry_privilege(request); |
| return recv_rename_sentry_privilege(); |
| } |
| |
| public void send_rename_sentry_privilege(TRenamePrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| rename_sentry_privilege_args args = new rename_sentry_privilege_args(); |
| args.setRequest(request); |
| sendBase("rename_sentry_privilege", args); |
| } |
| |
| public TRenamePrivilegesResponse recv_rename_sentry_privilege() throws org.apache.thrift.TException |
| { |
| rename_sentry_privilege_result result = new rename_sentry_privilege_result(); |
| receiveBase(result, "rename_sentry_privilege"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "rename_sentry_privilege failed: unknown result"); |
| } |
| |
| public TListSentryPrivilegesByAuthResponse list_sentry_privileges_by_authorizable(TListSentryPrivilegesByAuthRequest request) throws org.apache.thrift.TException |
| { |
| send_list_sentry_privileges_by_authorizable(request); |
| return recv_list_sentry_privileges_by_authorizable(); |
| } |
| |
| public void send_list_sentry_privileges_by_authorizable(TListSentryPrivilegesByAuthRequest request) throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_authorizable_args args = new list_sentry_privileges_by_authorizable_args(); |
| args.setRequest(request); |
| sendBase("list_sentry_privileges_by_authorizable", args); |
| } |
| |
| public TListSentryPrivilegesByAuthResponse recv_list_sentry_privileges_by_authorizable() throws org.apache.thrift.TException |
| { |
| list_sentry_privileges_by_authorizable_result result = new list_sentry_privileges_by_authorizable_result(); |
| receiveBase(result, "list_sentry_privileges_by_authorizable"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_authorizable failed: unknown result"); |
| } |
| |
| public TSentryConfigValueResponse get_sentry_config_value(TSentryConfigValueRequest request) throws org.apache.thrift.TException |
| { |
| send_get_sentry_config_value(request); |
| return recv_get_sentry_config_value(); |
| } |
| |
| public void send_get_sentry_config_value(TSentryConfigValueRequest request) throws org.apache.thrift.TException |
| { |
| get_sentry_config_value_args args = new get_sentry_config_value_args(); |
| args.setRequest(request); |
| sendBase("get_sentry_config_value", args); |
| } |
| |
| public TSentryConfigValueResponse recv_get_sentry_config_value() throws org.apache.thrift.TException |
| { |
| get_sentry_config_value_result result = new get_sentry_config_value_result(); |
| receiveBase(result, "get_sentry_config_value"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_sentry_config_value failed: unknown result"); |
| } |
| |
| public TSentryExportMappingDataResponse export_sentry_mapping_data(TSentryExportMappingDataRequest request) throws org.apache.thrift.TException |
| { |
| send_export_sentry_mapping_data(request); |
| return recv_export_sentry_mapping_data(); |
| } |
| |
| public void send_export_sentry_mapping_data(TSentryExportMappingDataRequest request) throws org.apache.thrift.TException |
| { |
| export_sentry_mapping_data_args args = new export_sentry_mapping_data_args(); |
| args.setRequest(request); |
| sendBase("export_sentry_mapping_data", args); |
| } |
| |
| public TSentryExportMappingDataResponse recv_export_sentry_mapping_data() throws org.apache.thrift.TException |
| { |
| export_sentry_mapping_data_result result = new export_sentry_mapping_data_result(); |
| receiveBase(result, "export_sentry_mapping_data"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "export_sentry_mapping_data failed: unknown result"); |
| } |
| |
| public TSentryImportMappingDataResponse import_sentry_mapping_data(TSentryImportMappingDataRequest request) throws org.apache.thrift.TException |
| { |
| send_import_sentry_mapping_data(request); |
| return recv_import_sentry_mapping_data(); |
| } |
| |
| public void send_import_sentry_mapping_data(TSentryImportMappingDataRequest request) throws org.apache.thrift.TException |
| { |
| import_sentry_mapping_data_args args = new import_sentry_mapping_data_args(); |
| args.setRequest(request); |
| sendBase("import_sentry_mapping_data", args); |
| } |
| |
| public TSentryImportMappingDataResponse recv_import_sentry_mapping_data() throws org.apache.thrift.TException |
| { |
| import_sentry_mapping_data_result result = new import_sentry_mapping_data_result(); |
| receiveBase(result, "import_sentry_mapping_data"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "import_sentry_mapping_data failed: unknown result"); |
| } |
| |
| public TSentrySyncIDResponse sentry_sync_notifications(TSentrySyncIDRequest request) throws org.apache.thrift.TException |
| { |
| send_sentry_sync_notifications(request); |
| return recv_sentry_sync_notifications(); |
| } |
| |
| public void send_sentry_sync_notifications(TSentrySyncIDRequest request) throws org.apache.thrift.TException |
| { |
| sentry_sync_notifications_args args = new sentry_sync_notifications_args(); |
| args.setRequest(request); |
| sendBase("sentry_sync_notifications", args); |
| } |
| |
| public TSentrySyncIDResponse recv_sentry_sync_notifications() throws org.apache.thrift.TException |
| { |
| sentry_sync_notifications_result result = new sentry_sync_notifications_result(); |
| receiveBase(result, "sentry_sync_notifications"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sentry_sync_notifications failed: unknown result"); |
| } |
| |
| public TSentryHmsEventNotificationResponse sentry_notify_hms_event(TSentryHmsEventNotification request) throws org.apache.thrift.TException |
| { |
| send_sentry_notify_hms_event(request); |
| return recv_sentry_notify_hms_event(); |
| } |
| |
| public void send_sentry_notify_hms_event(TSentryHmsEventNotification request) throws org.apache.thrift.TException |
| { |
| sentry_notify_hms_event_args args = new sentry_notify_hms_event_args(); |
| args.setRequest(request); |
| sendBase("sentry_notify_hms_event", args); |
| } |
| |
| public TSentryHmsEventNotificationResponse recv_sentry_notify_hms_event() throws org.apache.thrift.TException |
| { |
| sentry_notify_hms_event_result result = new sentry_notify_hms_event_result(); |
| receiveBase(result, "sentry_notify_hms_event"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sentry_notify_hms_event failed: unknown result"); |
| } |
| |
| public TSentryPrivilegesResponse list_roles_privileges(TSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_list_roles_privileges(request); |
| return recv_list_roles_privileges(); |
| } |
| |
| public void send_list_roles_privileges(TSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| list_roles_privileges_args args = new list_roles_privileges_args(); |
| args.setRequest(request); |
| sendBase("list_roles_privileges", args); |
| } |
| |
| public TSentryPrivilegesResponse recv_list_roles_privileges() throws org.apache.thrift.TException |
| { |
| list_roles_privileges_result result = new list_roles_privileges_result(); |
| receiveBase(result, "list_roles_privileges"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_roles_privileges failed: unknown result"); |
| } |
| |
| public TSentryPrivilegesResponse list_users_privileges(TSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| send_list_users_privileges(request); |
| return recv_list_users_privileges(); |
| } |
| |
| public void send_list_users_privileges(TSentryPrivilegesRequest request) throws org.apache.thrift.TException |
| { |
| list_users_privileges_args args = new list_users_privileges_args(); |
| args.setRequest(request); |
| sendBase("list_users_privileges", args); |
| } |
| |
| public TSentryPrivilegesResponse recv_list_users_privileges() throws org.apache.thrift.TException |
| { |
| list_users_privileges_result result = new list_users_privileges_result(); |
| receiveBase(result, "list_users_privileges"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_users_privileges failed: unknown result"); |
| } |
| |
| } |
| public static class AsyncClient extends org.apache.thrift.async.TAsyncClient 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_sentry_role(TCreateSentryRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| create_sentry_role_call method_call = new create_sentry_role_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class create_sentry_role_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TCreateSentryRoleRequest request; |
| public create_sentry_role_call(TCreateSentryRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_sentry_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| create_sentry_role_args args = new create_sentry_role_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TCreateSentryRoleResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_create_sentry_role(); |
| } |
| } |
| |
| public void drop_sentry_role(TDropSentryRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| drop_sentry_role_call method_call = new drop_sentry_role_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class drop_sentry_role_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TDropSentryRoleRequest request; |
| public drop_sentry_role_call(TDropSentryRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_sentry_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| drop_sentry_role_args args = new drop_sentry_role_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TDropSentryRoleResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_drop_sentry_role(); |
| } |
| } |
| |
| public void alter_sentry_role_grant_privilege(TAlterSentryRoleGrantPrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| alter_sentry_role_grant_privilege_call method_call = new alter_sentry_role_grant_privilege_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class alter_sentry_role_grant_privilege_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TAlterSentryRoleGrantPrivilegeRequest request; |
| public alter_sentry_role_grant_privilege_call(TAlterSentryRoleGrantPrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_sentry_role_grant_privilege", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| alter_sentry_role_grant_privilege_args args = new alter_sentry_role_grant_privilege_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TAlterSentryRoleGrantPrivilegeResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_alter_sentry_role_grant_privilege(); |
| } |
| } |
| |
| public void alter_sentry_role_revoke_privilege(TAlterSentryRoleRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| alter_sentry_role_revoke_privilege_call method_call = new alter_sentry_role_revoke_privilege_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class alter_sentry_role_revoke_privilege_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TAlterSentryRoleRevokePrivilegeRequest request; |
| public alter_sentry_role_revoke_privilege_call(TAlterSentryRoleRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_sentry_role_revoke_privilege", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| alter_sentry_role_revoke_privilege_args args = new alter_sentry_role_revoke_privilege_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TAlterSentryRoleRevokePrivilegeResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_alter_sentry_role_revoke_privilege(); |
| } |
| } |
| |
| public void alter_sentry_role_add_groups(TAlterSentryRoleAddGroupsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| alter_sentry_role_add_groups_call method_call = new alter_sentry_role_add_groups_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class alter_sentry_role_add_groups_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TAlterSentryRoleAddGroupsRequest request; |
| public alter_sentry_role_add_groups_call(TAlterSentryRoleAddGroupsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_sentry_role_add_groups", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| alter_sentry_role_add_groups_args args = new alter_sentry_role_add_groups_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TAlterSentryRoleAddGroupsResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_alter_sentry_role_add_groups(); |
| } |
| } |
| |
| public void alter_sentry_role_delete_groups(TAlterSentryRoleDeleteGroupsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| alter_sentry_role_delete_groups_call method_call = new alter_sentry_role_delete_groups_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class alter_sentry_role_delete_groups_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TAlterSentryRoleDeleteGroupsRequest request; |
| public alter_sentry_role_delete_groups_call(TAlterSentryRoleDeleteGroupsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_sentry_role_delete_groups", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| alter_sentry_role_delete_groups_args args = new alter_sentry_role_delete_groups_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TAlterSentryRoleDeleteGroupsResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_alter_sentry_role_delete_groups(); |
| } |
| } |
| |
| public void alter_sentry_role_add_users(TAlterSentryRoleAddUsersRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| alter_sentry_role_add_users_call method_call = new alter_sentry_role_add_users_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class alter_sentry_role_add_users_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TAlterSentryRoleAddUsersRequest request; |
| public alter_sentry_role_add_users_call(TAlterSentryRoleAddUsersRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_sentry_role_add_users", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| alter_sentry_role_add_users_args args = new alter_sentry_role_add_users_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TAlterSentryRoleAddUsersResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_alter_sentry_role_add_users(); |
| } |
| } |
| |
| public void alter_sentry_role_delete_users(TAlterSentryRoleDeleteUsersRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| alter_sentry_role_delete_users_call method_call = new alter_sentry_role_delete_users_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class alter_sentry_role_delete_users_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TAlterSentryRoleDeleteUsersRequest request; |
| public alter_sentry_role_delete_users_call(TAlterSentryRoleDeleteUsersRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_sentry_role_delete_users", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| alter_sentry_role_delete_users_args args = new alter_sentry_role_delete_users_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TAlterSentryRoleDeleteUsersResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_alter_sentry_role_delete_users(); |
| } |
| } |
| |
| public void list_sentry_roles_by_group(TListSentryRolesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_roles_by_group_call method_call = new list_sentry_roles_by_group_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_roles_by_group_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryRolesRequest request; |
| public list_sentry_roles_by_group_call(TListSentryRolesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_roles_by_group", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_roles_by_group_args args = new list_sentry_roles_by_group_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryRolesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_roles_by_group(); |
| } |
| } |
| |
| public void list_sentry_roles_by_user(TListSentryRolesForUserRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_roles_by_user_call method_call = new list_sentry_roles_by_user_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_roles_by_user_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryRolesForUserRequest request; |
| public list_sentry_roles_by_user_call(TListSentryRolesForUserRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_roles_by_user", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_roles_by_user_args args = new list_sentry_roles_by_user_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryRolesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_roles_by_user(); |
| } |
| } |
| |
| public void list_sentry_privileges_by_role(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_privileges_by_role_call method_call = new list_sentry_privileges_by_role_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_privileges_by_role_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryPrivilegesRequest request; |
| public list_sentry_privileges_by_role_call(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_privileges_by_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_privileges_by_role_args args = new list_sentry_privileges_by_role_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryPrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_privileges_by_role(); |
| } |
| } |
| |
| public void list_sentry_privileges_by_user(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_privileges_by_user_call method_call = new list_sentry_privileges_by_user_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_privileges_by_user_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryPrivilegesRequest request; |
| public list_sentry_privileges_by_user_call(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_privileges_by_user", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_privileges_by_user_args args = new list_sentry_privileges_by_user_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryPrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_privileges_by_user(); |
| } |
| } |
| |
| public void list_sentry_privileges_by_user_and_itsgroups(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_privileges_by_user_and_itsgroups_call method_call = new list_sentry_privileges_by_user_and_itsgroups_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_privileges_by_user_and_itsgroups_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryPrivilegesRequest request; |
| public list_sentry_privileges_by_user_and_itsgroups_call(TListSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_privileges_by_user_and_itsgroups", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_privileges_by_user_and_itsgroups_args args = new list_sentry_privileges_by_user_and_itsgroups_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryPrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_privileges_by_user_and_itsgroups(); |
| } |
| } |
| |
| public void list_sentry_privileges_for_provider(TListSentryPrivilegesForProviderRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_privileges_for_provider_call method_call = new list_sentry_privileges_for_provider_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_privileges_for_provider_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryPrivilegesForProviderRequest request; |
| public list_sentry_privileges_for_provider_call(TListSentryPrivilegesForProviderRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_privileges_for_provider", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_privileges_for_provider_args args = new list_sentry_privileges_for_provider_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryPrivilegesForProviderResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_privileges_for_provider(); |
| } |
| } |
| |
| public void drop_sentry_privilege(TDropPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| drop_sentry_privilege_call method_call = new drop_sentry_privilege_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class drop_sentry_privilege_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TDropPrivilegesRequest request; |
| public drop_sentry_privilege_call(TDropPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_sentry_privilege", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| drop_sentry_privilege_args args = new drop_sentry_privilege_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TDropPrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_drop_sentry_privilege(); |
| } |
| } |
| |
| public void rename_sentry_privilege(TRenamePrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| rename_sentry_privilege_call method_call = new rename_sentry_privilege_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class rename_sentry_privilege_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TRenamePrivilegesRequest request; |
| public rename_sentry_privilege_call(TRenamePrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename_sentry_privilege", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| rename_sentry_privilege_args args = new rename_sentry_privilege_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TRenamePrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_rename_sentry_privilege(); |
| } |
| } |
| |
| public void list_sentry_privileges_by_authorizable(TListSentryPrivilegesByAuthRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_sentry_privileges_by_authorizable_call method_call = new list_sentry_privileges_by_authorizable_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_sentry_privileges_by_authorizable_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TListSentryPrivilegesByAuthRequest request; |
| public list_sentry_privileges_by_authorizable_call(TListSentryPrivilegesByAuthRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_sentry_privileges_by_authorizable", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_sentry_privileges_by_authorizable_args args = new list_sentry_privileges_by_authorizable_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TListSentryPrivilegesByAuthResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_sentry_privileges_by_authorizable(); |
| } |
| } |
| |
| public void get_sentry_config_value(TSentryConfigValueRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| get_sentry_config_value_call method_call = new get_sentry_config_value_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class get_sentry_config_value_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentryConfigValueRequest request; |
| public get_sentry_config_value_call(TSentryConfigValueRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_sentry_config_value", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| get_sentry_config_value_args args = new get_sentry_config_value_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentryConfigValueResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_get_sentry_config_value(); |
| } |
| } |
| |
| public void export_sentry_mapping_data(TSentryExportMappingDataRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| export_sentry_mapping_data_call method_call = new export_sentry_mapping_data_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class export_sentry_mapping_data_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentryExportMappingDataRequest request; |
| public export_sentry_mapping_data_call(TSentryExportMappingDataRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("export_sentry_mapping_data", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| export_sentry_mapping_data_args args = new export_sentry_mapping_data_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentryExportMappingDataResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_export_sentry_mapping_data(); |
| } |
| } |
| |
| public void import_sentry_mapping_data(TSentryImportMappingDataRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| import_sentry_mapping_data_call method_call = new import_sentry_mapping_data_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class import_sentry_mapping_data_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentryImportMappingDataRequest request; |
| public import_sentry_mapping_data_call(TSentryImportMappingDataRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("import_sentry_mapping_data", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| import_sentry_mapping_data_args args = new import_sentry_mapping_data_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentryImportMappingDataResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_import_sentry_mapping_data(); |
| } |
| } |
| |
| public void sentry_sync_notifications(TSentrySyncIDRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| sentry_sync_notifications_call method_call = new sentry_sync_notifications_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class sentry_sync_notifications_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentrySyncIDRequest request; |
| public sentry_sync_notifications_call(TSentrySyncIDRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sentry_sync_notifications", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| sentry_sync_notifications_args args = new sentry_sync_notifications_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentrySyncIDResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_sentry_sync_notifications(); |
| } |
| } |
| |
| public void sentry_notify_hms_event(TSentryHmsEventNotification request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| sentry_notify_hms_event_call method_call = new sentry_notify_hms_event_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class sentry_notify_hms_event_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentryHmsEventNotification request; |
| public sentry_notify_hms_event_call(TSentryHmsEventNotification request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sentry_notify_hms_event", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| sentry_notify_hms_event_args args = new sentry_notify_hms_event_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentryHmsEventNotificationResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_sentry_notify_hms_event(); |
| } |
| } |
| |
| public void list_roles_privileges(TSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_roles_privileges_call method_call = new list_roles_privileges_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_roles_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentryPrivilegesRequest request; |
| public list_roles_privileges_call(TSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_roles_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_roles_privileges_args args = new list_roles_privileges_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentryPrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_roles_privileges(); |
| } |
| } |
| |
| public void list_users_privileges(TSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| list_users_privileges_call method_call = new list_users_privileges_call(request, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class list_users_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private TSentryPrivilegesRequest request; |
| public list_users_privileges_call(TSentryPrivilegesRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.request = request; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_users_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| list_users_privileges_args args = new list_users_privileges_args(); |
| args.setRequest(request); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public TSentryPrivilegesResponse getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_list_users_privileges(); |
| } |
| } |
| |
| } |
| |
| public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { |
| private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); |
| public Processor(I iface) { |
| super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); |
| } |
| |
| protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { |
| super(iface, getProcessMap(processMap)); |
| } |
| |
| private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { |
| processMap.put("create_sentry_role", new create_sentry_role()); |
| processMap.put("drop_sentry_role", new drop_sentry_role()); |
| processMap.put("alter_sentry_role_grant_privilege", new alter_sentry_role_grant_privilege()); |
| processMap.put("alter_sentry_role_revoke_privilege", new alter_sentry_role_revoke_privilege()); |
| processMap.put("alter_sentry_role_add_groups", new alter_sentry_role_add_groups()); |
| processMap.put("alter_sentry_role_delete_groups", new alter_sentry_role_delete_groups()); |
| processMap.put("alter_sentry_role_add_users", new alter_sentry_role_add_users()); |
| processMap.put("alter_sentry_role_delete_users", new alter_sentry_role_delete_users()); |
| processMap.put("list_sentry_roles_by_group", new list_sentry_roles_by_group()); |
| processMap.put("list_sentry_roles_by_user", new list_sentry_roles_by_user()); |
| processMap.put("list_sentry_privileges_by_role", new list_sentry_privileges_by_role()); |
| processMap.put("list_sentry_privileges_by_user", new list_sentry_privileges_by_user()); |
| processMap.put("list_sentry_privileges_by_user_and_itsgroups", new list_sentry_privileges_by_user_and_itsgroups()); |
| processMap.put("list_sentry_privileges_for_provider", new list_sentry_privileges_for_provider()); |
| processMap.put("drop_sentry_privilege", new drop_sentry_privilege()); |
| processMap.put("rename_sentry_privilege", new rename_sentry_privilege()); |
| processMap.put("list_sentry_privileges_by_authorizable", new list_sentry_privileges_by_authorizable()); |
| processMap.put("get_sentry_config_value", new get_sentry_config_value()); |
| processMap.put("export_sentry_mapping_data", new export_sentry_mapping_data()); |
| processMap.put("import_sentry_mapping_data", new import_sentry_mapping_data()); |
| processMap.put("sentry_sync_notifications", new sentry_sync_notifications()); |
| processMap.put("sentry_notify_hms_event", new sentry_notify_hms_event()); |
| processMap.put("list_roles_privileges", new list_roles_privileges()); |
| processMap.put("list_users_privileges", new list_users_privileges()); |
| return processMap; |
| } |
| |
| public static class create_sentry_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_sentry_role_args> { |
| public create_sentry_role() { |
| super("create_sentry_role"); |
| } |
| |
| public create_sentry_role_args getEmptyArgsInstance() { |
| return new create_sentry_role_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public create_sentry_role_result getResult(I iface, create_sentry_role_args args) throws org.apache.thrift.TException { |
| create_sentry_role_result result = new create_sentry_role_result(); |
| result.success = iface.create_sentry_role(args.request); |
| return result; |
| } |
| } |
| |
| public static class drop_sentry_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_sentry_role_args> { |
| public drop_sentry_role() { |
| super("drop_sentry_role"); |
| } |
| |
| public drop_sentry_role_args getEmptyArgsInstance() { |
| return new drop_sentry_role_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public drop_sentry_role_result getResult(I iface, drop_sentry_role_args args) throws org.apache.thrift.TException { |
| drop_sentry_role_result result = new drop_sentry_role_result(); |
| result.success = iface.drop_sentry_role(args.request); |
| return result; |
| } |
| } |
| |
| public static class alter_sentry_role_grant_privilege<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_sentry_role_grant_privilege_args> { |
| public alter_sentry_role_grant_privilege() { |
| super("alter_sentry_role_grant_privilege"); |
| } |
| |
| public alter_sentry_role_grant_privilege_args getEmptyArgsInstance() { |
| return new alter_sentry_role_grant_privilege_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public alter_sentry_role_grant_privilege_result getResult(I iface, alter_sentry_role_grant_privilege_args args) throws org.apache.thrift.TException { |
| alter_sentry_role_grant_privilege_result result = new alter_sentry_role_grant_privilege_result(); |
| result.success = iface.alter_sentry_role_grant_privilege(args.request); |
| return result; |
| } |
| } |
| |
| public static class alter_sentry_role_revoke_privilege<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_sentry_role_revoke_privilege_args> { |
| public alter_sentry_role_revoke_privilege() { |
| super("alter_sentry_role_revoke_privilege"); |
| } |
| |
| public alter_sentry_role_revoke_privilege_args getEmptyArgsInstance() { |
| return new alter_sentry_role_revoke_privilege_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public alter_sentry_role_revoke_privilege_result getResult(I iface, alter_sentry_role_revoke_privilege_args args) throws org.apache.thrift.TException { |
| alter_sentry_role_revoke_privilege_result result = new alter_sentry_role_revoke_privilege_result(); |
| result.success = iface.alter_sentry_role_revoke_privilege(args.request); |
| return result; |
| } |
| } |
| |
| public static class alter_sentry_role_add_groups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_sentry_role_add_groups_args> { |
| public alter_sentry_role_add_groups() { |
| super("alter_sentry_role_add_groups"); |
| } |
| |
| public alter_sentry_role_add_groups_args getEmptyArgsInstance() { |
| return new alter_sentry_role_add_groups_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public alter_sentry_role_add_groups_result getResult(I iface, alter_sentry_role_add_groups_args args) throws org.apache.thrift.TException { |
| alter_sentry_role_add_groups_result result = new alter_sentry_role_add_groups_result(); |
| result.success = iface.alter_sentry_role_add_groups(args.request); |
| return result; |
| } |
| } |
| |
| public static class alter_sentry_role_delete_groups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_sentry_role_delete_groups_args> { |
| public alter_sentry_role_delete_groups() { |
| super("alter_sentry_role_delete_groups"); |
| } |
| |
| public alter_sentry_role_delete_groups_args getEmptyArgsInstance() { |
| return new alter_sentry_role_delete_groups_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public alter_sentry_role_delete_groups_result getResult(I iface, alter_sentry_role_delete_groups_args args) throws org.apache.thrift.TException { |
| alter_sentry_role_delete_groups_result result = new alter_sentry_role_delete_groups_result(); |
| result.success = iface.alter_sentry_role_delete_groups(args.request); |
| return result; |
| } |
| } |
| |
| public static class alter_sentry_role_add_users<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_sentry_role_add_users_args> { |
| public alter_sentry_role_add_users() { |
| super("alter_sentry_role_add_users"); |
| } |
| |
| public alter_sentry_role_add_users_args getEmptyArgsInstance() { |
| return new alter_sentry_role_add_users_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public alter_sentry_role_add_users_result getResult(I iface, alter_sentry_role_add_users_args args) throws org.apache.thrift.TException { |
| alter_sentry_role_add_users_result result = new alter_sentry_role_add_users_result(); |
| result.success = iface.alter_sentry_role_add_users(args.request); |
| return result; |
| } |
| } |
| |
| public static class alter_sentry_role_delete_users<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_sentry_role_delete_users_args> { |
| public alter_sentry_role_delete_users() { |
| super("alter_sentry_role_delete_users"); |
| } |
| |
| public alter_sentry_role_delete_users_args getEmptyArgsInstance() { |
| return new alter_sentry_role_delete_users_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public alter_sentry_role_delete_users_result getResult(I iface, alter_sentry_role_delete_users_args args) throws org.apache.thrift.TException { |
| alter_sentry_role_delete_users_result result = new alter_sentry_role_delete_users_result(); |
| result.success = iface.alter_sentry_role_delete_users(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_roles_by_group<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_roles_by_group_args> { |
| public list_sentry_roles_by_group() { |
| super("list_sentry_roles_by_group"); |
| } |
| |
| public list_sentry_roles_by_group_args getEmptyArgsInstance() { |
| return new list_sentry_roles_by_group_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_roles_by_group_result getResult(I iface, list_sentry_roles_by_group_args args) throws org.apache.thrift.TException { |
| list_sentry_roles_by_group_result result = new list_sentry_roles_by_group_result(); |
| result.success = iface.list_sentry_roles_by_group(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_roles_by_user<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_roles_by_user_args> { |
| public list_sentry_roles_by_user() { |
| super("list_sentry_roles_by_user"); |
| } |
| |
| public list_sentry_roles_by_user_args getEmptyArgsInstance() { |
| return new list_sentry_roles_by_user_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_roles_by_user_result getResult(I iface, list_sentry_roles_by_user_args args) throws org.apache.thrift.TException { |
| list_sentry_roles_by_user_result result = new list_sentry_roles_by_user_result(); |
| result.success = iface.list_sentry_roles_by_user(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_privileges_by_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_privileges_by_role_args> { |
| public list_sentry_privileges_by_role() { |
| super("list_sentry_privileges_by_role"); |
| } |
| |
| public list_sentry_privileges_by_role_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_role_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_privileges_by_role_result getResult(I iface, list_sentry_privileges_by_role_args args) throws org.apache.thrift.TException { |
| list_sentry_privileges_by_role_result result = new list_sentry_privileges_by_role_result(); |
| result.success = iface.list_sentry_privileges_by_role(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_privileges_by_user<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_privileges_by_user_args> { |
| public list_sentry_privileges_by_user() { |
| super("list_sentry_privileges_by_user"); |
| } |
| |
| public list_sentry_privileges_by_user_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_user_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_privileges_by_user_result getResult(I iface, list_sentry_privileges_by_user_args args) throws org.apache.thrift.TException { |
| list_sentry_privileges_by_user_result result = new list_sentry_privileges_by_user_result(); |
| result.success = iface.list_sentry_privileges_by_user(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_privileges_by_user_and_itsgroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_privileges_by_user_and_itsgroups_args> { |
| public list_sentry_privileges_by_user_and_itsgroups() { |
| super("list_sentry_privileges_by_user_and_itsgroups"); |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_user_and_itsgroups_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_result getResult(I iface, list_sentry_privileges_by_user_and_itsgroups_args args) throws org.apache.thrift.TException { |
| list_sentry_privileges_by_user_and_itsgroups_result result = new list_sentry_privileges_by_user_and_itsgroups_result(); |
| result.success = iface.list_sentry_privileges_by_user_and_itsgroups(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_privileges_for_provider<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_privileges_for_provider_args> { |
| public list_sentry_privileges_for_provider() { |
| super("list_sentry_privileges_for_provider"); |
| } |
| |
| public list_sentry_privileges_for_provider_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_for_provider_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_privileges_for_provider_result getResult(I iface, list_sentry_privileges_for_provider_args args) throws org.apache.thrift.TException { |
| list_sentry_privileges_for_provider_result result = new list_sentry_privileges_for_provider_result(); |
| result.success = iface.list_sentry_privileges_for_provider(args.request); |
| return result; |
| } |
| } |
| |
| public static class drop_sentry_privilege<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_sentry_privilege_args> { |
| public drop_sentry_privilege() { |
| super("drop_sentry_privilege"); |
| } |
| |
| public drop_sentry_privilege_args getEmptyArgsInstance() { |
| return new drop_sentry_privilege_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public drop_sentry_privilege_result getResult(I iface, drop_sentry_privilege_args args) throws org.apache.thrift.TException { |
| drop_sentry_privilege_result result = new drop_sentry_privilege_result(); |
| result.success = iface.drop_sentry_privilege(args.request); |
| return result; |
| } |
| } |
| |
| public static class rename_sentry_privilege<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rename_sentry_privilege_args> { |
| public rename_sentry_privilege() { |
| super("rename_sentry_privilege"); |
| } |
| |
| public rename_sentry_privilege_args getEmptyArgsInstance() { |
| return new rename_sentry_privilege_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public rename_sentry_privilege_result getResult(I iface, rename_sentry_privilege_args args) throws org.apache.thrift.TException { |
| rename_sentry_privilege_result result = new rename_sentry_privilege_result(); |
| result.success = iface.rename_sentry_privilege(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_sentry_privileges_by_authorizable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_sentry_privileges_by_authorizable_args> { |
| public list_sentry_privileges_by_authorizable() { |
| super("list_sentry_privileges_by_authorizable"); |
| } |
| |
| public list_sentry_privileges_by_authorizable_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_authorizable_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_sentry_privileges_by_authorizable_result getResult(I iface, list_sentry_privileges_by_authorizable_args args) throws org.apache.thrift.TException { |
| list_sentry_privileges_by_authorizable_result result = new list_sentry_privileges_by_authorizable_result(); |
| result.success = iface.list_sentry_privileges_by_authorizable(args.request); |
| return result; |
| } |
| } |
| |
| public static class get_sentry_config_value<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_sentry_config_value_args> { |
| public get_sentry_config_value() { |
| super("get_sentry_config_value"); |
| } |
| |
| public get_sentry_config_value_args getEmptyArgsInstance() { |
| return new get_sentry_config_value_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public get_sentry_config_value_result getResult(I iface, get_sentry_config_value_args args) throws org.apache.thrift.TException { |
| get_sentry_config_value_result result = new get_sentry_config_value_result(); |
| result.success = iface.get_sentry_config_value(args.request); |
| return result; |
| } |
| } |
| |
| public static class export_sentry_mapping_data<I extends Iface> extends org.apache.thrift.ProcessFunction<I, export_sentry_mapping_data_args> { |
| public export_sentry_mapping_data() { |
| super("export_sentry_mapping_data"); |
| } |
| |
| public export_sentry_mapping_data_args getEmptyArgsInstance() { |
| return new export_sentry_mapping_data_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public export_sentry_mapping_data_result getResult(I iface, export_sentry_mapping_data_args args) throws org.apache.thrift.TException { |
| export_sentry_mapping_data_result result = new export_sentry_mapping_data_result(); |
| result.success = iface.export_sentry_mapping_data(args.request); |
| return result; |
| } |
| } |
| |
| public static class import_sentry_mapping_data<I extends Iface> extends org.apache.thrift.ProcessFunction<I, import_sentry_mapping_data_args> { |
| public import_sentry_mapping_data() { |
| super("import_sentry_mapping_data"); |
| } |
| |
| public import_sentry_mapping_data_args getEmptyArgsInstance() { |
| return new import_sentry_mapping_data_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public import_sentry_mapping_data_result getResult(I iface, import_sentry_mapping_data_args args) throws org.apache.thrift.TException { |
| import_sentry_mapping_data_result result = new import_sentry_mapping_data_result(); |
| result.success = iface.import_sentry_mapping_data(args.request); |
| return result; |
| } |
| } |
| |
| public static class sentry_sync_notifications<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sentry_sync_notifications_args> { |
| public sentry_sync_notifications() { |
| super("sentry_sync_notifications"); |
| } |
| |
| public sentry_sync_notifications_args getEmptyArgsInstance() { |
| return new sentry_sync_notifications_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public sentry_sync_notifications_result getResult(I iface, sentry_sync_notifications_args args) throws org.apache.thrift.TException { |
| sentry_sync_notifications_result result = new sentry_sync_notifications_result(); |
| result.success = iface.sentry_sync_notifications(args.request); |
| return result; |
| } |
| } |
| |
| public static class sentry_notify_hms_event<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sentry_notify_hms_event_args> { |
| public sentry_notify_hms_event() { |
| super("sentry_notify_hms_event"); |
| } |
| |
| public sentry_notify_hms_event_args getEmptyArgsInstance() { |
| return new sentry_notify_hms_event_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public sentry_notify_hms_event_result getResult(I iface, sentry_notify_hms_event_args args) throws org.apache.thrift.TException { |
| sentry_notify_hms_event_result result = new sentry_notify_hms_event_result(); |
| result.success = iface.sentry_notify_hms_event(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_roles_privileges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_roles_privileges_args> { |
| public list_roles_privileges() { |
| super("list_roles_privileges"); |
| } |
| |
| public list_roles_privileges_args getEmptyArgsInstance() { |
| return new list_roles_privileges_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_roles_privileges_result getResult(I iface, list_roles_privileges_args args) throws org.apache.thrift.TException { |
| list_roles_privileges_result result = new list_roles_privileges_result(); |
| result.success = iface.list_roles_privileges(args.request); |
| return result; |
| } |
| } |
| |
| public static class list_users_privileges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_users_privileges_args> { |
| public list_users_privileges() { |
| super("list_users_privileges"); |
| } |
| |
| public list_users_privileges_args getEmptyArgsInstance() { |
| return new list_users_privileges_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public list_users_privileges_result getResult(I iface, list_users_privileges_args args) throws org.apache.thrift.TException { |
| list_users_privileges_result result = new list_users_privileges_result(); |
| result.success = iface.list_users_privileges(args.request); |
| return result; |
| } |
| } |
| |
| } |
| |
| public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { |
| private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); |
| public AsyncProcessor(I iface) { |
| super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); |
| } |
| |
| protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { |
| super(iface, getProcessMap(processMap)); |
| } |
| |
| private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { |
| processMap.put("create_sentry_role", new create_sentry_role()); |
| processMap.put("drop_sentry_role", new drop_sentry_role()); |
| processMap.put("alter_sentry_role_grant_privilege", new alter_sentry_role_grant_privilege()); |
| processMap.put("alter_sentry_role_revoke_privilege", new alter_sentry_role_revoke_privilege()); |
| processMap.put("alter_sentry_role_add_groups", new alter_sentry_role_add_groups()); |
| processMap.put("alter_sentry_role_delete_groups", new alter_sentry_role_delete_groups()); |
| processMap.put("alter_sentry_role_add_users", new alter_sentry_role_add_users()); |
| processMap.put("alter_sentry_role_delete_users", new alter_sentry_role_delete_users()); |
| processMap.put("list_sentry_roles_by_group", new list_sentry_roles_by_group()); |
| processMap.put("list_sentry_roles_by_user", new list_sentry_roles_by_user()); |
| processMap.put("list_sentry_privileges_by_role", new list_sentry_privileges_by_role()); |
| processMap.put("list_sentry_privileges_by_user", new list_sentry_privileges_by_user()); |
| processMap.put("list_sentry_privileges_by_user_and_itsgroups", new list_sentry_privileges_by_user_and_itsgroups()); |
| processMap.put("list_sentry_privileges_for_provider", new list_sentry_privileges_for_provider()); |
| processMap.put("drop_sentry_privilege", new drop_sentry_privilege()); |
| processMap.put("rename_sentry_privilege", new rename_sentry_privilege()); |
| processMap.put("list_sentry_privileges_by_authorizable", new list_sentry_privileges_by_authorizable()); |
| processMap.put("get_sentry_config_value", new get_sentry_config_value()); |
| processMap.put("export_sentry_mapping_data", new export_sentry_mapping_data()); |
| processMap.put("import_sentry_mapping_data", new import_sentry_mapping_data()); |
| processMap.put("sentry_sync_notifications", new sentry_sync_notifications()); |
| processMap.put("sentry_notify_hms_event", new sentry_notify_hms_event()); |
| processMap.put("list_roles_privileges", new list_roles_privileges()); |
| processMap.put("list_users_privileges", new list_users_privileges()); |
| return processMap; |
| } |
| |
| public static class create_sentry_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_sentry_role_args, TCreateSentryRoleResponse> { |
| public create_sentry_role() { |
| super("create_sentry_role"); |
| } |
| |
| public create_sentry_role_args getEmptyArgsInstance() { |
| return new create_sentry_role_args(); |
| } |
| |
| public AsyncMethodCallback<TCreateSentryRoleResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TCreateSentryRoleResponse>() { |
| public void onComplete(TCreateSentryRoleResponse o) { |
| create_sentry_role_result result = new create_sentry_role_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| create_sentry_role_result result = new create_sentry_role_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, create_sentry_role_args args, org.apache.thrift.async.AsyncMethodCallback<TCreateSentryRoleResponse> resultHandler) throws TException { |
| iface.create_sentry_role(args.request,resultHandler); |
| } |
| } |
| |
| public static class drop_sentry_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_sentry_role_args, TDropSentryRoleResponse> { |
| public drop_sentry_role() { |
| super("drop_sentry_role"); |
| } |
| |
| public drop_sentry_role_args getEmptyArgsInstance() { |
| return new drop_sentry_role_args(); |
| } |
| |
| public AsyncMethodCallback<TDropSentryRoleResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TDropSentryRoleResponse>() { |
| public void onComplete(TDropSentryRoleResponse o) { |
| drop_sentry_role_result result = new drop_sentry_role_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| drop_sentry_role_result result = new drop_sentry_role_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, drop_sentry_role_args args, org.apache.thrift.async.AsyncMethodCallback<TDropSentryRoleResponse> resultHandler) throws TException { |
| iface.drop_sentry_role(args.request,resultHandler); |
| } |
| } |
| |
| public static class alter_sentry_role_grant_privilege<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_sentry_role_grant_privilege_args, TAlterSentryRoleGrantPrivilegeResponse> { |
| public alter_sentry_role_grant_privilege() { |
| super("alter_sentry_role_grant_privilege"); |
| } |
| |
| public alter_sentry_role_grant_privilege_args getEmptyArgsInstance() { |
| return new alter_sentry_role_grant_privilege_args(); |
| } |
| |
| public AsyncMethodCallback<TAlterSentryRoleGrantPrivilegeResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TAlterSentryRoleGrantPrivilegeResponse>() { |
| public void onComplete(TAlterSentryRoleGrantPrivilegeResponse o) { |
| alter_sentry_role_grant_privilege_result result = new alter_sentry_role_grant_privilege_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| alter_sentry_role_grant_privilege_result result = new alter_sentry_role_grant_privilege_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, alter_sentry_role_grant_privilege_args args, org.apache.thrift.async.AsyncMethodCallback<TAlterSentryRoleGrantPrivilegeResponse> resultHandler) throws TException { |
| iface.alter_sentry_role_grant_privilege(args.request,resultHandler); |
| } |
| } |
| |
| public static class alter_sentry_role_revoke_privilege<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_sentry_role_revoke_privilege_args, TAlterSentryRoleRevokePrivilegeResponse> { |
| public alter_sentry_role_revoke_privilege() { |
| super("alter_sentry_role_revoke_privilege"); |
| } |
| |
| public alter_sentry_role_revoke_privilege_args getEmptyArgsInstance() { |
| return new alter_sentry_role_revoke_privilege_args(); |
| } |
| |
| public AsyncMethodCallback<TAlterSentryRoleRevokePrivilegeResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TAlterSentryRoleRevokePrivilegeResponse>() { |
| public void onComplete(TAlterSentryRoleRevokePrivilegeResponse o) { |
| alter_sentry_role_revoke_privilege_result result = new alter_sentry_role_revoke_privilege_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| alter_sentry_role_revoke_privilege_result result = new alter_sentry_role_revoke_privilege_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, alter_sentry_role_revoke_privilege_args args, org.apache.thrift.async.AsyncMethodCallback<TAlterSentryRoleRevokePrivilegeResponse> resultHandler) throws TException { |
| iface.alter_sentry_role_revoke_privilege(args.request,resultHandler); |
| } |
| } |
| |
| public static class alter_sentry_role_add_groups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_sentry_role_add_groups_args, TAlterSentryRoleAddGroupsResponse> { |
| public alter_sentry_role_add_groups() { |
| super("alter_sentry_role_add_groups"); |
| } |
| |
| public alter_sentry_role_add_groups_args getEmptyArgsInstance() { |
| return new alter_sentry_role_add_groups_args(); |
| } |
| |
| public AsyncMethodCallback<TAlterSentryRoleAddGroupsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TAlterSentryRoleAddGroupsResponse>() { |
| public void onComplete(TAlterSentryRoleAddGroupsResponse o) { |
| alter_sentry_role_add_groups_result result = new alter_sentry_role_add_groups_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| alter_sentry_role_add_groups_result result = new alter_sentry_role_add_groups_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, alter_sentry_role_add_groups_args args, org.apache.thrift.async.AsyncMethodCallback<TAlterSentryRoleAddGroupsResponse> resultHandler) throws TException { |
| iface.alter_sentry_role_add_groups(args.request,resultHandler); |
| } |
| } |
| |
| public static class alter_sentry_role_delete_groups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_sentry_role_delete_groups_args, TAlterSentryRoleDeleteGroupsResponse> { |
| public alter_sentry_role_delete_groups() { |
| super("alter_sentry_role_delete_groups"); |
| } |
| |
| public alter_sentry_role_delete_groups_args getEmptyArgsInstance() { |
| return new alter_sentry_role_delete_groups_args(); |
| } |
| |
| public AsyncMethodCallback<TAlterSentryRoleDeleteGroupsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TAlterSentryRoleDeleteGroupsResponse>() { |
| public void onComplete(TAlterSentryRoleDeleteGroupsResponse o) { |
| alter_sentry_role_delete_groups_result result = new alter_sentry_role_delete_groups_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| alter_sentry_role_delete_groups_result result = new alter_sentry_role_delete_groups_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, alter_sentry_role_delete_groups_args args, org.apache.thrift.async.AsyncMethodCallback<TAlterSentryRoleDeleteGroupsResponse> resultHandler) throws TException { |
| iface.alter_sentry_role_delete_groups(args.request,resultHandler); |
| } |
| } |
| |
| public static class alter_sentry_role_add_users<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_sentry_role_add_users_args, TAlterSentryRoleAddUsersResponse> { |
| public alter_sentry_role_add_users() { |
| super("alter_sentry_role_add_users"); |
| } |
| |
| public alter_sentry_role_add_users_args getEmptyArgsInstance() { |
| return new alter_sentry_role_add_users_args(); |
| } |
| |
| public AsyncMethodCallback<TAlterSentryRoleAddUsersResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TAlterSentryRoleAddUsersResponse>() { |
| public void onComplete(TAlterSentryRoleAddUsersResponse o) { |
| alter_sentry_role_add_users_result result = new alter_sentry_role_add_users_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| alter_sentry_role_add_users_result result = new alter_sentry_role_add_users_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, alter_sentry_role_add_users_args args, org.apache.thrift.async.AsyncMethodCallback<TAlterSentryRoleAddUsersResponse> resultHandler) throws TException { |
| iface.alter_sentry_role_add_users(args.request,resultHandler); |
| } |
| } |
| |
| public static class alter_sentry_role_delete_users<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_sentry_role_delete_users_args, TAlterSentryRoleDeleteUsersResponse> { |
| public alter_sentry_role_delete_users() { |
| super("alter_sentry_role_delete_users"); |
| } |
| |
| public alter_sentry_role_delete_users_args getEmptyArgsInstance() { |
| return new alter_sentry_role_delete_users_args(); |
| } |
| |
| public AsyncMethodCallback<TAlterSentryRoleDeleteUsersResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TAlterSentryRoleDeleteUsersResponse>() { |
| public void onComplete(TAlterSentryRoleDeleteUsersResponse o) { |
| alter_sentry_role_delete_users_result result = new alter_sentry_role_delete_users_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| alter_sentry_role_delete_users_result result = new alter_sentry_role_delete_users_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, alter_sentry_role_delete_users_args args, org.apache.thrift.async.AsyncMethodCallback<TAlterSentryRoleDeleteUsersResponse> resultHandler) throws TException { |
| iface.alter_sentry_role_delete_users(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_roles_by_group<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_roles_by_group_args, TListSentryRolesResponse> { |
| public list_sentry_roles_by_group() { |
| super("list_sentry_roles_by_group"); |
| } |
| |
| public list_sentry_roles_by_group_args getEmptyArgsInstance() { |
| return new list_sentry_roles_by_group_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryRolesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryRolesResponse>() { |
| public void onComplete(TListSentryRolesResponse o) { |
| list_sentry_roles_by_group_result result = new list_sentry_roles_by_group_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_roles_by_group_result result = new list_sentry_roles_by_group_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_roles_by_group_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryRolesResponse> resultHandler) throws TException { |
| iface.list_sentry_roles_by_group(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_roles_by_user<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_roles_by_user_args, TListSentryRolesResponse> { |
| public list_sentry_roles_by_user() { |
| super("list_sentry_roles_by_user"); |
| } |
| |
| public list_sentry_roles_by_user_args getEmptyArgsInstance() { |
| return new list_sentry_roles_by_user_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryRolesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryRolesResponse>() { |
| public void onComplete(TListSentryRolesResponse o) { |
| list_sentry_roles_by_user_result result = new list_sentry_roles_by_user_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_roles_by_user_result result = new list_sentry_roles_by_user_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_roles_by_user_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryRolesResponse> resultHandler) throws TException { |
| iface.list_sentry_roles_by_user(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_privileges_by_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_privileges_by_role_args, TListSentryPrivilegesResponse> { |
| public list_sentry_privileges_by_role() { |
| super("list_sentry_privileges_by_role"); |
| } |
| |
| public list_sentry_privileges_by_role_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_role_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryPrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryPrivilegesResponse>() { |
| public void onComplete(TListSentryPrivilegesResponse o) { |
| list_sentry_privileges_by_role_result result = new list_sentry_privileges_by_role_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_privileges_by_role_result result = new list_sentry_privileges_by_role_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_privileges_by_role_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryPrivilegesResponse> resultHandler) throws TException { |
| iface.list_sentry_privileges_by_role(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_privileges_by_user<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_privileges_by_user_args, TListSentryPrivilegesResponse> { |
| public list_sentry_privileges_by_user() { |
| super("list_sentry_privileges_by_user"); |
| } |
| |
| public list_sentry_privileges_by_user_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_user_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryPrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryPrivilegesResponse>() { |
| public void onComplete(TListSentryPrivilegesResponse o) { |
| list_sentry_privileges_by_user_result result = new list_sentry_privileges_by_user_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_privileges_by_user_result result = new list_sentry_privileges_by_user_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_privileges_by_user_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryPrivilegesResponse> resultHandler) throws TException { |
| iface.list_sentry_privileges_by_user(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_privileges_by_user_and_itsgroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_privileges_by_user_and_itsgroups_args, TListSentryPrivilegesResponse> { |
| public list_sentry_privileges_by_user_and_itsgroups() { |
| super("list_sentry_privileges_by_user_and_itsgroups"); |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_user_and_itsgroups_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryPrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryPrivilegesResponse>() { |
| public void onComplete(TListSentryPrivilegesResponse o) { |
| list_sentry_privileges_by_user_and_itsgroups_result result = new list_sentry_privileges_by_user_and_itsgroups_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_privileges_by_user_and_itsgroups_result result = new list_sentry_privileges_by_user_and_itsgroups_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_privileges_by_user_and_itsgroups_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryPrivilegesResponse> resultHandler) throws TException { |
| iface.list_sentry_privileges_by_user_and_itsgroups(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_privileges_for_provider<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_privileges_for_provider_args, TListSentryPrivilegesForProviderResponse> { |
| public list_sentry_privileges_for_provider() { |
| super("list_sentry_privileges_for_provider"); |
| } |
| |
| public list_sentry_privileges_for_provider_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_for_provider_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryPrivilegesForProviderResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryPrivilegesForProviderResponse>() { |
| public void onComplete(TListSentryPrivilegesForProviderResponse o) { |
| list_sentry_privileges_for_provider_result result = new list_sentry_privileges_for_provider_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_privileges_for_provider_result result = new list_sentry_privileges_for_provider_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_privileges_for_provider_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryPrivilegesForProviderResponse> resultHandler) throws TException { |
| iface.list_sentry_privileges_for_provider(args.request,resultHandler); |
| } |
| } |
| |
| public static class drop_sentry_privilege<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_sentry_privilege_args, TDropPrivilegesResponse> { |
| public drop_sentry_privilege() { |
| super("drop_sentry_privilege"); |
| } |
| |
| public drop_sentry_privilege_args getEmptyArgsInstance() { |
| return new drop_sentry_privilege_args(); |
| } |
| |
| public AsyncMethodCallback<TDropPrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TDropPrivilegesResponse>() { |
| public void onComplete(TDropPrivilegesResponse o) { |
| drop_sentry_privilege_result result = new drop_sentry_privilege_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| drop_sentry_privilege_result result = new drop_sentry_privilege_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, drop_sentry_privilege_args args, org.apache.thrift.async.AsyncMethodCallback<TDropPrivilegesResponse> resultHandler) throws TException { |
| iface.drop_sentry_privilege(args.request,resultHandler); |
| } |
| } |
| |
| public static class rename_sentry_privilege<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, rename_sentry_privilege_args, TRenamePrivilegesResponse> { |
| public rename_sentry_privilege() { |
| super("rename_sentry_privilege"); |
| } |
| |
| public rename_sentry_privilege_args getEmptyArgsInstance() { |
| return new rename_sentry_privilege_args(); |
| } |
| |
| public AsyncMethodCallback<TRenamePrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TRenamePrivilegesResponse>() { |
| public void onComplete(TRenamePrivilegesResponse o) { |
| rename_sentry_privilege_result result = new rename_sentry_privilege_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| rename_sentry_privilege_result result = new rename_sentry_privilege_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, rename_sentry_privilege_args args, org.apache.thrift.async.AsyncMethodCallback<TRenamePrivilegesResponse> resultHandler) throws TException { |
| iface.rename_sentry_privilege(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_sentry_privileges_by_authorizable<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_sentry_privileges_by_authorizable_args, TListSentryPrivilegesByAuthResponse> { |
| public list_sentry_privileges_by_authorizable() { |
| super("list_sentry_privileges_by_authorizable"); |
| } |
| |
| public list_sentry_privileges_by_authorizable_args getEmptyArgsInstance() { |
| return new list_sentry_privileges_by_authorizable_args(); |
| } |
| |
| public AsyncMethodCallback<TListSentryPrivilegesByAuthResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TListSentryPrivilegesByAuthResponse>() { |
| public void onComplete(TListSentryPrivilegesByAuthResponse o) { |
| list_sentry_privileges_by_authorizable_result result = new list_sentry_privileges_by_authorizable_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_sentry_privileges_by_authorizable_result result = new list_sentry_privileges_by_authorizable_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_sentry_privileges_by_authorizable_args args, org.apache.thrift.async.AsyncMethodCallback<TListSentryPrivilegesByAuthResponse> resultHandler) throws TException { |
| iface.list_sentry_privileges_by_authorizable(args.request,resultHandler); |
| } |
| } |
| |
| public static class get_sentry_config_value<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_sentry_config_value_args, TSentryConfigValueResponse> { |
| public get_sentry_config_value() { |
| super("get_sentry_config_value"); |
| } |
| |
| public get_sentry_config_value_args getEmptyArgsInstance() { |
| return new get_sentry_config_value_args(); |
| } |
| |
| public AsyncMethodCallback<TSentryConfigValueResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentryConfigValueResponse>() { |
| public void onComplete(TSentryConfigValueResponse o) { |
| get_sentry_config_value_result result = new get_sentry_config_value_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| get_sentry_config_value_result result = new get_sentry_config_value_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, get_sentry_config_value_args args, org.apache.thrift.async.AsyncMethodCallback<TSentryConfigValueResponse> resultHandler) throws TException { |
| iface.get_sentry_config_value(args.request,resultHandler); |
| } |
| } |
| |
| public static class export_sentry_mapping_data<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, export_sentry_mapping_data_args, TSentryExportMappingDataResponse> { |
| public export_sentry_mapping_data() { |
| super("export_sentry_mapping_data"); |
| } |
| |
| public export_sentry_mapping_data_args getEmptyArgsInstance() { |
| return new export_sentry_mapping_data_args(); |
| } |
| |
| public AsyncMethodCallback<TSentryExportMappingDataResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentryExportMappingDataResponse>() { |
| public void onComplete(TSentryExportMappingDataResponse o) { |
| export_sentry_mapping_data_result result = new export_sentry_mapping_data_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| export_sentry_mapping_data_result result = new export_sentry_mapping_data_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, export_sentry_mapping_data_args args, org.apache.thrift.async.AsyncMethodCallback<TSentryExportMappingDataResponse> resultHandler) throws TException { |
| iface.export_sentry_mapping_data(args.request,resultHandler); |
| } |
| } |
| |
| public static class import_sentry_mapping_data<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, import_sentry_mapping_data_args, TSentryImportMappingDataResponse> { |
| public import_sentry_mapping_data() { |
| super("import_sentry_mapping_data"); |
| } |
| |
| public import_sentry_mapping_data_args getEmptyArgsInstance() { |
| return new import_sentry_mapping_data_args(); |
| } |
| |
| public AsyncMethodCallback<TSentryImportMappingDataResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentryImportMappingDataResponse>() { |
| public void onComplete(TSentryImportMappingDataResponse o) { |
| import_sentry_mapping_data_result result = new import_sentry_mapping_data_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| import_sentry_mapping_data_result result = new import_sentry_mapping_data_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, import_sentry_mapping_data_args args, org.apache.thrift.async.AsyncMethodCallback<TSentryImportMappingDataResponse> resultHandler) throws TException { |
| iface.import_sentry_mapping_data(args.request,resultHandler); |
| } |
| } |
| |
| public static class sentry_sync_notifications<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sentry_sync_notifications_args, TSentrySyncIDResponse> { |
| public sentry_sync_notifications() { |
| super("sentry_sync_notifications"); |
| } |
| |
| public sentry_sync_notifications_args getEmptyArgsInstance() { |
| return new sentry_sync_notifications_args(); |
| } |
| |
| public AsyncMethodCallback<TSentrySyncIDResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentrySyncIDResponse>() { |
| public void onComplete(TSentrySyncIDResponse o) { |
| sentry_sync_notifications_result result = new sentry_sync_notifications_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| sentry_sync_notifications_result result = new sentry_sync_notifications_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, sentry_sync_notifications_args args, org.apache.thrift.async.AsyncMethodCallback<TSentrySyncIDResponse> resultHandler) throws TException { |
| iface.sentry_sync_notifications(args.request,resultHandler); |
| } |
| } |
| |
| public static class sentry_notify_hms_event<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sentry_notify_hms_event_args, TSentryHmsEventNotificationResponse> { |
| public sentry_notify_hms_event() { |
| super("sentry_notify_hms_event"); |
| } |
| |
| public sentry_notify_hms_event_args getEmptyArgsInstance() { |
| return new sentry_notify_hms_event_args(); |
| } |
| |
| public AsyncMethodCallback<TSentryHmsEventNotificationResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentryHmsEventNotificationResponse>() { |
| public void onComplete(TSentryHmsEventNotificationResponse o) { |
| sentry_notify_hms_event_result result = new sentry_notify_hms_event_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| sentry_notify_hms_event_result result = new sentry_notify_hms_event_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, sentry_notify_hms_event_args args, org.apache.thrift.async.AsyncMethodCallback<TSentryHmsEventNotificationResponse> resultHandler) throws TException { |
| iface.sentry_notify_hms_event(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_roles_privileges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_roles_privileges_args, TSentryPrivilegesResponse> { |
| public list_roles_privileges() { |
| super("list_roles_privileges"); |
| } |
| |
| public list_roles_privileges_args getEmptyArgsInstance() { |
| return new list_roles_privileges_args(); |
| } |
| |
| public AsyncMethodCallback<TSentryPrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentryPrivilegesResponse>() { |
| public void onComplete(TSentryPrivilegesResponse o) { |
| list_roles_privileges_result result = new list_roles_privileges_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_roles_privileges_result result = new list_roles_privileges_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_roles_privileges_args args, org.apache.thrift.async.AsyncMethodCallback<TSentryPrivilegesResponse> resultHandler) throws TException { |
| iface.list_roles_privileges(args.request,resultHandler); |
| } |
| } |
| |
| public static class list_users_privileges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_users_privileges_args, TSentryPrivilegesResponse> { |
| public list_users_privileges() { |
| super("list_users_privileges"); |
| } |
| |
| public list_users_privileges_args getEmptyArgsInstance() { |
| return new list_users_privileges_args(); |
| } |
| |
| public AsyncMethodCallback<TSentryPrivilegesResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<TSentryPrivilegesResponse>() { |
| public void onComplete(TSentryPrivilegesResponse o) { |
| list_users_privileges_result result = new list_users_privileges_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| list_users_privileges_result result = new list_users_privileges_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, list_users_privileges_args args, org.apache.thrift.async.AsyncMethodCallback<TSentryPrivilegesResponse> resultHandler) throws TException { |
| iface.list_users_privileges(args.request,resultHandler); |
| } |
| } |
| |
| } |
| |
| public static class create_sentry_role_args implements org.apache.thrift.TBase<create_sentry_role_args, create_sentry_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_sentry_role_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_sentry_role_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new create_sentry_role_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new create_sentry_role_argsTupleSchemeFactory()); |
| } |
| |
| private TCreateSentryRoleRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCreateSentryRoleRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_sentry_role_args.class, metaDataMap); |
| } |
| |
| public create_sentry_role_args() { |
| } |
| |
| public create_sentry_role_args( |
| TCreateSentryRoleRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public create_sentry_role_args(create_sentry_role_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TCreateSentryRoleRequest(other.request); |
| } |
| } |
| |
| public create_sentry_role_args deepCopy() { |
| return new create_sentry_role_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TCreateSentryRoleRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TCreateSentryRoleRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TCreateSentryRoleRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof create_sentry_role_args) |
| return this.equals((create_sentry_role_args)that); |
| return false; |
| } |
| |
| public boolean equals(create_sentry_role_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(create_sentry_role_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("create_sentry_role_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class create_sentry_role_argsStandardSchemeFactory implements SchemeFactory { |
| public create_sentry_role_argsStandardScheme getScheme() { |
| return new create_sentry_role_argsStandardScheme(); |
| } |
| } |
| |
| private static class create_sentry_role_argsStandardScheme extends StandardScheme<create_sentry_role_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, create_sentry_role_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TCreateSentryRoleRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, create_sentry_role_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class create_sentry_role_argsTupleSchemeFactory implements SchemeFactory { |
| public create_sentry_role_argsTupleScheme getScheme() { |
| return new create_sentry_role_argsTupleScheme(); |
| } |
| } |
| |
| private static class create_sentry_role_argsTupleScheme extends TupleScheme<create_sentry_role_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, create_sentry_role_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, create_sentry_role_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TCreateSentryRoleRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class create_sentry_role_result implements org.apache.thrift.TBase<create_sentry_role_result, create_sentry_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_sentry_role_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_sentry_role_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new create_sentry_role_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new create_sentry_role_resultTupleSchemeFactory()); |
| } |
| |
| private TCreateSentryRoleResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCreateSentryRoleResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_sentry_role_result.class, metaDataMap); |
| } |
| |
| public create_sentry_role_result() { |
| } |
| |
| public create_sentry_role_result( |
| TCreateSentryRoleResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public create_sentry_role_result(create_sentry_role_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TCreateSentryRoleResponse(other.success); |
| } |
| } |
| |
| public create_sentry_role_result deepCopy() { |
| return new create_sentry_role_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TCreateSentryRoleResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TCreateSentryRoleResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TCreateSentryRoleResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof create_sentry_role_result) |
| return this.equals((create_sentry_role_result)that); |
| return false; |
| } |
| |
| public boolean equals(create_sentry_role_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(create_sentry_role_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("create_sentry_role_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class create_sentry_role_resultStandardSchemeFactory implements SchemeFactory { |
| public create_sentry_role_resultStandardScheme getScheme() { |
| return new create_sentry_role_resultStandardScheme(); |
| } |
| } |
| |
| private static class create_sentry_role_resultStandardScheme extends StandardScheme<create_sentry_role_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, create_sentry_role_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TCreateSentryRoleResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, create_sentry_role_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class create_sentry_role_resultTupleSchemeFactory implements SchemeFactory { |
| public create_sentry_role_resultTupleScheme getScheme() { |
| return new create_sentry_role_resultTupleScheme(); |
| } |
| } |
| |
| private static class create_sentry_role_resultTupleScheme extends TupleScheme<create_sentry_role_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, create_sentry_role_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, create_sentry_role_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TCreateSentryRoleResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class drop_sentry_role_args implements org.apache.thrift.TBase<drop_sentry_role_args, drop_sentry_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_sentry_role_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_sentry_role_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new drop_sentry_role_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new drop_sentry_role_argsTupleSchemeFactory()); |
| } |
| |
| private TDropSentryRoleRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDropSentryRoleRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_sentry_role_args.class, metaDataMap); |
| } |
| |
| public drop_sentry_role_args() { |
| } |
| |
| public drop_sentry_role_args( |
| TDropSentryRoleRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public drop_sentry_role_args(drop_sentry_role_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TDropSentryRoleRequest(other.request); |
| } |
| } |
| |
| public drop_sentry_role_args deepCopy() { |
| return new drop_sentry_role_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TDropSentryRoleRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TDropSentryRoleRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TDropSentryRoleRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof drop_sentry_role_args) |
| return this.equals((drop_sentry_role_args)that); |
| return false; |
| } |
| |
| public boolean equals(drop_sentry_role_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(drop_sentry_role_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("drop_sentry_role_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class drop_sentry_role_argsStandardSchemeFactory implements SchemeFactory { |
| public drop_sentry_role_argsStandardScheme getScheme() { |
| return new drop_sentry_role_argsStandardScheme(); |
| } |
| } |
| |
| private static class drop_sentry_role_argsStandardScheme extends StandardScheme<drop_sentry_role_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, drop_sentry_role_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TDropSentryRoleRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, drop_sentry_role_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class drop_sentry_role_argsTupleSchemeFactory implements SchemeFactory { |
| public drop_sentry_role_argsTupleScheme getScheme() { |
| return new drop_sentry_role_argsTupleScheme(); |
| } |
| } |
| |
| private static class drop_sentry_role_argsTupleScheme extends TupleScheme<drop_sentry_role_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, drop_sentry_role_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, drop_sentry_role_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TDropSentryRoleRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class drop_sentry_role_result implements org.apache.thrift.TBase<drop_sentry_role_result, drop_sentry_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_sentry_role_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_sentry_role_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new drop_sentry_role_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new drop_sentry_role_resultTupleSchemeFactory()); |
| } |
| |
| private TDropSentryRoleResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDropSentryRoleResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_sentry_role_result.class, metaDataMap); |
| } |
| |
| public drop_sentry_role_result() { |
| } |
| |
| public drop_sentry_role_result( |
| TDropSentryRoleResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public drop_sentry_role_result(drop_sentry_role_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TDropSentryRoleResponse(other.success); |
| } |
| } |
| |
| public drop_sentry_role_result deepCopy() { |
| return new drop_sentry_role_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TDropSentryRoleResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TDropSentryRoleResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TDropSentryRoleResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof drop_sentry_role_result) |
| return this.equals((drop_sentry_role_result)that); |
| return false; |
| } |
| |
| public boolean equals(drop_sentry_role_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(drop_sentry_role_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("drop_sentry_role_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class drop_sentry_role_resultStandardSchemeFactory implements SchemeFactory { |
| public drop_sentry_role_resultStandardScheme getScheme() { |
| return new drop_sentry_role_resultStandardScheme(); |
| } |
| } |
| |
| private static class drop_sentry_role_resultStandardScheme extends StandardScheme<drop_sentry_role_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, drop_sentry_role_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TDropSentryRoleResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, drop_sentry_role_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class drop_sentry_role_resultTupleSchemeFactory implements SchemeFactory { |
| public drop_sentry_role_resultTupleScheme getScheme() { |
| return new drop_sentry_role_resultTupleScheme(); |
| } |
| } |
| |
| private static class drop_sentry_role_resultTupleScheme extends TupleScheme<drop_sentry_role_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, drop_sentry_role_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, drop_sentry_role_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TDropSentryRoleResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_grant_privilege_args implements org.apache.thrift.TBase<alter_sentry_role_grant_privilege_args, alter_sentry_role_grant_privilege_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_grant_privilege_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_grant_privilege_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_grant_privilege_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_grant_privilege_argsTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleGrantPrivilegeRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleGrantPrivilegeRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_grant_privilege_args.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_grant_privilege_args() { |
| } |
| |
| public alter_sentry_role_grant_privilege_args( |
| TAlterSentryRoleGrantPrivilegeRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_grant_privilege_args(alter_sentry_role_grant_privilege_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TAlterSentryRoleGrantPrivilegeRequest(other.request); |
| } |
| } |
| |
| public alter_sentry_role_grant_privilege_args deepCopy() { |
| return new alter_sentry_role_grant_privilege_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TAlterSentryRoleGrantPrivilegeRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TAlterSentryRoleGrantPrivilegeRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TAlterSentryRoleGrantPrivilegeRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_grant_privilege_args) |
| return this.equals((alter_sentry_role_grant_privilege_args)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_grant_privilege_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_grant_privilege_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_grant_privilege_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_grant_privilege_argsStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_grant_privilege_argsStandardScheme getScheme() { |
| return new alter_sentry_role_grant_privilege_argsStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_grant_privilege_argsStandardScheme extends StandardScheme<alter_sentry_role_grant_privilege_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_grant_privilege_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TAlterSentryRoleGrantPrivilegeRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_grant_privilege_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_grant_privilege_argsTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_grant_privilege_argsTupleScheme getScheme() { |
| return new alter_sentry_role_grant_privilege_argsTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_grant_privilege_argsTupleScheme extends TupleScheme<alter_sentry_role_grant_privilege_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_grant_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_grant_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TAlterSentryRoleGrantPrivilegeRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_grant_privilege_result implements org.apache.thrift.TBase<alter_sentry_role_grant_privilege_result, alter_sentry_role_grant_privilege_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_grant_privilege_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_grant_privilege_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_grant_privilege_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_grant_privilege_resultTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleGrantPrivilegeResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleGrantPrivilegeResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_grant_privilege_result.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_grant_privilege_result() { |
| } |
| |
| public alter_sentry_role_grant_privilege_result( |
| TAlterSentryRoleGrantPrivilegeResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_grant_privilege_result(alter_sentry_role_grant_privilege_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TAlterSentryRoleGrantPrivilegeResponse(other.success); |
| } |
| } |
| |
| public alter_sentry_role_grant_privilege_result deepCopy() { |
| return new alter_sentry_role_grant_privilege_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TAlterSentryRoleGrantPrivilegeResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TAlterSentryRoleGrantPrivilegeResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TAlterSentryRoleGrantPrivilegeResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_grant_privilege_result) |
| return this.equals((alter_sentry_role_grant_privilege_result)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_grant_privilege_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_grant_privilege_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_grant_privilege_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_grant_privilege_resultStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_grant_privilege_resultStandardScheme getScheme() { |
| return new alter_sentry_role_grant_privilege_resultStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_grant_privilege_resultStandardScheme extends StandardScheme<alter_sentry_role_grant_privilege_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_grant_privilege_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TAlterSentryRoleGrantPrivilegeResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_grant_privilege_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_grant_privilege_resultTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_grant_privilege_resultTupleScheme getScheme() { |
| return new alter_sentry_role_grant_privilege_resultTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_grant_privilege_resultTupleScheme extends TupleScheme<alter_sentry_role_grant_privilege_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_grant_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_grant_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TAlterSentryRoleGrantPrivilegeResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_revoke_privilege_args implements org.apache.thrift.TBase<alter_sentry_role_revoke_privilege_args, alter_sentry_role_revoke_privilege_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_revoke_privilege_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_revoke_privilege_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_revoke_privilege_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_revoke_privilege_argsTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleRevokePrivilegeRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleRevokePrivilegeRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_revoke_privilege_args.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_revoke_privilege_args() { |
| } |
| |
| public alter_sentry_role_revoke_privilege_args( |
| TAlterSentryRoleRevokePrivilegeRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_revoke_privilege_args(alter_sentry_role_revoke_privilege_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TAlterSentryRoleRevokePrivilegeRequest(other.request); |
| } |
| } |
| |
| public alter_sentry_role_revoke_privilege_args deepCopy() { |
| return new alter_sentry_role_revoke_privilege_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TAlterSentryRoleRevokePrivilegeRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TAlterSentryRoleRevokePrivilegeRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TAlterSentryRoleRevokePrivilegeRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_revoke_privilege_args) |
| return this.equals((alter_sentry_role_revoke_privilege_args)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_revoke_privilege_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_revoke_privilege_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_revoke_privilege_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_argsStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_revoke_privilege_argsStandardScheme getScheme() { |
| return new alter_sentry_role_revoke_privilege_argsStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_argsStandardScheme extends StandardScheme<alter_sentry_role_revoke_privilege_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_revoke_privilege_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TAlterSentryRoleRevokePrivilegeRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_revoke_privilege_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_argsTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_revoke_privilege_argsTupleScheme getScheme() { |
| return new alter_sentry_role_revoke_privilege_argsTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_argsTupleScheme extends TupleScheme<alter_sentry_role_revoke_privilege_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_revoke_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_revoke_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TAlterSentryRoleRevokePrivilegeRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_revoke_privilege_result implements org.apache.thrift.TBase<alter_sentry_role_revoke_privilege_result, alter_sentry_role_revoke_privilege_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_revoke_privilege_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_revoke_privilege_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_revoke_privilege_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_revoke_privilege_resultTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleRevokePrivilegeResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleRevokePrivilegeResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_revoke_privilege_result.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_revoke_privilege_result() { |
| } |
| |
| public alter_sentry_role_revoke_privilege_result( |
| TAlterSentryRoleRevokePrivilegeResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_revoke_privilege_result(alter_sentry_role_revoke_privilege_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TAlterSentryRoleRevokePrivilegeResponse(other.success); |
| } |
| } |
| |
| public alter_sentry_role_revoke_privilege_result deepCopy() { |
| return new alter_sentry_role_revoke_privilege_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TAlterSentryRoleRevokePrivilegeResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TAlterSentryRoleRevokePrivilegeResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TAlterSentryRoleRevokePrivilegeResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_revoke_privilege_result) |
| return this.equals((alter_sentry_role_revoke_privilege_result)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_revoke_privilege_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_revoke_privilege_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_revoke_privilege_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_resultStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_revoke_privilege_resultStandardScheme getScheme() { |
| return new alter_sentry_role_revoke_privilege_resultStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_resultStandardScheme extends StandardScheme<alter_sentry_role_revoke_privilege_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_revoke_privilege_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TAlterSentryRoleRevokePrivilegeResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_revoke_privilege_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_resultTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_revoke_privilege_resultTupleScheme getScheme() { |
| return new alter_sentry_role_revoke_privilege_resultTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_revoke_privilege_resultTupleScheme extends TupleScheme<alter_sentry_role_revoke_privilege_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_revoke_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_revoke_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TAlterSentryRoleRevokePrivilegeResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_add_groups_args implements org.apache.thrift.TBase<alter_sentry_role_add_groups_args, alter_sentry_role_add_groups_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_add_groups_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_add_groups_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_add_groups_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_add_groups_argsTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleAddGroupsRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleAddGroupsRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_add_groups_args.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_add_groups_args() { |
| } |
| |
| public alter_sentry_role_add_groups_args( |
| TAlterSentryRoleAddGroupsRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_add_groups_args(alter_sentry_role_add_groups_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TAlterSentryRoleAddGroupsRequest(other.request); |
| } |
| } |
| |
| public alter_sentry_role_add_groups_args deepCopy() { |
| return new alter_sentry_role_add_groups_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TAlterSentryRoleAddGroupsRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TAlterSentryRoleAddGroupsRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TAlterSentryRoleAddGroupsRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_add_groups_args) |
| return this.equals((alter_sentry_role_add_groups_args)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_add_groups_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_add_groups_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_add_groups_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_add_groups_argsStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_groups_argsStandardScheme getScheme() { |
| return new alter_sentry_role_add_groups_argsStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_groups_argsStandardScheme extends StandardScheme<alter_sentry_role_add_groups_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_add_groups_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TAlterSentryRoleAddGroupsRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_add_groups_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_add_groups_argsTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_groups_argsTupleScheme getScheme() { |
| return new alter_sentry_role_add_groups_argsTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_groups_argsTupleScheme extends TupleScheme<alter_sentry_role_add_groups_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_groups_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_groups_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TAlterSentryRoleAddGroupsRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_add_groups_result implements org.apache.thrift.TBase<alter_sentry_role_add_groups_result, alter_sentry_role_add_groups_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_add_groups_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_add_groups_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_add_groups_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_add_groups_resultTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleAddGroupsResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleAddGroupsResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_add_groups_result.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_add_groups_result() { |
| } |
| |
| public alter_sentry_role_add_groups_result( |
| TAlterSentryRoleAddGroupsResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_add_groups_result(alter_sentry_role_add_groups_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TAlterSentryRoleAddGroupsResponse(other.success); |
| } |
| } |
| |
| public alter_sentry_role_add_groups_result deepCopy() { |
| return new alter_sentry_role_add_groups_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TAlterSentryRoleAddGroupsResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TAlterSentryRoleAddGroupsResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TAlterSentryRoleAddGroupsResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_add_groups_result) |
| return this.equals((alter_sentry_role_add_groups_result)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_add_groups_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_add_groups_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_add_groups_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_add_groups_resultStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_groups_resultStandardScheme getScheme() { |
| return new alter_sentry_role_add_groups_resultStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_groups_resultStandardScheme extends StandardScheme<alter_sentry_role_add_groups_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_add_groups_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TAlterSentryRoleAddGroupsResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_add_groups_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_add_groups_resultTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_groups_resultTupleScheme getScheme() { |
| return new alter_sentry_role_add_groups_resultTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_groups_resultTupleScheme extends TupleScheme<alter_sentry_role_add_groups_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_groups_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_groups_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TAlterSentryRoleAddGroupsResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_delete_groups_args implements org.apache.thrift.TBase<alter_sentry_role_delete_groups_args, alter_sentry_role_delete_groups_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_delete_groups_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_delete_groups_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_delete_groups_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_delete_groups_argsTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleDeleteGroupsRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleDeleteGroupsRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_delete_groups_args.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_delete_groups_args() { |
| } |
| |
| public alter_sentry_role_delete_groups_args( |
| TAlterSentryRoleDeleteGroupsRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_delete_groups_args(alter_sentry_role_delete_groups_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TAlterSentryRoleDeleteGroupsRequest(other.request); |
| } |
| } |
| |
| public alter_sentry_role_delete_groups_args deepCopy() { |
| return new alter_sentry_role_delete_groups_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TAlterSentryRoleDeleteGroupsRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TAlterSentryRoleDeleteGroupsRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TAlterSentryRoleDeleteGroupsRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_delete_groups_args) |
| return this.equals((alter_sentry_role_delete_groups_args)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_delete_groups_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_delete_groups_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_delete_groups_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_groups_argsStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_groups_argsStandardScheme getScheme() { |
| return new alter_sentry_role_delete_groups_argsStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_groups_argsStandardScheme extends StandardScheme<alter_sentry_role_delete_groups_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_delete_groups_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TAlterSentryRoleDeleteGroupsRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_delete_groups_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_delete_groups_argsTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_groups_argsTupleScheme getScheme() { |
| return new alter_sentry_role_delete_groups_argsTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_groups_argsTupleScheme extends TupleScheme<alter_sentry_role_delete_groups_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_groups_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_groups_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TAlterSentryRoleDeleteGroupsRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_delete_groups_result implements org.apache.thrift.TBase<alter_sentry_role_delete_groups_result, alter_sentry_role_delete_groups_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_delete_groups_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_delete_groups_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_delete_groups_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_delete_groups_resultTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleDeleteGroupsResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleDeleteGroupsResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_delete_groups_result.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_delete_groups_result() { |
| } |
| |
| public alter_sentry_role_delete_groups_result( |
| TAlterSentryRoleDeleteGroupsResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_delete_groups_result(alter_sentry_role_delete_groups_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TAlterSentryRoleDeleteGroupsResponse(other.success); |
| } |
| } |
| |
| public alter_sentry_role_delete_groups_result deepCopy() { |
| return new alter_sentry_role_delete_groups_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TAlterSentryRoleDeleteGroupsResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TAlterSentryRoleDeleteGroupsResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TAlterSentryRoleDeleteGroupsResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_delete_groups_result) |
| return this.equals((alter_sentry_role_delete_groups_result)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_delete_groups_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_delete_groups_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_delete_groups_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_groups_resultStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_groups_resultStandardScheme getScheme() { |
| return new alter_sentry_role_delete_groups_resultStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_groups_resultStandardScheme extends StandardScheme<alter_sentry_role_delete_groups_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_delete_groups_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TAlterSentryRoleDeleteGroupsResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_delete_groups_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_delete_groups_resultTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_groups_resultTupleScheme getScheme() { |
| return new alter_sentry_role_delete_groups_resultTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_groups_resultTupleScheme extends TupleScheme<alter_sentry_role_delete_groups_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_groups_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_groups_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TAlterSentryRoleDeleteGroupsResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_add_users_args implements org.apache.thrift.TBase<alter_sentry_role_add_users_args, alter_sentry_role_add_users_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_add_users_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_add_users_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_add_users_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_add_users_argsTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleAddUsersRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleAddUsersRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_add_users_args.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_add_users_args() { |
| } |
| |
| public alter_sentry_role_add_users_args( |
| TAlterSentryRoleAddUsersRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_add_users_args(alter_sentry_role_add_users_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TAlterSentryRoleAddUsersRequest(other.request); |
| } |
| } |
| |
| public alter_sentry_role_add_users_args deepCopy() { |
| return new alter_sentry_role_add_users_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TAlterSentryRoleAddUsersRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TAlterSentryRoleAddUsersRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TAlterSentryRoleAddUsersRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_add_users_args) |
| return this.equals((alter_sentry_role_add_users_args)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_add_users_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_add_users_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_add_users_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_add_users_argsStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_users_argsStandardScheme getScheme() { |
| return new alter_sentry_role_add_users_argsStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_users_argsStandardScheme extends StandardScheme<alter_sentry_role_add_users_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_add_users_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TAlterSentryRoleAddUsersRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_add_users_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_add_users_argsTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_users_argsTupleScheme getScheme() { |
| return new alter_sentry_role_add_users_argsTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_users_argsTupleScheme extends TupleScheme<alter_sentry_role_add_users_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_users_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_users_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TAlterSentryRoleAddUsersRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_add_users_result implements org.apache.thrift.TBase<alter_sentry_role_add_users_result, alter_sentry_role_add_users_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_add_users_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_add_users_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_add_users_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_add_users_resultTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleAddUsersResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleAddUsersResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_add_users_result.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_add_users_result() { |
| } |
| |
| public alter_sentry_role_add_users_result( |
| TAlterSentryRoleAddUsersResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_add_users_result(alter_sentry_role_add_users_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TAlterSentryRoleAddUsersResponse(other.success); |
| } |
| } |
| |
| public alter_sentry_role_add_users_result deepCopy() { |
| return new alter_sentry_role_add_users_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TAlterSentryRoleAddUsersResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TAlterSentryRoleAddUsersResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TAlterSentryRoleAddUsersResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_add_users_result) |
| return this.equals((alter_sentry_role_add_users_result)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_add_users_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_add_users_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_add_users_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_add_users_resultStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_users_resultStandardScheme getScheme() { |
| return new alter_sentry_role_add_users_resultStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_users_resultStandardScheme extends StandardScheme<alter_sentry_role_add_users_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_add_users_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TAlterSentryRoleAddUsersResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_add_users_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_add_users_resultTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_add_users_resultTupleScheme getScheme() { |
| return new alter_sentry_role_add_users_resultTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_add_users_resultTupleScheme extends TupleScheme<alter_sentry_role_add_users_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_users_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_add_users_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TAlterSentryRoleAddUsersResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_delete_users_args implements org.apache.thrift.TBase<alter_sentry_role_delete_users_args, alter_sentry_role_delete_users_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_delete_users_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_delete_users_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_delete_users_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_delete_users_argsTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleDeleteUsersRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleDeleteUsersRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_delete_users_args.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_delete_users_args() { |
| } |
| |
| public alter_sentry_role_delete_users_args( |
| TAlterSentryRoleDeleteUsersRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_delete_users_args(alter_sentry_role_delete_users_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TAlterSentryRoleDeleteUsersRequest(other.request); |
| } |
| } |
| |
| public alter_sentry_role_delete_users_args deepCopy() { |
| return new alter_sentry_role_delete_users_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TAlterSentryRoleDeleteUsersRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TAlterSentryRoleDeleteUsersRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TAlterSentryRoleDeleteUsersRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_delete_users_args) |
| return this.equals((alter_sentry_role_delete_users_args)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_delete_users_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_delete_users_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_delete_users_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_users_argsStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_users_argsStandardScheme getScheme() { |
| return new alter_sentry_role_delete_users_argsStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_users_argsStandardScheme extends StandardScheme<alter_sentry_role_delete_users_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_delete_users_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TAlterSentryRoleDeleteUsersRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_delete_users_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_delete_users_argsTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_users_argsTupleScheme getScheme() { |
| return new alter_sentry_role_delete_users_argsTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_users_argsTupleScheme extends TupleScheme<alter_sentry_role_delete_users_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_users_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_users_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TAlterSentryRoleDeleteUsersRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class alter_sentry_role_delete_users_result implements org.apache.thrift.TBase<alter_sentry_role_delete_users_result, alter_sentry_role_delete_users_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_sentry_role_delete_users_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_sentry_role_delete_users_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new alter_sentry_role_delete_users_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new alter_sentry_role_delete_users_resultTupleSchemeFactory()); |
| } |
| |
| private TAlterSentryRoleDeleteUsersResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAlterSentryRoleDeleteUsersResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_sentry_role_delete_users_result.class, metaDataMap); |
| } |
| |
| public alter_sentry_role_delete_users_result() { |
| } |
| |
| public alter_sentry_role_delete_users_result( |
| TAlterSentryRoleDeleteUsersResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public alter_sentry_role_delete_users_result(alter_sentry_role_delete_users_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TAlterSentryRoleDeleteUsersResponse(other.success); |
| } |
| } |
| |
| public alter_sentry_role_delete_users_result deepCopy() { |
| return new alter_sentry_role_delete_users_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TAlterSentryRoleDeleteUsersResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TAlterSentryRoleDeleteUsersResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TAlterSentryRoleDeleteUsersResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof alter_sentry_role_delete_users_result) |
| return this.equals((alter_sentry_role_delete_users_result)that); |
| return false; |
| } |
| |
| public boolean equals(alter_sentry_role_delete_users_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(alter_sentry_role_delete_users_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("alter_sentry_role_delete_users_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_users_resultStandardSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_users_resultStandardScheme getScheme() { |
| return new alter_sentry_role_delete_users_resultStandardScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_users_resultStandardScheme extends StandardScheme<alter_sentry_role_delete_users_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, alter_sentry_role_delete_users_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TAlterSentryRoleDeleteUsersResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, alter_sentry_role_delete_users_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class alter_sentry_role_delete_users_resultTupleSchemeFactory implements SchemeFactory { |
| public alter_sentry_role_delete_users_resultTupleScheme getScheme() { |
| return new alter_sentry_role_delete_users_resultTupleScheme(); |
| } |
| } |
| |
| private static class alter_sentry_role_delete_users_resultTupleScheme extends TupleScheme<alter_sentry_role_delete_users_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_users_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, alter_sentry_role_delete_users_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TAlterSentryRoleDeleteUsersResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_roles_by_group_args implements org.apache.thrift.TBase<list_sentry_roles_by_group_args, list_sentry_roles_by_group_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_roles_by_group_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_roles_by_group_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_roles_by_group_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_roles_by_group_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryRolesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryRolesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_roles_by_group_args.class, metaDataMap); |
| } |
| |
| public list_sentry_roles_by_group_args() { |
| } |
| |
| public list_sentry_roles_by_group_args( |
| TListSentryRolesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_roles_by_group_args(list_sentry_roles_by_group_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryRolesRequest(other.request); |
| } |
| } |
| |
| public list_sentry_roles_by_group_args deepCopy() { |
| return new list_sentry_roles_by_group_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryRolesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryRolesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryRolesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_roles_by_group_args) |
| return this.equals((list_sentry_roles_by_group_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_roles_by_group_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_roles_by_group_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_roles_by_group_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_roles_by_group_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_group_argsStandardScheme getScheme() { |
| return new list_sentry_roles_by_group_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_group_argsStandardScheme extends StandardScheme<list_sentry_roles_by_group_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_roles_by_group_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryRolesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_roles_by_group_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_roles_by_group_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_group_argsTupleScheme getScheme() { |
| return new list_sentry_roles_by_group_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_group_argsTupleScheme extends TupleScheme<list_sentry_roles_by_group_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_group_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_group_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryRolesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_roles_by_group_result implements org.apache.thrift.TBase<list_sentry_roles_by_group_result, list_sentry_roles_by_group_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_roles_by_group_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_roles_by_group_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_roles_by_group_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_roles_by_group_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryRolesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryRolesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_roles_by_group_result.class, metaDataMap); |
| } |
| |
| public list_sentry_roles_by_group_result() { |
| } |
| |
| public list_sentry_roles_by_group_result( |
| TListSentryRolesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_roles_by_group_result(list_sentry_roles_by_group_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryRolesResponse(other.success); |
| } |
| } |
| |
| public list_sentry_roles_by_group_result deepCopy() { |
| return new list_sentry_roles_by_group_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryRolesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryRolesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryRolesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_roles_by_group_result) |
| return this.equals((list_sentry_roles_by_group_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_roles_by_group_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_roles_by_group_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_roles_by_group_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_roles_by_group_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_group_resultStandardScheme getScheme() { |
| return new list_sentry_roles_by_group_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_group_resultStandardScheme extends StandardScheme<list_sentry_roles_by_group_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_roles_by_group_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryRolesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_roles_by_group_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_roles_by_group_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_group_resultTupleScheme getScheme() { |
| return new list_sentry_roles_by_group_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_group_resultTupleScheme extends TupleScheme<list_sentry_roles_by_group_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_group_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_group_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryRolesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_roles_by_user_args implements org.apache.thrift.TBase<list_sentry_roles_by_user_args, list_sentry_roles_by_user_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_roles_by_user_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_roles_by_user_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_roles_by_user_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_roles_by_user_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryRolesForUserRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryRolesForUserRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_roles_by_user_args.class, metaDataMap); |
| } |
| |
| public list_sentry_roles_by_user_args() { |
| } |
| |
| public list_sentry_roles_by_user_args( |
| TListSentryRolesForUserRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_roles_by_user_args(list_sentry_roles_by_user_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryRolesForUserRequest(other.request); |
| } |
| } |
| |
| public list_sentry_roles_by_user_args deepCopy() { |
| return new list_sentry_roles_by_user_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryRolesForUserRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryRolesForUserRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryRolesForUserRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_roles_by_user_args) |
| return this.equals((list_sentry_roles_by_user_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_roles_by_user_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_roles_by_user_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_roles_by_user_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_roles_by_user_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_user_argsStandardScheme getScheme() { |
| return new list_sentry_roles_by_user_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_user_argsStandardScheme extends StandardScheme<list_sentry_roles_by_user_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_roles_by_user_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryRolesForUserRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_roles_by_user_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_roles_by_user_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_user_argsTupleScheme getScheme() { |
| return new list_sentry_roles_by_user_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_user_argsTupleScheme extends TupleScheme<list_sentry_roles_by_user_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_user_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_user_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryRolesForUserRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_roles_by_user_result implements org.apache.thrift.TBase<list_sentry_roles_by_user_result, list_sentry_roles_by_user_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_roles_by_user_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_roles_by_user_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_roles_by_user_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_roles_by_user_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryRolesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryRolesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_roles_by_user_result.class, metaDataMap); |
| } |
| |
| public list_sentry_roles_by_user_result() { |
| } |
| |
| public list_sentry_roles_by_user_result( |
| TListSentryRolesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_roles_by_user_result(list_sentry_roles_by_user_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryRolesResponse(other.success); |
| } |
| } |
| |
| public list_sentry_roles_by_user_result deepCopy() { |
| return new list_sentry_roles_by_user_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryRolesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryRolesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryRolesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_roles_by_user_result) |
| return this.equals((list_sentry_roles_by_user_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_roles_by_user_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_roles_by_user_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_roles_by_user_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_roles_by_user_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_user_resultStandardScheme getScheme() { |
| return new list_sentry_roles_by_user_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_user_resultStandardScheme extends StandardScheme<list_sentry_roles_by_user_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_roles_by_user_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryRolesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_roles_by_user_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_roles_by_user_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_roles_by_user_resultTupleScheme getScheme() { |
| return new list_sentry_roles_by_user_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_roles_by_user_resultTupleScheme extends TupleScheme<list_sentry_roles_by_user_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_user_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_roles_by_user_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryRolesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_role_args implements org.apache.thrift.TBase<list_sentry_privileges_by_role_args, list_sentry_privileges_by_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_role_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_role_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_role_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_role_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_role_args.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_role_args() { |
| } |
| |
| public list_sentry_privileges_by_role_args( |
| TListSentryPrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_role_args(list_sentry_privileges_by_role_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryPrivilegesRequest(other.request); |
| } |
| } |
| |
| public list_sentry_privileges_by_role_args deepCopy() { |
| return new list_sentry_privileges_by_role_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryPrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryPrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryPrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_role_args) |
| return this.equals((list_sentry_privileges_by_role_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_role_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_role_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_role_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_role_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_role_argsStandardScheme getScheme() { |
| return new list_sentry_privileges_by_role_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_role_argsStandardScheme extends StandardScheme<list_sentry_privileges_by_role_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_role_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_role_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_role_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_role_argsTupleScheme getScheme() { |
| return new list_sentry_privileges_by_role_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_role_argsTupleScheme extends TupleScheme<list_sentry_privileges_by_role_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_role_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_role_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_role_result implements org.apache.thrift.TBase<list_sentry_privileges_by_role_result, list_sentry_privileges_by_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_role_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_role_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_role_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_role_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_role_result.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_role_result() { |
| } |
| |
| public list_sentry_privileges_by_role_result( |
| TListSentryPrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_role_result(list_sentry_privileges_by_role_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryPrivilegesResponse(other.success); |
| } |
| } |
| |
| public list_sentry_privileges_by_role_result deepCopy() { |
| return new list_sentry_privileges_by_role_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryPrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryPrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryPrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_role_result) |
| return this.equals((list_sentry_privileges_by_role_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_role_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_role_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_role_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_role_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_role_resultStandardScheme getScheme() { |
| return new list_sentry_privileges_by_role_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_role_resultStandardScheme extends StandardScheme<list_sentry_privileges_by_role_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_role_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_role_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_role_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_role_resultTupleScheme getScheme() { |
| return new list_sentry_privileges_by_role_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_role_resultTupleScheme extends TupleScheme<list_sentry_privileges_by_role_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_role_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_role_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_user_args implements org.apache.thrift.TBase<list_sentry_privileges_by_user_args, list_sentry_privileges_by_user_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_user_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_user_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_user_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_user_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_user_args.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_user_args() { |
| } |
| |
| public list_sentry_privileges_by_user_args( |
| TListSentryPrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_user_args(list_sentry_privileges_by_user_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryPrivilegesRequest(other.request); |
| } |
| } |
| |
| public list_sentry_privileges_by_user_args deepCopy() { |
| return new list_sentry_privileges_by_user_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryPrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryPrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryPrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_user_args) |
| return this.equals((list_sentry_privileges_by_user_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_user_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_user_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_user_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_argsStandardScheme getScheme() { |
| return new list_sentry_privileges_by_user_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_argsStandardScheme extends StandardScheme<list_sentry_privileges_by_user_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_user_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_user_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_user_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_argsTupleScheme getScheme() { |
| return new list_sentry_privileges_by_user_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_argsTupleScheme extends TupleScheme<list_sentry_privileges_by_user_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_user_result implements org.apache.thrift.TBase<list_sentry_privileges_by_user_result, list_sentry_privileges_by_user_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_user_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_user_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_user_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_user_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_user_result.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_user_result() { |
| } |
| |
| public list_sentry_privileges_by_user_result( |
| TListSentryPrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_user_result(list_sentry_privileges_by_user_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryPrivilegesResponse(other.success); |
| } |
| } |
| |
| public list_sentry_privileges_by_user_result deepCopy() { |
| return new list_sentry_privileges_by_user_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryPrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryPrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryPrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_user_result) |
| return this.equals((list_sentry_privileges_by_user_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_user_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_user_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_user_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_resultStandardScheme getScheme() { |
| return new list_sentry_privileges_by_user_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_resultStandardScheme extends StandardScheme<list_sentry_privileges_by_user_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_user_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_user_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_user_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_resultTupleScheme getScheme() { |
| return new list_sentry_privileges_by_user_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_resultTupleScheme extends TupleScheme<list_sentry_privileges_by_user_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_user_and_itsgroups_args implements org.apache.thrift.TBase<list_sentry_privileges_by_user_and_itsgroups_args, list_sentry_privileges_by_user_and_itsgroups_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_user_and_itsgroups_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_user_and_itsgroups_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_user_and_itsgroups_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_user_and_itsgroups_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_user_and_itsgroups_args.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_args() { |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_args( |
| TListSentryPrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_user_and_itsgroups_args(list_sentry_privileges_by_user_and_itsgroups_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryPrivilegesRequest(other.request); |
| } |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_args deepCopy() { |
| return new list_sentry_privileges_by_user_and_itsgroups_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryPrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryPrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryPrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_user_and_itsgroups_args) |
| return this.equals((list_sentry_privileges_by_user_and_itsgroups_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_user_and_itsgroups_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_user_and_itsgroups_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_user_and_itsgroups_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_and_itsgroups_argsStandardScheme getScheme() { |
| return new list_sentry_privileges_by_user_and_itsgroups_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_argsStandardScheme extends StandardScheme<list_sentry_privileges_by_user_and_itsgroups_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_user_and_itsgroups_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_user_and_itsgroups_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_and_itsgroups_argsTupleScheme getScheme() { |
| return new list_sentry_privileges_by_user_and_itsgroups_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_argsTupleScheme extends TupleScheme<list_sentry_privileges_by_user_and_itsgroups_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_and_itsgroups_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_and_itsgroups_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_user_and_itsgroups_result implements org.apache.thrift.TBase<list_sentry_privileges_by_user_and_itsgroups_result, list_sentry_privileges_by_user_and_itsgroups_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_user_and_itsgroups_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_user_and_itsgroups_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_user_and_itsgroups_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_user_and_itsgroups_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_user_and_itsgroups_result.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_result() { |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_result( |
| TListSentryPrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_user_and_itsgroups_result(list_sentry_privileges_by_user_and_itsgroups_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryPrivilegesResponse(other.success); |
| } |
| } |
| |
| public list_sentry_privileges_by_user_and_itsgroups_result deepCopy() { |
| return new list_sentry_privileges_by_user_and_itsgroups_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryPrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryPrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryPrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_user_and_itsgroups_result) |
| return this.equals((list_sentry_privileges_by_user_and_itsgroups_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_user_and_itsgroups_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_user_and_itsgroups_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_user_and_itsgroups_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_and_itsgroups_resultStandardScheme getScheme() { |
| return new list_sentry_privileges_by_user_and_itsgroups_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_resultStandardScheme extends StandardScheme<list_sentry_privileges_by_user_and_itsgroups_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_user_and_itsgroups_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_user_and_itsgroups_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_user_and_itsgroups_resultTupleScheme getScheme() { |
| return new list_sentry_privileges_by_user_and_itsgroups_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_user_and_itsgroups_resultTupleScheme extends TupleScheme<list_sentry_privileges_by_user_and_itsgroups_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_and_itsgroups_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_user_and_itsgroups_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_for_provider_args implements org.apache.thrift.TBase<list_sentry_privileges_for_provider_args, list_sentry_privileges_for_provider_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_for_provider_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_for_provider_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_for_provider_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_for_provider_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesForProviderRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesForProviderRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_for_provider_args.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_for_provider_args() { |
| } |
| |
| public list_sentry_privileges_for_provider_args( |
| TListSentryPrivilegesForProviderRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_for_provider_args(list_sentry_privileges_for_provider_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryPrivilegesForProviderRequest(other.request); |
| } |
| } |
| |
| public list_sentry_privileges_for_provider_args deepCopy() { |
| return new list_sentry_privileges_for_provider_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryPrivilegesForProviderRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryPrivilegesForProviderRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryPrivilegesForProviderRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_for_provider_args) |
| return this.equals((list_sentry_privileges_for_provider_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_for_provider_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_for_provider_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_for_provider_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_for_provider_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_for_provider_argsStandardScheme getScheme() { |
| return new list_sentry_privileges_for_provider_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_for_provider_argsStandardScheme extends StandardScheme<list_sentry_privileges_for_provider_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_for_provider_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryPrivilegesForProviderRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_for_provider_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_for_provider_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_for_provider_argsTupleScheme getScheme() { |
| return new list_sentry_privileges_for_provider_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_for_provider_argsTupleScheme extends TupleScheme<list_sentry_privileges_for_provider_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_for_provider_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_for_provider_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryPrivilegesForProviderRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_for_provider_result implements org.apache.thrift.TBase<list_sentry_privileges_for_provider_result, list_sentry_privileges_for_provider_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_for_provider_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_for_provider_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_for_provider_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_for_provider_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesForProviderResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesForProviderResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_for_provider_result.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_for_provider_result() { |
| } |
| |
| public list_sentry_privileges_for_provider_result( |
| TListSentryPrivilegesForProviderResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_for_provider_result(list_sentry_privileges_for_provider_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryPrivilegesForProviderResponse(other.success); |
| } |
| } |
| |
| public list_sentry_privileges_for_provider_result deepCopy() { |
| return new list_sentry_privileges_for_provider_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryPrivilegesForProviderResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryPrivilegesForProviderResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryPrivilegesForProviderResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_for_provider_result) |
| return this.equals((list_sentry_privileges_for_provider_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_for_provider_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_for_provider_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_for_provider_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_for_provider_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_for_provider_resultStandardScheme getScheme() { |
| return new list_sentry_privileges_for_provider_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_for_provider_resultStandardScheme extends StandardScheme<list_sentry_privileges_for_provider_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_for_provider_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryPrivilegesForProviderResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_for_provider_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_for_provider_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_for_provider_resultTupleScheme getScheme() { |
| return new list_sentry_privileges_for_provider_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_for_provider_resultTupleScheme extends TupleScheme<list_sentry_privileges_for_provider_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_for_provider_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_for_provider_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryPrivilegesForProviderResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class drop_sentry_privilege_args implements org.apache.thrift.TBase<drop_sentry_privilege_args, drop_sentry_privilege_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_sentry_privilege_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_sentry_privilege_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new drop_sentry_privilege_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new drop_sentry_privilege_argsTupleSchemeFactory()); |
| } |
| |
| private TDropPrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDropPrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_sentry_privilege_args.class, metaDataMap); |
| } |
| |
| public drop_sentry_privilege_args() { |
| } |
| |
| public drop_sentry_privilege_args( |
| TDropPrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public drop_sentry_privilege_args(drop_sentry_privilege_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TDropPrivilegesRequest(other.request); |
| } |
| } |
| |
| public drop_sentry_privilege_args deepCopy() { |
| return new drop_sentry_privilege_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TDropPrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TDropPrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TDropPrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof drop_sentry_privilege_args) |
| return this.equals((drop_sentry_privilege_args)that); |
| return false; |
| } |
| |
| public boolean equals(drop_sentry_privilege_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(drop_sentry_privilege_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("drop_sentry_privilege_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class drop_sentry_privilege_argsStandardSchemeFactory implements SchemeFactory { |
| public drop_sentry_privilege_argsStandardScheme getScheme() { |
| return new drop_sentry_privilege_argsStandardScheme(); |
| } |
| } |
| |
| private static class drop_sentry_privilege_argsStandardScheme extends StandardScheme<drop_sentry_privilege_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, drop_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TDropPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, drop_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class drop_sentry_privilege_argsTupleSchemeFactory implements SchemeFactory { |
| public drop_sentry_privilege_argsTupleScheme getScheme() { |
| return new drop_sentry_privilege_argsTupleScheme(); |
| } |
| } |
| |
| private static class drop_sentry_privilege_argsTupleScheme extends TupleScheme<drop_sentry_privilege_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, drop_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, drop_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TDropPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class drop_sentry_privilege_result implements org.apache.thrift.TBase<drop_sentry_privilege_result, drop_sentry_privilege_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_sentry_privilege_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_sentry_privilege_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new drop_sentry_privilege_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new drop_sentry_privilege_resultTupleSchemeFactory()); |
| } |
| |
| private TDropPrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDropPrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_sentry_privilege_result.class, metaDataMap); |
| } |
| |
| public drop_sentry_privilege_result() { |
| } |
| |
| public drop_sentry_privilege_result( |
| TDropPrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public drop_sentry_privilege_result(drop_sentry_privilege_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TDropPrivilegesResponse(other.success); |
| } |
| } |
| |
| public drop_sentry_privilege_result deepCopy() { |
| return new drop_sentry_privilege_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TDropPrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TDropPrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TDropPrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof drop_sentry_privilege_result) |
| return this.equals((drop_sentry_privilege_result)that); |
| return false; |
| } |
| |
| public boolean equals(drop_sentry_privilege_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(drop_sentry_privilege_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("drop_sentry_privilege_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class drop_sentry_privilege_resultStandardSchemeFactory implements SchemeFactory { |
| public drop_sentry_privilege_resultStandardScheme getScheme() { |
| return new drop_sentry_privilege_resultStandardScheme(); |
| } |
| } |
| |
| private static class drop_sentry_privilege_resultStandardScheme extends StandardScheme<drop_sentry_privilege_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, drop_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TDropPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, drop_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class drop_sentry_privilege_resultTupleSchemeFactory implements SchemeFactory { |
| public drop_sentry_privilege_resultTupleScheme getScheme() { |
| return new drop_sentry_privilege_resultTupleScheme(); |
| } |
| } |
| |
| private static class drop_sentry_privilege_resultTupleScheme extends TupleScheme<drop_sentry_privilege_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, drop_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, drop_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TDropPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class rename_sentry_privilege_args implements org.apache.thrift.TBase<rename_sentry_privilege_args, rename_sentry_privilege_args._Fields>, java.io.Serializable, Cloneable, Comparable<rename_sentry_privilege_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_sentry_privilege_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new rename_sentry_privilege_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new rename_sentry_privilege_argsTupleSchemeFactory()); |
| } |
| |
| private TRenamePrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRenamePrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_sentry_privilege_args.class, metaDataMap); |
| } |
| |
| public rename_sentry_privilege_args() { |
| } |
| |
| public rename_sentry_privilege_args( |
| TRenamePrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public rename_sentry_privilege_args(rename_sentry_privilege_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TRenamePrivilegesRequest(other.request); |
| } |
| } |
| |
| public rename_sentry_privilege_args deepCopy() { |
| return new rename_sentry_privilege_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TRenamePrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TRenamePrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TRenamePrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof rename_sentry_privilege_args) |
| return this.equals((rename_sentry_privilege_args)that); |
| return false; |
| } |
| |
| public boolean equals(rename_sentry_privilege_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(rename_sentry_privilege_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("rename_sentry_privilege_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class rename_sentry_privilege_argsStandardSchemeFactory implements SchemeFactory { |
| public rename_sentry_privilege_argsStandardScheme getScheme() { |
| return new rename_sentry_privilege_argsStandardScheme(); |
| } |
| } |
| |
| private static class rename_sentry_privilege_argsStandardScheme extends StandardScheme<rename_sentry_privilege_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, rename_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TRenamePrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, rename_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class rename_sentry_privilege_argsTupleSchemeFactory implements SchemeFactory { |
| public rename_sentry_privilege_argsTupleScheme getScheme() { |
| return new rename_sentry_privilege_argsTupleScheme(); |
| } |
| } |
| |
| private static class rename_sentry_privilege_argsTupleScheme extends TupleScheme<rename_sentry_privilege_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, rename_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, rename_sentry_privilege_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TRenamePrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class rename_sentry_privilege_result implements org.apache.thrift.TBase<rename_sentry_privilege_result, rename_sentry_privilege_result._Fields>, java.io.Serializable, Cloneable, Comparable<rename_sentry_privilege_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_sentry_privilege_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new rename_sentry_privilege_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new rename_sentry_privilege_resultTupleSchemeFactory()); |
| } |
| |
| private TRenamePrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRenamePrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_sentry_privilege_result.class, metaDataMap); |
| } |
| |
| public rename_sentry_privilege_result() { |
| } |
| |
| public rename_sentry_privilege_result( |
| TRenamePrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public rename_sentry_privilege_result(rename_sentry_privilege_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TRenamePrivilegesResponse(other.success); |
| } |
| } |
| |
| public rename_sentry_privilege_result deepCopy() { |
| return new rename_sentry_privilege_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TRenamePrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TRenamePrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TRenamePrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof rename_sentry_privilege_result) |
| return this.equals((rename_sentry_privilege_result)that); |
| return false; |
| } |
| |
| public boolean equals(rename_sentry_privilege_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(rename_sentry_privilege_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("rename_sentry_privilege_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class rename_sentry_privilege_resultStandardSchemeFactory implements SchemeFactory { |
| public rename_sentry_privilege_resultStandardScheme getScheme() { |
| return new rename_sentry_privilege_resultStandardScheme(); |
| } |
| } |
| |
| private static class rename_sentry_privilege_resultStandardScheme extends StandardScheme<rename_sentry_privilege_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, rename_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TRenamePrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, rename_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class rename_sentry_privilege_resultTupleSchemeFactory implements SchemeFactory { |
| public rename_sentry_privilege_resultTupleScheme getScheme() { |
| return new rename_sentry_privilege_resultTupleScheme(); |
| } |
| } |
| |
| private static class rename_sentry_privilege_resultTupleScheme extends TupleScheme<rename_sentry_privilege_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, rename_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, rename_sentry_privilege_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TRenamePrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_authorizable_args implements org.apache.thrift.TBase<list_sentry_privileges_by_authorizable_args, list_sentry_privileges_by_authorizable_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_authorizable_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_authorizable_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_authorizable_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_authorizable_argsTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesByAuthRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesByAuthRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_authorizable_args.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_authorizable_args() { |
| } |
| |
| public list_sentry_privileges_by_authorizable_args( |
| TListSentryPrivilegesByAuthRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_authorizable_args(list_sentry_privileges_by_authorizable_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TListSentryPrivilegesByAuthRequest(other.request); |
| } |
| } |
| |
| public list_sentry_privileges_by_authorizable_args deepCopy() { |
| return new list_sentry_privileges_by_authorizable_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TListSentryPrivilegesByAuthRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TListSentryPrivilegesByAuthRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TListSentryPrivilegesByAuthRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_authorizable_args) |
| return this.equals((list_sentry_privileges_by_authorizable_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_authorizable_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_authorizable_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_authorizable_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_argsStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_authorizable_argsStandardScheme getScheme() { |
| return new list_sentry_privileges_by_authorizable_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_argsStandardScheme extends StandardScheme<list_sentry_privileges_by_authorizable_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_authorizable_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TListSentryPrivilegesByAuthRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_authorizable_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_argsTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_authorizable_argsTupleScheme getScheme() { |
| return new list_sentry_privileges_by_authorizable_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_argsTupleScheme extends TupleScheme<list_sentry_privileges_by_authorizable_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_authorizable_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_authorizable_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TListSentryPrivilegesByAuthRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_sentry_privileges_by_authorizable_result implements org.apache.thrift.TBase<list_sentry_privileges_by_authorizable_result, list_sentry_privileges_by_authorizable_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_sentry_privileges_by_authorizable_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_sentry_privileges_by_authorizable_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_sentry_privileges_by_authorizable_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_sentry_privileges_by_authorizable_resultTupleSchemeFactory()); |
| } |
| |
| private TListSentryPrivilegesByAuthResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesByAuthResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_authorizable_result.class, metaDataMap); |
| } |
| |
| public list_sentry_privileges_by_authorizable_result() { |
| } |
| |
| public list_sentry_privileges_by_authorizable_result( |
| TListSentryPrivilegesByAuthResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_sentry_privileges_by_authorizable_result(list_sentry_privileges_by_authorizable_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TListSentryPrivilegesByAuthResponse(other.success); |
| } |
| } |
| |
| public list_sentry_privileges_by_authorizable_result deepCopy() { |
| return new list_sentry_privileges_by_authorizable_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TListSentryPrivilegesByAuthResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TListSentryPrivilegesByAuthResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TListSentryPrivilegesByAuthResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_sentry_privileges_by_authorizable_result) |
| return this.equals((list_sentry_privileges_by_authorizable_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_sentry_privileges_by_authorizable_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_sentry_privileges_by_authorizable_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_sentry_privileges_by_authorizable_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_resultStandardSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_authorizable_resultStandardScheme getScheme() { |
| return new list_sentry_privileges_by_authorizable_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_resultStandardScheme extends StandardScheme<list_sentry_privileges_by_authorizable_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_sentry_privileges_by_authorizable_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TListSentryPrivilegesByAuthResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_sentry_privileges_by_authorizable_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_resultTupleSchemeFactory implements SchemeFactory { |
| public list_sentry_privileges_by_authorizable_resultTupleScheme getScheme() { |
| return new list_sentry_privileges_by_authorizable_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_sentry_privileges_by_authorizable_resultTupleScheme extends TupleScheme<list_sentry_privileges_by_authorizable_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_authorizable_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_sentry_privileges_by_authorizable_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TListSentryPrivilegesByAuthResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class get_sentry_config_value_args implements org.apache.thrift.TBase<get_sentry_config_value_args, get_sentry_config_value_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_sentry_config_value_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_sentry_config_value_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new get_sentry_config_value_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new get_sentry_config_value_argsTupleSchemeFactory()); |
| } |
| |
| private TSentryConfigValueRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryConfigValueRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_sentry_config_value_args.class, metaDataMap); |
| } |
| |
| public get_sentry_config_value_args() { |
| } |
| |
| public get_sentry_config_value_args( |
| TSentryConfigValueRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public get_sentry_config_value_args(get_sentry_config_value_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentryConfigValueRequest(other.request); |
| } |
| } |
| |
| public get_sentry_config_value_args deepCopy() { |
| return new get_sentry_config_value_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentryConfigValueRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentryConfigValueRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentryConfigValueRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof get_sentry_config_value_args) |
| return this.equals((get_sentry_config_value_args)that); |
| return false; |
| } |
| |
| public boolean equals(get_sentry_config_value_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(get_sentry_config_value_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("get_sentry_config_value_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class get_sentry_config_value_argsStandardSchemeFactory implements SchemeFactory { |
| public get_sentry_config_value_argsStandardScheme getScheme() { |
| return new get_sentry_config_value_argsStandardScheme(); |
| } |
| } |
| |
| private static class get_sentry_config_value_argsStandardScheme extends StandardScheme<get_sentry_config_value_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, get_sentry_config_value_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentryConfigValueRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, get_sentry_config_value_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class get_sentry_config_value_argsTupleSchemeFactory implements SchemeFactory { |
| public get_sentry_config_value_argsTupleScheme getScheme() { |
| return new get_sentry_config_value_argsTupleScheme(); |
| } |
| } |
| |
| private static class get_sentry_config_value_argsTupleScheme extends TupleScheme<get_sentry_config_value_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, get_sentry_config_value_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, get_sentry_config_value_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentryConfigValueRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class get_sentry_config_value_result implements org.apache.thrift.TBase<get_sentry_config_value_result, get_sentry_config_value_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_sentry_config_value_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_sentry_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.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new get_sentry_config_value_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new get_sentry_config_value_resultTupleSchemeFactory()); |
| } |
| |
| private TSentryConfigValueResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryConfigValueResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_sentry_config_value_result.class, metaDataMap); |
| } |
| |
| public get_sentry_config_value_result() { |
| } |
| |
| public get_sentry_config_value_result( |
| TSentryConfigValueResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public get_sentry_config_value_result(get_sentry_config_value_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentryConfigValueResponse(other.success); |
| } |
| } |
| |
| public get_sentry_config_value_result deepCopy() { |
| return new get_sentry_config_value_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentryConfigValueResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentryConfigValueResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentryConfigValueResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof get_sentry_config_value_result) |
| return this.equals((get_sentry_config_value_result)that); |
| return false; |
| } |
| |
| public boolean equals(get_sentry_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; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(get_sentry_config_value_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("get_sentry_config_value_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class get_sentry_config_value_resultStandardSchemeFactory implements SchemeFactory { |
| public get_sentry_config_value_resultStandardScheme getScheme() { |
| return new get_sentry_config_value_resultStandardScheme(); |
| } |
| } |
| |
| private static class get_sentry_config_value_resultStandardScheme extends StandardScheme<get_sentry_config_value_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, get_sentry_config_value_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentryConfigValueResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, get_sentry_config_value_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class get_sentry_config_value_resultTupleSchemeFactory implements SchemeFactory { |
| public get_sentry_config_value_resultTupleScheme getScheme() { |
| return new get_sentry_config_value_resultTupleScheme(); |
| } |
| } |
| |
| private static class get_sentry_config_value_resultTupleScheme extends TupleScheme<get_sentry_config_value_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, get_sentry_config_value_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, get_sentry_config_value_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentryConfigValueResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class export_sentry_mapping_data_args implements org.apache.thrift.TBase<export_sentry_mapping_data_args, export_sentry_mapping_data_args._Fields>, java.io.Serializable, Cloneable, Comparable<export_sentry_mapping_data_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("export_sentry_mapping_data_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new export_sentry_mapping_data_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new export_sentry_mapping_data_argsTupleSchemeFactory()); |
| } |
| |
| private TSentryExportMappingDataRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryExportMappingDataRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(export_sentry_mapping_data_args.class, metaDataMap); |
| } |
| |
| public export_sentry_mapping_data_args() { |
| } |
| |
| public export_sentry_mapping_data_args( |
| TSentryExportMappingDataRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public export_sentry_mapping_data_args(export_sentry_mapping_data_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentryExportMappingDataRequest(other.request); |
| } |
| } |
| |
| public export_sentry_mapping_data_args deepCopy() { |
| return new export_sentry_mapping_data_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentryExportMappingDataRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentryExportMappingDataRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentryExportMappingDataRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof export_sentry_mapping_data_args) |
| return this.equals((export_sentry_mapping_data_args)that); |
| return false; |
| } |
| |
| public boolean equals(export_sentry_mapping_data_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(export_sentry_mapping_data_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("export_sentry_mapping_data_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class export_sentry_mapping_data_argsStandardSchemeFactory implements SchemeFactory { |
| public export_sentry_mapping_data_argsStandardScheme getScheme() { |
| return new export_sentry_mapping_data_argsStandardScheme(); |
| } |
| } |
| |
| private static class export_sentry_mapping_data_argsStandardScheme extends StandardScheme<export_sentry_mapping_data_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, export_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentryExportMappingDataRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, export_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class export_sentry_mapping_data_argsTupleSchemeFactory implements SchemeFactory { |
| public export_sentry_mapping_data_argsTupleScheme getScheme() { |
| return new export_sentry_mapping_data_argsTupleScheme(); |
| } |
| } |
| |
| private static class export_sentry_mapping_data_argsTupleScheme extends TupleScheme<export_sentry_mapping_data_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, export_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, export_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentryExportMappingDataRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class export_sentry_mapping_data_result implements org.apache.thrift.TBase<export_sentry_mapping_data_result, export_sentry_mapping_data_result._Fields>, java.io.Serializable, Cloneable, Comparable<export_sentry_mapping_data_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("export_sentry_mapping_data_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new export_sentry_mapping_data_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new export_sentry_mapping_data_resultTupleSchemeFactory()); |
| } |
| |
| private TSentryExportMappingDataResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryExportMappingDataResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(export_sentry_mapping_data_result.class, metaDataMap); |
| } |
| |
| public export_sentry_mapping_data_result() { |
| } |
| |
| public export_sentry_mapping_data_result( |
| TSentryExportMappingDataResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public export_sentry_mapping_data_result(export_sentry_mapping_data_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentryExportMappingDataResponse(other.success); |
| } |
| } |
| |
| public export_sentry_mapping_data_result deepCopy() { |
| return new export_sentry_mapping_data_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentryExportMappingDataResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentryExportMappingDataResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentryExportMappingDataResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof export_sentry_mapping_data_result) |
| return this.equals((export_sentry_mapping_data_result)that); |
| return false; |
| } |
| |
| public boolean equals(export_sentry_mapping_data_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(export_sentry_mapping_data_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("export_sentry_mapping_data_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class export_sentry_mapping_data_resultStandardSchemeFactory implements SchemeFactory { |
| public export_sentry_mapping_data_resultStandardScheme getScheme() { |
| return new export_sentry_mapping_data_resultStandardScheme(); |
| } |
| } |
| |
| private static class export_sentry_mapping_data_resultStandardScheme extends StandardScheme<export_sentry_mapping_data_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, export_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentryExportMappingDataResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, export_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class export_sentry_mapping_data_resultTupleSchemeFactory implements SchemeFactory { |
| public export_sentry_mapping_data_resultTupleScheme getScheme() { |
| return new export_sentry_mapping_data_resultTupleScheme(); |
| } |
| } |
| |
| private static class export_sentry_mapping_data_resultTupleScheme extends TupleScheme<export_sentry_mapping_data_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, export_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, export_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentryExportMappingDataResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class import_sentry_mapping_data_args implements org.apache.thrift.TBase<import_sentry_mapping_data_args, import_sentry_mapping_data_args._Fields>, java.io.Serializable, Cloneable, Comparable<import_sentry_mapping_data_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_sentry_mapping_data_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new import_sentry_mapping_data_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new import_sentry_mapping_data_argsTupleSchemeFactory()); |
| } |
| |
| private TSentryImportMappingDataRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryImportMappingDataRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_sentry_mapping_data_args.class, metaDataMap); |
| } |
| |
| public import_sentry_mapping_data_args() { |
| } |
| |
| public import_sentry_mapping_data_args( |
| TSentryImportMappingDataRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public import_sentry_mapping_data_args(import_sentry_mapping_data_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentryImportMappingDataRequest(other.request); |
| } |
| } |
| |
| public import_sentry_mapping_data_args deepCopy() { |
| return new import_sentry_mapping_data_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentryImportMappingDataRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentryImportMappingDataRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentryImportMappingDataRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof import_sentry_mapping_data_args) |
| return this.equals((import_sentry_mapping_data_args)that); |
| return false; |
| } |
| |
| public boolean equals(import_sentry_mapping_data_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(import_sentry_mapping_data_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("import_sentry_mapping_data_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class import_sentry_mapping_data_argsStandardSchemeFactory implements SchemeFactory { |
| public import_sentry_mapping_data_argsStandardScheme getScheme() { |
| return new import_sentry_mapping_data_argsStandardScheme(); |
| } |
| } |
| |
| private static class import_sentry_mapping_data_argsStandardScheme extends StandardScheme<import_sentry_mapping_data_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, import_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentryImportMappingDataRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, import_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class import_sentry_mapping_data_argsTupleSchemeFactory implements SchemeFactory { |
| public import_sentry_mapping_data_argsTupleScheme getScheme() { |
| return new import_sentry_mapping_data_argsTupleScheme(); |
| } |
| } |
| |
| private static class import_sentry_mapping_data_argsTupleScheme extends TupleScheme<import_sentry_mapping_data_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, import_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, import_sentry_mapping_data_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentryImportMappingDataRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class import_sentry_mapping_data_result implements org.apache.thrift.TBase<import_sentry_mapping_data_result, import_sentry_mapping_data_result._Fields>, java.io.Serializable, Cloneable, Comparable<import_sentry_mapping_data_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("import_sentry_mapping_data_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new import_sentry_mapping_data_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new import_sentry_mapping_data_resultTupleSchemeFactory()); |
| } |
| |
| private TSentryImportMappingDataResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryImportMappingDataResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(import_sentry_mapping_data_result.class, metaDataMap); |
| } |
| |
| public import_sentry_mapping_data_result() { |
| } |
| |
| public import_sentry_mapping_data_result( |
| TSentryImportMappingDataResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public import_sentry_mapping_data_result(import_sentry_mapping_data_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentryImportMappingDataResponse(other.success); |
| } |
| } |
| |
| public import_sentry_mapping_data_result deepCopy() { |
| return new import_sentry_mapping_data_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentryImportMappingDataResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentryImportMappingDataResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentryImportMappingDataResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof import_sentry_mapping_data_result) |
| return this.equals((import_sentry_mapping_data_result)that); |
| return false; |
| } |
| |
| public boolean equals(import_sentry_mapping_data_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(import_sentry_mapping_data_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("import_sentry_mapping_data_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class import_sentry_mapping_data_resultStandardSchemeFactory implements SchemeFactory { |
| public import_sentry_mapping_data_resultStandardScheme getScheme() { |
| return new import_sentry_mapping_data_resultStandardScheme(); |
| } |
| } |
| |
| private static class import_sentry_mapping_data_resultStandardScheme extends StandardScheme<import_sentry_mapping_data_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, import_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentryImportMappingDataResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, import_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class import_sentry_mapping_data_resultTupleSchemeFactory implements SchemeFactory { |
| public import_sentry_mapping_data_resultTupleScheme getScheme() { |
| return new import_sentry_mapping_data_resultTupleScheme(); |
| } |
| } |
| |
| private static class import_sentry_mapping_data_resultTupleScheme extends TupleScheme<import_sentry_mapping_data_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, import_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, import_sentry_mapping_data_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentryImportMappingDataResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class sentry_sync_notifications_args implements org.apache.thrift.TBase<sentry_sync_notifications_args, sentry_sync_notifications_args._Fields>, java.io.Serializable, Cloneable, Comparable<sentry_sync_notifications_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sentry_sync_notifications_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new sentry_sync_notifications_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new sentry_sync_notifications_argsTupleSchemeFactory()); |
| } |
| |
| private TSentrySyncIDRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentrySyncIDRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sentry_sync_notifications_args.class, metaDataMap); |
| } |
| |
| public sentry_sync_notifications_args() { |
| } |
| |
| public sentry_sync_notifications_args( |
| TSentrySyncIDRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public sentry_sync_notifications_args(sentry_sync_notifications_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentrySyncIDRequest(other.request); |
| } |
| } |
| |
| public sentry_sync_notifications_args deepCopy() { |
| return new sentry_sync_notifications_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentrySyncIDRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentrySyncIDRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentrySyncIDRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof sentry_sync_notifications_args) |
| return this.equals((sentry_sync_notifications_args)that); |
| return false; |
| } |
| |
| public boolean equals(sentry_sync_notifications_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(sentry_sync_notifications_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("sentry_sync_notifications_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class sentry_sync_notifications_argsStandardSchemeFactory implements SchemeFactory { |
| public sentry_sync_notifications_argsStandardScheme getScheme() { |
| return new sentry_sync_notifications_argsStandardScheme(); |
| } |
| } |
| |
| private static class sentry_sync_notifications_argsStandardScheme extends StandardScheme<sentry_sync_notifications_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, sentry_sync_notifications_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentrySyncIDRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, sentry_sync_notifications_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class sentry_sync_notifications_argsTupleSchemeFactory implements SchemeFactory { |
| public sentry_sync_notifications_argsTupleScheme getScheme() { |
| return new sentry_sync_notifications_argsTupleScheme(); |
| } |
| } |
| |
| private static class sentry_sync_notifications_argsTupleScheme extends TupleScheme<sentry_sync_notifications_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, sentry_sync_notifications_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, sentry_sync_notifications_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentrySyncIDRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class sentry_sync_notifications_result implements org.apache.thrift.TBase<sentry_sync_notifications_result, sentry_sync_notifications_result._Fields>, java.io.Serializable, Cloneable, Comparable<sentry_sync_notifications_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sentry_sync_notifications_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new sentry_sync_notifications_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new sentry_sync_notifications_resultTupleSchemeFactory()); |
| } |
| |
| private TSentrySyncIDResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentrySyncIDResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sentry_sync_notifications_result.class, metaDataMap); |
| } |
| |
| public sentry_sync_notifications_result() { |
| } |
| |
| public sentry_sync_notifications_result( |
| TSentrySyncIDResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public sentry_sync_notifications_result(sentry_sync_notifications_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentrySyncIDResponse(other.success); |
| } |
| } |
| |
| public sentry_sync_notifications_result deepCopy() { |
| return new sentry_sync_notifications_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentrySyncIDResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentrySyncIDResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentrySyncIDResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof sentry_sync_notifications_result) |
| return this.equals((sentry_sync_notifications_result)that); |
| return false; |
| } |
| |
| public boolean equals(sentry_sync_notifications_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(sentry_sync_notifications_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("sentry_sync_notifications_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class sentry_sync_notifications_resultStandardSchemeFactory implements SchemeFactory { |
| public sentry_sync_notifications_resultStandardScheme getScheme() { |
| return new sentry_sync_notifications_resultStandardScheme(); |
| } |
| } |
| |
| private static class sentry_sync_notifications_resultStandardScheme extends StandardScheme<sentry_sync_notifications_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, sentry_sync_notifications_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentrySyncIDResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, sentry_sync_notifications_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class sentry_sync_notifications_resultTupleSchemeFactory implements SchemeFactory { |
| public sentry_sync_notifications_resultTupleScheme getScheme() { |
| return new sentry_sync_notifications_resultTupleScheme(); |
| } |
| } |
| |
| private static class sentry_sync_notifications_resultTupleScheme extends TupleScheme<sentry_sync_notifications_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, sentry_sync_notifications_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, sentry_sync_notifications_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentrySyncIDResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class sentry_notify_hms_event_args implements org.apache.thrift.TBase<sentry_notify_hms_event_args, sentry_notify_hms_event_args._Fields>, java.io.Serializable, Cloneable, Comparable<sentry_notify_hms_event_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sentry_notify_hms_event_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new sentry_notify_hms_event_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new sentry_notify_hms_event_argsTupleSchemeFactory()); |
| } |
| |
| private TSentryHmsEventNotification request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryHmsEventNotification.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sentry_notify_hms_event_args.class, metaDataMap); |
| } |
| |
| public sentry_notify_hms_event_args() { |
| } |
| |
| public sentry_notify_hms_event_args( |
| TSentryHmsEventNotification request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public sentry_notify_hms_event_args(sentry_notify_hms_event_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentryHmsEventNotification(other.request); |
| } |
| } |
| |
| public sentry_notify_hms_event_args deepCopy() { |
| return new sentry_notify_hms_event_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentryHmsEventNotification getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentryHmsEventNotification request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentryHmsEventNotification)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof sentry_notify_hms_event_args) |
| return this.equals((sentry_notify_hms_event_args)that); |
| return false; |
| } |
| |
| public boolean equals(sentry_notify_hms_event_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(sentry_notify_hms_event_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("sentry_notify_hms_event_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class sentry_notify_hms_event_argsStandardSchemeFactory implements SchemeFactory { |
| public sentry_notify_hms_event_argsStandardScheme getScheme() { |
| return new sentry_notify_hms_event_argsStandardScheme(); |
| } |
| } |
| |
| private static class sentry_notify_hms_event_argsStandardScheme extends StandardScheme<sentry_notify_hms_event_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, sentry_notify_hms_event_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentryHmsEventNotification(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, sentry_notify_hms_event_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class sentry_notify_hms_event_argsTupleSchemeFactory implements SchemeFactory { |
| public sentry_notify_hms_event_argsTupleScheme getScheme() { |
| return new sentry_notify_hms_event_argsTupleScheme(); |
| } |
| } |
| |
| private static class sentry_notify_hms_event_argsTupleScheme extends TupleScheme<sentry_notify_hms_event_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, sentry_notify_hms_event_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, sentry_notify_hms_event_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentryHmsEventNotification(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class sentry_notify_hms_event_result implements org.apache.thrift.TBase<sentry_notify_hms_event_result, sentry_notify_hms_event_result._Fields>, java.io.Serializable, Cloneable, Comparable<sentry_notify_hms_event_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sentry_notify_hms_event_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new sentry_notify_hms_event_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new sentry_notify_hms_event_resultTupleSchemeFactory()); |
| } |
| |
| private TSentryHmsEventNotificationResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryHmsEventNotificationResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sentry_notify_hms_event_result.class, metaDataMap); |
| } |
| |
| public sentry_notify_hms_event_result() { |
| } |
| |
| public sentry_notify_hms_event_result( |
| TSentryHmsEventNotificationResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public sentry_notify_hms_event_result(sentry_notify_hms_event_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentryHmsEventNotificationResponse(other.success); |
| } |
| } |
| |
| public sentry_notify_hms_event_result deepCopy() { |
| return new sentry_notify_hms_event_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentryHmsEventNotificationResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentryHmsEventNotificationResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentryHmsEventNotificationResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof sentry_notify_hms_event_result) |
| return this.equals((sentry_notify_hms_event_result)that); |
| return false; |
| } |
| |
| public boolean equals(sentry_notify_hms_event_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(sentry_notify_hms_event_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("sentry_notify_hms_event_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class sentry_notify_hms_event_resultStandardSchemeFactory implements SchemeFactory { |
| public sentry_notify_hms_event_resultStandardScheme getScheme() { |
| return new sentry_notify_hms_event_resultStandardScheme(); |
| } |
| } |
| |
| private static class sentry_notify_hms_event_resultStandardScheme extends StandardScheme<sentry_notify_hms_event_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, sentry_notify_hms_event_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentryHmsEventNotificationResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, sentry_notify_hms_event_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class sentry_notify_hms_event_resultTupleSchemeFactory implements SchemeFactory { |
| public sentry_notify_hms_event_resultTupleScheme getScheme() { |
| return new sentry_notify_hms_event_resultTupleScheme(); |
| } |
| } |
| |
| private static class sentry_notify_hms_event_resultTupleScheme extends TupleScheme<sentry_notify_hms_event_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, sentry_notify_hms_event_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, sentry_notify_hms_event_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentryHmsEventNotificationResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_roles_privileges_args implements org.apache.thrift.TBase<list_roles_privileges_args, list_roles_privileges_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_roles_privileges_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_privileges_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_roles_privileges_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_roles_privileges_argsTupleSchemeFactory()); |
| } |
| |
| private TSentryPrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_privileges_args.class, metaDataMap); |
| } |
| |
| public list_roles_privileges_args() { |
| } |
| |
| public list_roles_privileges_args( |
| TSentryPrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_roles_privileges_args(list_roles_privileges_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentryPrivilegesRequest(other.request); |
| } |
| } |
| |
| public list_roles_privileges_args deepCopy() { |
| return new list_roles_privileges_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentryPrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentryPrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentryPrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_roles_privileges_args) |
| return this.equals((list_roles_privileges_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_roles_privileges_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_roles_privileges_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_roles_privileges_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_roles_privileges_argsStandardSchemeFactory implements SchemeFactory { |
| public list_roles_privileges_argsStandardScheme getScheme() { |
| return new list_roles_privileges_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_roles_privileges_argsStandardScheme extends StandardScheme<list_roles_privileges_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_privileges_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_privileges_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_roles_privileges_argsTupleSchemeFactory implements SchemeFactory { |
| public list_roles_privileges_argsTupleScheme getScheme() { |
| return new list_roles_privileges_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_roles_privileges_argsTupleScheme extends TupleScheme<list_roles_privileges_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_privileges_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_privileges_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_roles_privileges_result implements org.apache.thrift.TBase<list_roles_privileges_result, list_roles_privileges_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_roles_privileges_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_privileges_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_roles_privileges_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_roles_privileges_resultTupleSchemeFactory()); |
| } |
| |
| private TSentryPrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_privileges_result.class, metaDataMap); |
| } |
| |
| public list_roles_privileges_result() { |
| } |
| |
| public list_roles_privileges_result( |
| TSentryPrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_roles_privileges_result(list_roles_privileges_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentryPrivilegesResponse(other.success); |
| } |
| } |
| |
| public list_roles_privileges_result deepCopy() { |
| return new list_roles_privileges_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentryPrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentryPrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentryPrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_roles_privileges_result) |
| return this.equals((list_roles_privileges_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_roles_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; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_roles_privileges_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_roles_privileges_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_roles_privileges_resultStandardSchemeFactory implements SchemeFactory { |
| public list_roles_privileges_resultStandardScheme getScheme() { |
| return new list_roles_privileges_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_roles_privileges_resultStandardScheme extends StandardScheme<list_roles_privileges_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_privileges_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_privileges_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_roles_privileges_resultTupleSchemeFactory implements SchemeFactory { |
| public list_roles_privileges_resultTupleScheme getScheme() { |
| return new list_roles_privileges_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_roles_privileges_resultTupleScheme extends TupleScheme<list_roles_privileges_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_privileges_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_privileges_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_users_privileges_args implements org.apache.thrift.TBase<list_users_privileges_args, list_users_privileges_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_users_privileges_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_users_privileges_args"); |
| |
| private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_users_privileges_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_users_privileges_argsTupleSchemeFactory()); |
| } |
| |
| private TSentryPrivilegesRequest request; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| REQUEST((short)1, "request"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // REQUEST |
| return REQUEST; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilegesRequest.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_users_privileges_args.class, metaDataMap); |
| } |
| |
| public list_users_privileges_args() { |
| } |
| |
| public list_users_privileges_args( |
| TSentryPrivilegesRequest request) |
| { |
| this(); |
| this.request = request; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_users_privileges_args(list_users_privileges_args other) { |
| if (other.isSetRequest()) { |
| this.request = new TSentryPrivilegesRequest(other.request); |
| } |
| } |
| |
| public list_users_privileges_args deepCopy() { |
| return new list_users_privileges_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.request = null; |
| } |
| |
| public TSentryPrivilegesRequest getRequest() { |
| return this.request; |
| } |
| |
| public void setRequest(TSentryPrivilegesRequest request) { |
| this.request = request; |
| } |
| |
| public void unsetRequest() { |
| this.request = null; |
| } |
| |
| /** Returns true if field request is set (has been assigned a value) and false otherwise */ |
| public boolean isSetRequest() { |
| return this.request != null; |
| } |
| |
| public void setRequestIsSet(boolean value) { |
| if (!value) { |
| this.request = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case REQUEST: |
| if (value == null) { |
| unsetRequest(); |
| } else { |
| setRequest((TSentryPrivilegesRequest)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case REQUEST: |
| return getRequest(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case REQUEST: |
| return isSetRequest(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_users_privileges_args) |
| return this.equals((list_users_privileges_args)that); |
| return false; |
| } |
| |
| public boolean equals(list_users_privileges_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_request = true && this.isSetRequest(); |
| boolean that_present_request = true && that.isSetRequest(); |
| if (this_present_request || that_present_request) { |
| if (!(this_present_request && that_present_request)) |
| return false; |
| if (!this.request.equals(that.request)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_request = true && (isSetRequest()); |
| list.add(present_request); |
| if (present_request) |
| list.add(request); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_users_privileges_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetRequest()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_users_privileges_args("); |
| boolean first = true; |
| |
| sb.append("request:"); |
| if (this.request == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.request); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (request != null) { |
| request.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_users_privileges_argsStandardSchemeFactory implements SchemeFactory { |
| public list_users_privileges_argsStandardScheme getScheme() { |
| return new list_users_privileges_argsStandardScheme(); |
| } |
| } |
| |
| private static class list_users_privileges_argsStandardScheme extends StandardScheme<list_users_privileges_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_users_privileges_args struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // REQUEST |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.request = new TSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_users_privileges_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.request != null) { |
| oprot.writeFieldBegin(REQUEST_FIELD_DESC); |
| struct.request.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_users_privileges_argsTupleSchemeFactory implements SchemeFactory { |
| public list_users_privileges_argsTupleScheme getScheme() { |
| return new list_users_privileges_argsTupleScheme(); |
| } |
| } |
| |
| private static class list_users_privileges_argsTupleScheme extends TupleScheme<list_users_privileges_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_users_privileges_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetRequest()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetRequest()) { |
| struct.request.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_users_privileges_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.request = new TSentryPrivilegesRequest(); |
| struct.request.read(iprot); |
| struct.setRequestIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class list_users_privileges_result implements org.apache.thrift.TBase<list_users_privileges_result, list_users_privileges_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_users_privileges_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_users_privileges_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new list_users_privileges_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new list_users_privileges_resultTupleSchemeFactory()); |
| } |
| |
| private TSentryPrivilegesResponse success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilegesResponse.class))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_users_privileges_result.class, metaDataMap); |
| } |
| |
| public list_users_privileges_result() { |
| } |
| |
| public list_users_privileges_result( |
| TSentryPrivilegesResponse success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public list_users_privileges_result(list_users_privileges_result other) { |
| if (other.isSetSuccess()) { |
| this.success = new TSentryPrivilegesResponse(other.success); |
| } |
| } |
| |
| public list_users_privileges_result deepCopy() { |
| return new list_users_privileges_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public TSentryPrivilegesResponse getSuccess() { |
| return this.success; |
| } |
| |
| public void setSuccess(TSentryPrivilegesResponse success) { |
| this.success = success; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((TSentryPrivilegesResponse)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof list_users_privileges_result) |
| return this.equals((list_users_privileges_result)that); |
| return false; |
| } |
| |
| public boolean equals(list_users_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; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(list_users_privileges_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("list_users_privileges_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| if (success != null) { |
| success.validate(); |
| } |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class list_users_privileges_resultStandardSchemeFactory implements SchemeFactory { |
| public list_users_privileges_resultStandardScheme getScheme() { |
| return new list_users_privileges_resultStandardScheme(); |
| } |
| } |
| |
| private static class list_users_privileges_resultStandardScheme extends StandardScheme<list_users_privileges_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, list_users_privileges_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { |
| struct.success = new TSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, list_users_privileges_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| struct.success.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class list_users_privileges_resultTupleSchemeFactory implements SchemeFactory { |
| public list_users_privileges_resultTupleScheme getScheme() { |
| return new list_users_privileges_resultTupleScheme(); |
| } |
| } |
| |
| private static class list_users_privileges_resultTupleScheme extends TupleScheme<list_users_privileges_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, list_users_privileges_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| struct.success.write(oprot); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, list_users_privileges_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = new TSentryPrivilegesResponse(); |
| struct.success.read(iprot); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| } |