blob: 022c6877b0e8160e75a2fb3058317351c22c108d [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.service.profile.iam.admin.services.cpi;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class IamAdminServices {
public interface Iface extends org.apache.airavata.base.api.BaseAPI.Iface {
public org.apache.airavata.model.workspace.Gateway setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public org.apache.airavata.model.user.UserProfile getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.user.UserProfile> getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.user.UserProfile> findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean deleteUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.user.UserProfile> getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
}
public interface AsyncIface extends org.apache.airavata.base.api.BaseAPI .AsyncIface {
public void setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException;
public void isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException;
public void getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
public void resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void deleteUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.airavata.base.api.BaseAPI.Client implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public org.apache.airavata.model.workspace.Gateway setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_setUpGateway(authzToken, gateway);
return recv_setUpGateway();
}
public void send_setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.thrift.TException
{
setUpGateway_args args = new setUpGateway_args();
args.setAuthzToken(authzToken);
args.setGateway(gateway);
sendBase("setUpGateway", args);
}
public org.apache.airavata.model.workspace.Gateway recv_setUpGateway() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
setUpGateway_result result = new setUpGateway_result();
receiveBase(result, "setUpGateway");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUpGateway failed: unknown result");
}
public boolean isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_isUsernameAvailable(authzToken, username);
return recv_isUsernameAvailable();
}
public void send_isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
{
isUsernameAvailable_args args = new isUsernameAvailable_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
sendBase("isUsernameAvailable", args);
}
public boolean recv_isUsernameAvailable() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
isUsernameAvailable_result result = new isUsernameAvailable_result();
receiveBase(result, "isUsernameAvailable");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isUsernameAvailable failed: unknown result");
}
public boolean registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_registerUser(authzToken, username, emailAddress, firstName, lastName, newPassword);
return recv_registerUser();
}
public void send_registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword) throws org.apache.thrift.TException
{
registerUser_args args = new registerUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setEmailAddress(emailAddress);
args.setFirstName(firstName);
args.setLastName(lastName);
args.setNewPassword(newPassword);
sendBase("registerUser", args);
}
public boolean recv_registerUser() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
registerUser_result result = new registerUser_result();
receiveBase(result, "registerUser");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerUser failed: unknown result");
}
public boolean enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_enableUser(authzToken, username);
return recv_enableUser();
}
public void send_enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
{
enableUser_args args = new enableUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
sendBase("enableUser", args);
}
public boolean recv_enableUser() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
enableUser_result result = new enableUser_result();
receiveBase(result, "enableUser");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableUser failed: unknown result");
}
public boolean isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_isUserEnabled(authzToken, username);
return recv_isUserEnabled();
}
public void send_isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
{
isUserEnabled_args args = new isUserEnabled_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
sendBase("isUserEnabled", args);
}
public boolean recv_isUserEnabled() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
isUserEnabled_result result = new isUserEnabled_result();
receiveBase(result, "isUserEnabled");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isUserEnabled failed: unknown result");
}
public boolean isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_isUserExist(authzToken, username);
return recv_isUserExist();
}
public void send_isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
{
isUserExist_args args = new isUserExist_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
sendBase("isUserExist", args);
}
public boolean recv_isUserExist() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
isUserExist_result result = new isUserExist_result();
receiveBase(result, "isUserExist");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isUserExist failed: unknown result");
}
public org.apache.airavata.model.user.UserProfile getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getUser(authzToken, username);
return recv_getUser();
}
public void send_getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
{
getUser_args args = new getUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
sendBase("getUser", args);
}
public org.apache.airavata.model.user.UserProfile recv_getUser() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getUser_result result = new getUser_result();
receiveBase(result, "getUser");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getUsers(authzToken, offset, limit, search);
return recv_getUsers();
}
public void send_getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search) throws org.apache.thrift.TException
{
getUsers_args args = new getUsers_args();
args.setAuthzToken(authzToken);
args.setOffset(offset);
args.setLimit(limit);
args.setSearch(search);
sendBase("getUsers", args);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> recv_getUsers() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getUsers_result result = new getUsers_result();
receiveBase(result, "getUsers");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
}
public boolean resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_resetUserPassword(authzToken, username, newPassword);
return recv_resetUserPassword();
}
public void send_resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword) throws org.apache.thrift.TException
{
resetUserPassword_args args = new resetUserPassword_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setNewPassword(newPassword);
sendBase("resetUserPassword", args);
}
public boolean recv_resetUserPassword() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
resetUserPassword_result result = new resetUserPassword_result();
receiveBase(result, "resetUserPassword");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resetUserPassword failed: unknown result");
}
public java.util.List<org.apache.airavata.model.user.UserProfile> findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_findUsers(authzToken, email, userId);
return recv_findUsers();
}
public void send_findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId) throws org.apache.thrift.TException
{
findUsers_args args = new findUsers_args();
args.setAuthzToken(authzToken);
args.setEmail(email);
args.setUserId(userId);
sendBase("findUsers", args);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> recv_findUsers() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
findUsers_result result = new findUsers_result();
receiveBase(result, "findUsers");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUsers failed: unknown result");
}
public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_updateUserProfile(authzToken, userDetails);
recv_updateUserProfile();
}
public void send_updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails) throws org.apache.thrift.TException
{
updateUserProfile_args args = new updateUserProfile_args();
args.setAuthzToken(authzToken);
args.setUserDetails(userDetails);
sendBase("updateUserProfile", args);
}
public void recv_updateUserProfile() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
updateUserProfile_result result = new updateUserProfile_result();
receiveBase(result, "updateUserProfile");
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
return;
}
public boolean deleteUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_deleteUser(authzToken, username);
return recv_deleteUser();
}
public void send_deleteUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
{
deleteUser_args args = new deleteUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
sendBase("deleteUser", args);
}
public boolean recv_deleteUser() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
deleteUser_result result = new deleteUser_result();
receiveBase(result, "deleteUser");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
}
public boolean addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_addRoleToUser(authzToken, username, roleName);
return recv_addRoleToUser();
}
public void send_addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.thrift.TException
{
addRoleToUser_args args = new addRoleToUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setRoleName(roleName);
sendBase("addRoleToUser", args);
}
public boolean recv_addRoleToUser() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
addRoleToUser_result result = new addRoleToUser_result();
receiveBase(result, "addRoleToUser");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addRoleToUser failed: unknown result");
}
public boolean removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_removeRoleFromUser(authzToken, username, roleName);
return recv_removeRoleFromUser();
}
public void send_removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.thrift.TException
{
removeRoleFromUser_args args = new removeRoleFromUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setRoleName(roleName);
sendBase("removeRoleFromUser", args);
}
public boolean recv_removeRoleFromUser() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
removeRoleFromUser_result result = new removeRoleFromUser_result();
receiveBase(result, "removeRoleFromUser");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeRoleFromUser failed: unknown result");
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getUsersWithRole(authzToken, roleName);
return recv_getUsersWithRole();
}
public void send_getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName) throws org.apache.thrift.TException
{
getUsersWithRole_args args = new getUsersWithRole_args();
args.setAuthzToken(authzToken);
args.setRoleName(roleName);
sendBase("getUsersWithRole", args);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> recv_getUsersWithRole() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getUsersWithRole_result result = new getUsersWithRole_result();
receiveBase(result, "getUsersWithRole");
if (result.isSetSuccess()) {
return result.success;
}
if (result.Idse != null) {
throw result.Idse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsersWithRole failed: unknown result");
}
}
public static class AsyncClient extends org.apache.airavata.base.api.BaseAPI.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException {
checkReady();
setUpGateway_call method_call = new setUpGateway_call(authzToken, gateway, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setUpGateway_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.airavata.model.workspace.Gateway> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private org.apache.airavata.model.workspace.Gateway gateway;
public setUpGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.gateway = gateway;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUpGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
setUpGateway_args args = new setUpGateway_args();
args.setAuthzToken(authzToken);
args.setGateway(gateway);
args.write(prot);
prot.writeMessageEnd();
}
public org.apache.airavata.model.workspace.Gateway getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_setUpGateway();
}
}
public void isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
isUsernameAvailable_call method_call = new isUsernameAvailable_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class isUsernameAvailable_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
public isUsernameAvailable_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isUsernameAvailable", org.apache.thrift.protocol.TMessageType.CALL, 0));
isUsernameAvailable_args args = new isUsernameAvailable_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_isUsernameAvailable();
}
}
public void registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
registerUser_call method_call = new registerUser_call(authzToken, username, emailAddress, firstName, lastName, newPassword, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
private java.lang.String emailAddress;
private java.lang.String firstName;
private java.lang.String lastName;
private java.lang.String newPassword;
public registerUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
this.emailAddress = emailAddress;
this.firstName = firstName;
this.lastName = lastName;
this.newPassword = newPassword;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
registerUser_args args = new registerUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setEmailAddress(emailAddress);
args.setFirstName(firstName);
args.setLastName(lastName);
args.setNewPassword(newPassword);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_registerUser();
}
}
public void enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
enableUser_call method_call = new enableUser_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class enableUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
public enableUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
enableUser_args args = new enableUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_enableUser();
}
}
public void isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
isUserEnabled_call method_call = new isUserEnabled_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class isUserEnabled_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
public isUserEnabled_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isUserEnabled", org.apache.thrift.protocol.TMessageType.CALL, 0));
isUserEnabled_args args = new isUserEnabled_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_isUserEnabled();
}
}
public void isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
isUserExist_call method_call = new isUserExist_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class isUserExist_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
public isUserExist_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isUserExist", org.apache.thrift.protocol.TMessageType.CALL, 0));
isUserExist_args args = new isUserExist_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_isUserExist();
}
}
public void getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUser_call method_call = new getUser_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.airavata.model.user.UserProfile> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
public getUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUser_args args = new getUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.write(prot);
prot.writeMessageEnd();
}
public org.apache.airavata.model.user.UserProfile getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getUser();
}
}
public void getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUsers_call method_call = new getUsers_call(authzToken, offset, limit, search, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.user.UserProfile>> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private int offset;
private int limit;
private java.lang.String search;
public getUsers_call(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.offset = offset;
this.limit = limit;
this.search = search;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUsers_args args = new getUsers_args();
args.setAuthzToken(authzToken);
args.setOffset(offset);
args.setLimit(limit);
args.setSearch(search);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getUsers();
}
}
public void resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
resetUserPassword_call method_call = new resetUserPassword_call(authzToken, username, newPassword, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class resetUserPassword_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
private java.lang.String newPassword;
public resetUserPassword_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
this.newPassword = newPassword;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resetUserPassword", org.apache.thrift.protocol.TMessageType.CALL, 0));
resetUserPassword_args args = new resetUserPassword_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setNewPassword(newPassword);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_resetUserPassword();
}
}
public void findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
checkReady();
findUsers_call method_call = new findUsers_call(authzToken, email, userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class findUsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.user.UserProfile>> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String email;
private java.lang.String userId;
public findUsers_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.email = email;
this.userId = userId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
findUsers_args args = new findUsers_args();
args.setAuthzToken(authzToken);
args.setEmail(email);
args.setUserId(userId);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_findUsers();
}
}
public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateUserProfile_call method_call = new updateUserProfile_call(authzToken, userDetails, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class updateUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private org.apache.airavata.model.user.UserProfile userDetails;
public updateUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.userDetails = userDetails;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateUserProfile_args args = new updateUserProfile_args();
args.setAuthzToken(authzToken);
args.setUserDetails(userDetails);
args.write(prot);
prot.writeMessageEnd();
}
public Void getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return null;
}
}
public void deleteUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteUser_call method_call = new deleteUser_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
public deleteUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteUser_args args = new deleteUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deleteUser();
}
}
public void addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
addRoleToUser_call method_call = new addRoleToUser_call(authzToken, username, roleName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addRoleToUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
private java.lang.String roleName;
public addRoleToUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
this.roleName = roleName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addRoleToUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
addRoleToUser_args args = new addRoleToUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setRoleName(roleName);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_addRoleToUser();
}
}
public void removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
removeRoleFromUser_call method_call = new removeRoleFromUser_call(authzToken, username, roleName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeRoleFromUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String username;
private java.lang.String roleName;
public removeRoleFromUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.username = username;
this.roleName = roleName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeRoleFromUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
removeRoleFromUser_args args = new removeRoleFromUser_args();
args.setAuthzToken(authzToken);
args.setUsername(username);
args.setRoleName(roleName);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_removeRoleFromUser();
}
}
public void getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUsersWithRole_call method_call = new getUsersWithRole_call(authzToken, roleName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUsersWithRole_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.user.UserProfile>> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String roleName;
public getUsersWithRole_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.authzToken = authzToken;
this.roleName = roleName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsersWithRole", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUsersWithRole_args args = new getUsersWithRole_args();
args.setAuthzToken(authzToken);
args.setRoleName(roleName);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getUsersWithRole();
}
}
}
public static class Processor<I extends Iface> extends org.apache.airavata.base.api.BaseAPI.Processor<I> implements org.apache.thrift.TProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("setUpGateway", new setUpGateway());
processMap.put("isUsernameAvailable", new isUsernameAvailable());
processMap.put("registerUser", new registerUser());
processMap.put("enableUser", new enableUser());
processMap.put("isUserEnabled", new isUserEnabled());
processMap.put("isUserExist", new isUserExist());
processMap.put("getUser", new getUser());
processMap.put("getUsers", new getUsers());
processMap.put("resetUserPassword", new resetUserPassword());
processMap.put("findUsers", new findUsers());
processMap.put("updateUserProfile", new updateUserProfile());
processMap.put("deleteUser", new deleteUser());
processMap.put("addRoleToUser", new addRoleToUser());
processMap.put("removeRoleFromUser", new removeRoleFromUser());
processMap.put("getUsersWithRole", new getUsersWithRole());
return processMap;
}
public static class setUpGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUpGateway_args> {
public setUpGateway() {
super("setUpGateway");
}
public setUpGateway_args getEmptyArgsInstance() {
return new setUpGateway_args();
}
protected boolean isOneway() {
return false;
}
public setUpGateway_result getResult(I iface, setUpGateway_args args) throws org.apache.thrift.TException {
setUpGateway_result result = new setUpGateway_result();
try {
result.success = iface.setUpGateway(args.authzToken, args.gateway);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class isUsernameAvailable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isUsernameAvailable_args> {
public isUsernameAvailable() {
super("isUsernameAvailable");
}
public isUsernameAvailable_args getEmptyArgsInstance() {
return new isUsernameAvailable_args();
}
protected boolean isOneway() {
return false;
}
public isUsernameAvailable_result getResult(I iface, isUsernameAvailable_args args) throws org.apache.thrift.TException {
isUsernameAvailable_result result = new isUsernameAvailable_result();
try {
result.success = iface.isUsernameAvailable(args.authzToken, args.username);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class registerUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerUser_args> {
public registerUser() {
super("registerUser");
}
public registerUser_args getEmptyArgsInstance() {
return new registerUser_args();
}
protected boolean isOneway() {
return false;
}
public registerUser_result getResult(I iface, registerUser_args args) throws org.apache.thrift.TException {
registerUser_result result = new registerUser_result();
try {
result.success = iface.registerUser(args.authzToken, args.username, args.emailAddress, args.firstName, args.lastName, args.newPassword);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class enableUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, enableUser_args> {
public enableUser() {
super("enableUser");
}
public enableUser_args getEmptyArgsInstance() {
return new enableUser_args();
}
protected boolean isOneway() {
return false;
}
public enableUser_result getResult(I iface, enableUser_args args) throws org.apache.thrift.TException {
enableUser_result result = new enableUser_result();
try {
result.success = iface.enableUser(args.authzToken, args.username);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class isUserEnabled<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isUserEnabled_args> {
public isUserEnabled() {
super("isUserEnabled");
}
public isUserEnabled_args getEmptyArgsInstance() {
return new isUserEnabled_args();
}
protected boolean isOneway() {
return false;
}
public isUserEnabled_result getResult(I iface, isUserEnabled_args args) throws org.apache.thrift.TException {
isUserEnabled_result result = new isUserEnabled_result();
try {
result.success = iface.isUserEnabled(args.authzToken, args.username);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class isUserExist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isUserExist_args> {
public isUserExist() {
super("isUserExist");
}
public isUserExist_args getEmptyArgsInstance() {
return new isUserExist_args();
}
protected boolean isOneway() {
return false;
}
public isUserExist_result getResult(I iface, isUserExist_args args) throws org.apache.thrift.TException {
isUserExist_result result = new isUserExist_result();
try {
result.success = iface.isUserExist(args.authzToken, args.username);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class getUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUser_args> {
public getUser() {
super("getUser");
}
public getUser_args getEmptyArgsInstance() {
return new getUser_args();
}
protected boolean isOneway() {
return false;
}
public getUser_result getResult(I iface, getUser_args args) throws org.apache.thrift.TException {
getUser_result result = new getUser_result();
try {
result.success = iface.getUser(args.authzToken, args.username);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class getUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUsers_args> {
public getUsers() {
super("getUsers");
}
public getUsers_args getEmptyArgsInstance() {
return new getUsers_args();
}
protected boolean isOneway() {
return false;
}
public getUsers_result getResult(I iface, getUsers_args args) throws org.apache.thrift.TException {
getUsers_result result = new getUsers_result();
try {
result.success = iface.getUsers(args.authzToken, args.offset, args.limit, args.search);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class resetUserPassword<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resetUserPassword_args> {
public resetUserPassword() {
super("resetUserPassword");
}
public resetUserPassword_args getEmptyArgsInstance() {
return new resetUserPassword_args();
}
protected boolean isOneway() {
return false;
}
public resetUserPassword_result getResult(I iface, resetUserPassword_args args) throws org.apache.thrift.TException {
resetUserPassword_result result = new resetUserPassword_result();
try {
result.success = iface.resetUserPassword(args.authzToken, args.username, args.newPassword);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class findUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, findUsers_args> {
public findUsers() {
super("findUsers");
}
public findUsers_args getEmptyArgsInstance() {
return new findUsers_args();
}
protected boolean isOneway() {
return false;
}
public findUsers_result getResult(I iface, findUsers_args args) throws org.apache.thrift.TException {
findUsers_result result = new findUsers_result();
try {
result.success = iface.findUsers(args.authzToken, args.email, args.userId);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class updateUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateUserProfile_args> {
public updateUserProfile() {
super("updateUserProfile");
}
public updateUserProfile_args getEmptyArgsInstance() {
return new updateUserProfile_args();
}
protected boolean isOneway() {
return false;
}
public updateUserProfile_result getResult(I iface, updateUserProfile_args args) throws org.apache.thrift.TException {
updateUserProfile_result result = new updateUserProfile_result();
try {
iface.updateUserProfile(args.authzToken, args.userDetails);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class deleteUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteUser_args> {
public deleteUser() {
super("deleteUser");
}
public deleteUser_args getEmptyArgsInstance() {
return new deleteUser_args();
}
protected boolean isOneway() {
return false;
}
public deleteUser_result getResult(I iface, deleteUser_args args) throws org.apache.thrift.TException {
deleteUser_result result = new deleteUser_result();
try {
result.success = iface.deleteUser(args.authzToken, args.username);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class addRoleToUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addRoleToUser_args> {
public addRoleToUser() {
super("addRoleToUser");
}
public addRoleToUser_args getEmptyArgsInstance() {
return new addRoleToUser_args();
}
protected boolean isOneway() {
return false;
}
public addRoleToUser_result getResult(I iface, addRoleToUser_args args) throws org.apache.thrift.TException {
addRoleToUser_result result = new addRoleToUser_result();
try {
result.success = iface.addRoleToUser(args.authzToken, args.username, args.roleName);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class removeRoleFromUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeRoleFromUser_args> {
public removeRoleFromUser() {
super("removeRoleFromUser");
}
public removeRoleFromUser_args getEmptyArgsInstance() {
return new removeRoleFromUser_args();
}
protected boolean isOneway() {
return false;
}
public removeRoleFromUser_result getResult(I iface, removeRoleFromUser_args args) throws org.apache.thrift.TException {
removeRoleFromUser_result result = new removeRoleFromUser_result();
try {
result.success = iface.removeRoleFromUser(args.authzToken, args.username, args.roleName);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class getUsersWithRole<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUsersWithRole_args> {
public getUsersWithRole() {
super("getUsersWithRole");
}
public getUsersWithRole_args getEmptyArgsInstance() {
return new getUsersWithRole_args();
}
protected boolean isOneway() {
return false;
}
public getUsersWithRole_result getResult(I iface, getUsersWithRole_args args) throws org.apache.thrift.TException {
getUsersWithRole_result result = new getUsersWithRole_result();
try {
result.success = iface.getUsersWithRole(args.authzToken, args.roleName);
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.airavata.base.api.BaseAPI.AsyncProcessor<I> {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("setUpGateway", new setUpGateway());
processMap.put("isUsernameAvailable", new isUsernameAvailable());
processMap.put("registerUser", new registerUser());
processMap.put("enableUser", new enableUser());
processMap.put("isUserEnabled", new isUserEnabled());
processMap.put("isUserExist", new isUserExist());
processMap.put("getUser", new getUser());
processMap.put("getUsers", new getUsers());
processMap.put("resetUserPassword", new resetUserPassword());
processMap.put("findUsers", new findUsers());
processMap.put("updateUserProfile", new updateUserProfile());
processMap.put("deleteUser", new deleteUser());
processMap.put("addRoleToUser", new addRoleToUser());
processMap.put("removeRoleFromUser", new removeRoleFromUser());
processMap.put("getUsersWithRole", new getUsersWithRole());
return processMap;
}
public static class setUpGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUpGateway_args, org.apache.airavata.model.workspace.Gateway> {
public setUpGateway() {
super("setUpGateway");
}
public setUpGateway_args getEmptyArgsInstance() {
return new setUpGateway_args();
}
public org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway>() {
public void onComplete(org.apache.airavata.model.workspace.Gateway o) {
setUpGateway_result result = new setUpGateway_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
setUpGateway_result result = new setUpGateway_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, setUpGateway_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException {
iface.setUpGateway(args.authzToken, args.gateway,resultHandler);
}
}
public static class isUsernameAvailable<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUsernameAvailable_args, java.lang.Boolean> {
public isUsernameAvailable() {
super("isUsernameAvailable");
}
public isUsernameAvailable_args getEmptyArgsInstance() {
return new isUsernameAvailable_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
isUsernameAvailable_result result = new isUsernameAvailable_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
isUsernameAvailable_result result = new isUsernameAvailable_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, isUsernameAvailable_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.isUsernameAvailable(args.authzToken, args.username,resultHandler);
}
}
public static class registerUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUser_args, java.lang.Boolean> {
public registerUser() {
super("registerUser");
}
public registerUser_args getEmptyArgsInstance() {
return new registerUser_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
registerUser_result result = new registerUser_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
registerUser_result result = new registerUser_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, registerUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.registerUser(args.authzToken, args.username, args.emailAddress, args.firstName, args.lastName, args.newPassword,resultHandler);
}
}
public static class enableUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, enableUser_args, java.lang.Boolean> {
public enableUser() {
super("enableUser");
}
public enableUser_args getEmptyArgsInstance() {
return new enableUser_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
enableUser_result result = new enableUser_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
enableUser_result result = new enableUser_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, enableUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.enableUser(args.authzToken, args.username,resultHandler);
}
}
public static class isUserEnabled<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUserEnabled_args, java.lang.Boolean> {
public isUserEnabled() {
super("isUserEnabled");
}
public isUserEnabled_args getEmptyArgsInstance() {
return new isUserEnabled_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
isUserEnabled_result result = new isUserEnabled_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
isUserEnabled_result result = new isUserEnabled_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, isUserEnabled_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.isUserEnabled(args.authzToken, args.username,resultHandler);
}
}
public static class isUserExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUserExist_args, java.lang.Boolean> {
public isUserExist() {
super("isUserExist");
}
public isUserExist_args getEmptyArgsInstance() {
return new isUserExist_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
isUserExist_result result = new isUserExist_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
isUserExist_result result = new isUserExist_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, isUserExist_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.isUserExist(args.authzToken, args.username,resultHandler);
}
}
public static class getUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUser_args, org.apache.airavata.model.user.UserProfile> {
public getUser() {
super("getUser");
}
public getUser_args getEmptyArgsInstance() {
return new getUser_args();
}
public org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile>() {
public void onComplete(org.apache.airavata.model.user.UserProfile o) {
getUser_result result = new getUser_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getUser_result result = new getUser_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
iface.getUser(args.authzToken, args.username,resultHandler);
}
}
public static class getUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUsers_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
public getUsers() {
super("getUsers");
}
public getUsers_args getEmptyArgsInstance() {
return new getUsers_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() {
public void onComplete(java.util.List<org.apache.airavata.model.user.UserProfile> o) {
getUsers_result result = new getUsers_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getUsers_result result = new getUsers_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getUsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
iface.getUsers(args.authzToken, args.offset, args.limit, args.search,resultHandler);
}
}
public static class resetUserPassword<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, resetUserPassword_args, java.lang.Boolean> {
public resetUserPassword() {
super("resetUserPassword");
}
public resetUserPassword_args getEmptyArgsInstance() {
return new resetUserPassword_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
resetUserPassword_result result = new resetUserPassword_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
resetUserPassword_result result = new resetUserPassword_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, resetUserPassword_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.resetUserPassword(args.authzToken, args.username, args.newPassword,resultHandler);
}
}
public static class findUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUsers_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
public findUsers() {
super("findUsers");
}
public findUsers_args getEmptyArgsInstance() {
return new findUsers_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() {
public void onComplete(java.util.List<org.apache.airavata.model.user.UserProfile> o) {
findUsers_result result = new findUsers_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
findUsers_result result = new findUsers_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, findUsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
iface.findUsers(args.authzToken, args.email, args.userId,resultHandler);
}
}
public static class updateUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserProfile_args, Void> {
public updateUserProfile() {
super("updateUserProfile");
}
public updateUserProfile_args getEmptyArgsInstance() {
return new updateUserProfile_args();
}
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
updateUserProfile_result result = new updateUserProfile_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
updateUserProfile_result result = new updateUserProfile_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, updateUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.updateUserProfile(args.authzToken, args.userDetails,resultHandler);
}
}
public static class deleteUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUser_args, java.lang.Boolean> {
public deleteUser() {
super("deleteUser");
}
public deleteUser_args getEmptyArgsInstance() {
return new deleteUser_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
deleteUser_result result = new deleteUser_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
deleteUser_result result = new deleteUser_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.deleteUser(args.authzToken, args.username,resultHandler);
}
}
public static class addRoleToUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addRoleToUser_args, java.lang.Boolean> {
public addRoleToUser() {
super("addRoleToUser");
}
public addRoleToUser_args getEmptyArgsInstance() {
return new addRoleToUser_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
addRoleToUser_result result = new addRoleToUser_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
addRoleToUser_result result = new addRoleToUser_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, addRoleToUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.addRoleToUser(args.authzToken, args.username, args.roleName,resultHandler);
}
}
public static class removeRoleFromUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeRoleFromUser_args, java.lang.Boolean> {
public removeRoleFromUser() {
super("removeRoleFromUser");
}
public removeRoleFromUser_args getEmptyArgsInstance() {
return new removeRoleFromUser_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
removeRoleFromUser_result result = new removeRoleFromUser_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
removeRoleFromUser_result result = new removeRoleFromUser_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, removeRoleFromUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.removeRoleFromUser(args.authzToken, args.username, args.roleName,resultHandler);
}
}
public static class getUsersWithRole<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUsersWithRole_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
public getUsersWithRole() {
super("getUsersWithRole");
}
public getUsersWithRole_args getEmptyArgsInstance() {
return new getUsersWithRole_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() {
public void onComplete(java.util.List<org.apache.airavata.model.user.UserProfile> o) {
getUsersWithRole_result result = new getUsersWithRole_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getUsersWithRole_result result = new getUsersWithRole_result();
if (e instanceof org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
} else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getUsersWithRole_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
iface.getUsersWithRole(args.authzToken, args.roleName,resultHandler);
}
}
}
public static class setUpGateway_args implements org.apache.thrift.TBase<setUpGateway_args, setUpGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUpGateway_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUpGateway_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUpGateway_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUpGateway_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public org.apache.airavata.model.workspace.Gateway gateway; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
GATEWAY((short)2, "gateway");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // GATEWAY
return GATEWAY;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpGateway_args.class, metaDataMap);
}
public setUpGateway_args() {
}
public setUpGateway_args(
org.apache.airavata.model.security.AuthzToken authzToken,
org.apache.airavata.model.workspace.Gateway gateway)
{
this();
this.authzToken = authzToken;
this.gateway = gateway;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setUpGateway_args(setUpGateway_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGateway()) {
this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway);
}
}
public setUpGateway_args deepCopy() {
return new setUpGateway_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.gateway = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public setUpGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public org.apache.airavata.model.workspace.Gateway getGateway() {
return this.gateway;
}
public setUpGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) {
this.gateway = gateway;
return this;
}
public void unsetGateway() {
this.gateway = null;
}
/** Returns true if field gateway is set (has been assigned a value) and false otherwise */
public boolean isSetGateway() {
return this.gateway != null;
}
public void setGatewayIsSet(boolean value) {
if (!value) {
this.gateway = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case GATEWAY:
if (value == null) {
unsetGateway();
} else {
setGateway((org.apache.airavata.model.workspace.Gateway)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GATEWAY:
return getGateway();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case GATEWAY:
return isSetGateway();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof setUpGateway_args)
return this.equals((setUpGateway_args)that);
return false;
}
public boolean equals(setUpGateway_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_gateway = true && this.isSetGateway();
boolean that_present_gateway = true && that.isSetGateway();
if (this_present_gateway || that_present_gateway) {
if (!(this_present_gateway && that_present_gateway))
return false;
if (!this.gateway.equals(that.gateway))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetGateway()) ? 131071 : 524287);
if (isSetGateway())
hashCode = hashCode * 8191 + gateway.hashCode();
return hashCode;
}
@Override
public int compareTo(setUpGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGateway()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gateway, other.gateway);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("setUpGateway_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("gateway:");
if (this.gateway == null) {
sb.append("null");
} else {
sb.append(this.gateway);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (gateway == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gateway' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
if (gateway != null) {
gateway.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class setUpGateway_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public setUpGateway_argsStandardScheme getScheme() {
return new setUpGateway_argsStandardScheme();
}
}
private static class setUpGateway_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUpGateway_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, setUpGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // GATEWAY
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gateway = new org.apache.airavata.model.workspace.Gateway();
struct.gateway.read(iprot);
struct.setGatewayIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, setUpGateway_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.gateway != null) {
oprot.writeFieldBegin(GATEWAY_FIELD_DESC);
struct.gateway.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class setUpGateway_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public setUpGateway_argsTupleScheme getScheme() {
return new setUpGateway_argsTupleScheme();
}
}
private static class setUpGateway_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUpGateway_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUpGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
struct.gateway.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUpGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.gateway = new org.apache.airavata.model.workspace.Gateway();
struct.gateway.read(iprot);
struct.setGatewayIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class setUpGateway_result implements org.apache.thrift.TBase<setUpGateway_result, setUpGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUpGateway_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUpGateway_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUpGateway_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUpGateway_resultTupleSchemeFactory();
public org.apache.airavata.model.workspace.Gateway success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.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, org.apache.airavata.model.workspace.Gateway.class)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpGateway_result.class, metaDataMap);
}
public setUpGateway_result() {
}
public setUpGateway_result(
org.apache.airavata.model.workspace.Gateway success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setUpGateway_result(setUpGateway_result other) {
if (other.isSetSuccess()) {
this.success = new org.apache.airavata.model.workspace.Gateway(other.success);
}
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public setUpGateway_result deepCopy() {
return new setUpGateway_result(this);
}
@Override
public void clear() {
this.success = null;
this.Idse = null;
this.ae = null;
}
public org.apache.airavata.model.workspace.Gateway getSuccess() {
return this.success;
}
public setUpGateway_result setSuccess(org.apache.airavata.model.workspace.Gateway success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public setUpGateway_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public setUpGateway_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((org.apache.airavata.model.workspace.Gateway)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof setUpGateway_result)
return this.equals((setUpGateway_result)that);
return false;
}
public boolean equals(setUpGateway_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(setUpGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("setUpGateway_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = 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, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class setUpGateway_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public setUpGateway_resultStandardScheme getScheme() {
return new setUpGateway_resultStandardScheme();
}
}
private static class setUpGateway_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUpGateway_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, setUpGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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 org.apache.airavata.model.workspace.Gateway();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, setUpGateway_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class setUpGateway_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public setUpGateway_resultTupleScheme getScheme() {
return new setUpGateway_resultTupleScheme();
}
}
private static class setUpGateway_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUpGateway_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUpGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUpGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new org.apache.airavata.model.workspace.Gateway();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class isUsernameAvailable_args implements org.apache.thrift.TBase<isUsernameAvailable_args, isUsernameAvailable_args._Fields>, java.io.Serializable, Cloneable, Comparable<isUsernameAvailable_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUsernameAvailable_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUsernameAvailable_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUsernameAvailable_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUsernameAvailable_args.class, metaDataMap);
}
public isUsernameAvailable_args() {
}
public isUsernameAvailable_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username)
{
this();
this.authzToken = authzToken;
this.username = username;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isUsernameAvailable_args(isUsernameAvailable_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
}
public isUsernameAvailable_args deepCopy() {
return new isUsernameAvailable_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public isUsernameAvailable_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public isUsernameAvailable_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof isUsernameAvailable_args)
return this.equals((isUsernameAvailable_args)that);
return false;
}
public boolean equals(isUsernameAvailable_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
return hashCode;
}
@Override
public int compareTo(isUsernameAvailable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("isUsernameAvailable_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class isUsernameAvailable_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUsernameAvailable_argsStandardScheme getScheme() {
return new isUsernameAvailable_argsStandardScheme();
}
}
private static class isUsernameAvailable_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<isUsernameAvailable_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isUsernameAvailable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, isUsernameAvailable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isUsernameAvailable_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUsernameAvailable_argsTupleScheme getScheme() {
return new isUsernameAvailable_argsTupleScheme();
}
}
private static class isUsernameAvailable_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<isUsernameAvailable_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isUsernameAvailable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isUsernameAvailable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class isUsernameAvailable_result implements org.apache.thrift.TBase<isUsernameAvailable_result, isUsernameAvailable_result._Fields>, java.io.Serializable, Cloneable, Comparable<isUsernameAvailable_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUsernameAvailable_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUsernameAvailable_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUsernameAvailable_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUsernameAvailable_result.class, metaDataMap);
}
public isUsernameAvailable_result() {
}
public isUsernameAvailable_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isUsernameAvailable_result(isUsernameAvailable_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public isUsernameAvailable_result deepCopy() {
return new isUsernameAvailable_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public isUsernameAvailable_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public isUsernameAvailable_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public isUsernameAvailable_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof isUsernameAvailable_result)
return this.equals((isUsernameAvailable_result)that);
return false;
}
public boolean equals(isUsernameAvailable_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(isUsernameAvailable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("isUsernameAvailable_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class isUsernameAvailable_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUsernameAvailable_resultStandardScheme getScheme() {
return new isUsernameAvailable_resultStandardScheme();
}
}
private static class isUsernameAvailable_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<isUsernameAvailable_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isUsernameAvailable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, isUsernameAvailable_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isUsernameAvailable_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUsernameAvailable_resultTupleScheme getScheme() {
return new isUsernameAvailable_resultTupleScheme();
}
}
private static class isUsernameAvailable_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<isUsernameAvailable_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isUsernameAvailable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isUsernameAvailable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class registerUser_args implements org.apache.thrift.TBase<registerUser_args, registerUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerUser_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField EMAIL_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("emailAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField NEW_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("newPassword", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerUser_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerUser_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
public java.lang.String emailAddress; // required
public java.lang.String firstName; // required
public java.lang.String lastName; // required
public java.lang.String newPassword; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username"),
EMAIL_ADDRESS((short)3, "emailAddress"),
FIRST_NAME((short)4, "firstName"),
LAST_NAME((short)5, "lastName"),
NEW_PASSWORD((short)6, "newPassword");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
case 3: // EMAIL_ADDRESS
return EMAIL_ADDRESS;
case 4: // FIRST_NAME
return FIRST_NAME;
case 5: // LAST_NAME
return LAST_NAME;
case 6: // NEW_PASSWORD
return NEW_PASSWORD;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EMAIL_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("emailAddress", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NEW_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("newPassword", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerUser_args.class, metaDataMap);
}
public registerUser_args() {
}
public registerUser_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username,
java.lang.String emailAddress,
java.lang.String firstName,
java.lang.String lastName,
java.lang.String newPassword)
{
this();
this.authzToken = authzToken;
this.username = username;
this.emailAddress = emailAddress;
this.firstName = firstName;
this.lastName = lastName;
this.newPassword = newPassword;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public registerUser_args(registerUser_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
if (other.isSetEmailAddress()) {
this.emailAddress = other.emailAddress;
}
if (other.isSetFirstName()) {
this.firstName = other.firstName;
}
if (other.isSetLastName()) {
this.lastName = other.lastName;
}
if (other.isSetNewPassword()) {
this.newPassword = other.newPassword;
}
}
public registerUser_args deepCopy() {
return new registerUser_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
this.emailAddress = null;
this.firstName = null;
this.lastName = null;
this.newPassword = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public registerUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public registerUser_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public java.lang.String getEmailAddress() {
return this.emailAddress;
}
public registerUser_args setEmailAddress(java.lang.String emailAddress) {
this.emailAddress = emailAddress;
return this;
}
public void unsetEmailAddress() {
this.emailAddress = null;
}
/** Returns true if field emailAddress is set (has been assigned a value) and false otherwise */
public boolean isSetEmailAddress() {
return this.emailAddress != null;
}
public void setEmailAddressIsSet(boolean value) {
if (!value) {
this.emailAddress = null;
}
}
public java.lang.String getFirstName() {
return this.firstName;
}
public registerUser_args setFirstName(java.lang.String firstName) {
this.firstName = firstName;
return this;
}
public void unsetFirstName() {
this.firstName = null;
}
/** Returns true if field firstName is set (has been assigned a value) and false otherwise */
public boolean isSetFirstName() {
return this.firstName != null;
}
public void setFirstNameIsSet(boolean value) {
if (!value) {
this.firstName = null;
}
}
public java.lang.String getLastName() {
return this.lastName;
}
public registerUser_args setLastName(java.lang.String lastName) {
this.lastName = lastName;
return this;
}
public void unsetLastName() {
this.lastName = null;
}
/** Returns true if field lastName is set (has been assigned a value) and false otherwise */
public boolean isSetLastName() {
return this.lastName != null;
}
public void setLastNameIsSet(boolean value) {
if (!value) {
this.lastName = null;
}
}
public java.lang.String getNewPassword() {
return this.newPassword;
}
public registerUser_args setNewPassword(java.lang.String newPassword) {
this.newPassword = newPassword;
return this;
}
public void unsetNewPassword() {
this.newPassword = null;
}
/** Returns true if field newPassword is set (has been assigned a value) and false otherwise */
public boolean isSetNewPassword() {
return this.newPassword != null;
}
public void setNewPasswordIsSet(boolean value) {
if (!value) {
this.newPassword = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
case EMAIL_ADDRESS:
if (value == null) {
unsetEmailAddress();
} else {
setEmailAddress((java.lang.String)value);
}
break;
case FIRST_NAME:
if (value == null) {
unsetFirstName();
} else {
setFirstName((java.lang.String)value);
}
break;
case LAST_NAME:
if (value == null) {
unsetLastName();
} else {
setLastName((java.lang.String)value);
}
break;
case NEW_PASSWORD:
if (value == null) {
unsetNewPassword();
} else {
setNewPassword((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
case EMAIL_ADDRESS:
return getEmailAddress();
case FIRST_NAME:
return getFirstName();
case LAST_NAME:
return getLastName();
case NEW_PASSWORD:
return getNewPassword();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
case EMAIL_ADDRESS:
return isSetEmailAddress();
case FIRST_NAME:
return isSetFirstName();
case LAST_NAME:
return isSetLastName();
case NEW_PASSWORD:
return isSetNewPassword();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof registerUser_args)
return this.equals((registerUser_args)that);
return false;
}
public boolean equals(registerUser_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
boolean this_present_emailAddress = true && this.isSetEmailAddress();
boolean that_present_emailAddress = true && that.isSetEmailAddress();
if (this_present_emailAddress || that_present_emailAddress) {
if (!(this_present_emailAddress && that_present_emailAddress))
return false;
if (!this.emailAddress.equals(that.emailAddress))
return false;
}
boolean this_present_firstName = true && this.isSetFirstName();
boolean that_present_firstName = true && that.isSetFirstName();
if (this_present_firstName || that_present_firstName) {
if (!(this_present_firstName && that_present_firstName))
return false;
if (!this.firstName.equals(that.firstName))
return false;
}
boolean this_present_lastName = true && this.isSetLastName();
boolean that_present_lastName = true && that.isSetLastName();
if (this_present_lastName || that_present_lastName) {
if (!(this_present_lastName && that_present_lastName))
return false;
if (!this.lastName.equals(that.lastName))
return false;
}
boolean this_present_newPassword = true && this.isSetNewPassword();
boolean that_present_newPassword = true && that.isSetNewPassword();
if (this_present_newPassword || that_present_newPassword) {
if (!(this_present_newPassword && that_present_newPassword))
return false;
if (!this.newPassword.equals(that.newPassword))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
hashCode = hashCode * 8191 + ((isSetEmailAddress()) ? 131071 : 524287);
if (isSetEmailAddress())
hashCode = hashCode * 8191 + emailAddress.hashCode();
hashCode = hashCode * 8191 + ((isSetFirstName()) ? 131071 : 524287);
if (isSetFirstName())
hashCode = hashCode * 8191 + firstName.hashCode();
hashCode = hashCode * 8191 + ((isSetLastName()) ? 131071 : 524287);
if (isSetLastName())
hashCode = hashCode * 8191 + lastName.hashCode();
hashCode = hashCode * 8191 + ((isSetNewPassword()) ? 131071 : 524287);
if (isSetNewPassword())
hashCode = hashCode * 8191 + newPassword.hashCode();
return hashCode;
}
@Override
public int compareTo(registerUser_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetEmailAddress()).compareTo(other.isSetEmailAddress());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEmailAddress()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailAddress, other.emailAddress);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFirstName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetNewPassword()).compareTo(other.isSetNewPassword());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNewPassword()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newPassword, other.newPassword);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("registerUser_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
if (!first) sb.append(", ");
sb.append("emailAddress:");
if (this.emailAddress == null) {
sb.append("null");
} else {
sb.append(this.emailAddress);
}
first = false;
if (!first) sb.append(", ");
sb.append("firstName:");
if (this.firstName == null) {
sb.append("null");
} else {
sb.append(this.firstName);
}
first = false;
if (!first) sb.append(", ");
sb.append("lastName:");
if (this.lastName == null) {
sb.append("null");
} else {
sb.append(this.lastName);
}
first = false;
if (!first) sb.append(", ");
sb.append("newPassword:");
if (this.newPassword == null) {
sb.append("null");
} else {
sb.append(this.newPassword);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
if (emailAddress == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'emailAddress' was not present! Struct: " + toString());
}
if (firstName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'firstName' was not present! Struct: " + toString());
}
if (lastName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'lastName' was not present! Struct: " + toString());
}
if (newPassword == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'newPassword' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class registerUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public registerUser_argsStandardScheme getScheme() {
return new registerUser_argsStandardScheme();
}
}
private static class registerUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<registerUser_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, registerUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // EMAIL_ADDRESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.emailAddress = iprot.readString();
struct.setEmailAddressIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // FIRST_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.firstName = iprot.readString();
struct.setFirstNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // LAST_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.lastName = iprot.readString();
struct.setLastNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // NEW_PASSWORD
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.newPassword = iprot.readString();
struct.setNewPasswordIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, registerUser_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
if (struct.emailAddress != null) {
oprot.writeFieldBegin(EMAIL_ADDRESS_FIELD_DESC);
oprot.writeString(struct.emailAddress);
oprot.writeFieldEnd();
}
if (struct.firstName != null) {
oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC);
oprot.writeString(struct.firstName);
oprot.writeFieldEnd();
}
if (struct.lastName != null) {
oprot.writeFieldBegin(LAST_NAME_FIELD_DESC);
oprot.writeString(struct.lastName);
oprot.writeFieldEnd();
}
if (struct.newPassword != null) {
oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
oprot.writeString(struct.newPassword);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class registerUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public registerUser_argsTupleScheme getScheme() {
return new registerUser_argsTupleScheme();
}
}
private static class registerUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<registerUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, registerUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
oprot.writeString(struct.emailAddress);
oprot.writeString(struct.firstName);
oprot.writeString(struct.lastName);
oprot.writeString(struct.newPassword);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, registerUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
struct.emailAddress = iprot.readString();
struct.setEmailAddressIsSet(true);
struct.firstName = iprot.readString();
struct.setFirstNameIsSet(true);
struct.lastName = iprot.readString();
struct.setLastNameIsSet(true);
struct.newPassword = iprot.readString();
struct.setNewPasswordIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class registerUser_result implements org.apache.thrift.TBase<registerUser_result, registerUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerUser_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerUser_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerUser_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerUser_result.class, metaDataMap);
}
public registerUser_result() {
}
public registerUser_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public registerUser_result(registerUser_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public registerUser_result deepCopy() {
return new registerUser_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public registerUser_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public registerUser_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public registerUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof registerUser_result)
return this.equals((registerUser_result)that);
return false;
}
public boolean equals(registerUser_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(registerUser_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("registerUser_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class registerUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public registerUser_resultStandardScheme getScheme() {
return new registerUser_resultStandardScheme();
}
}
private static class registerUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<registerUser_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, registerUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, registerUser_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class registerUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public registerUser_resultTupleScheme getScheme() {
return new registerUser_resultTupleScheme();
}
}
private static class registerUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<registerUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, registerUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, registerUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class enableUser_args implements org.apache.thrift.TBase<enableUser_args, enableUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<enableUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableUser_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new enableUser_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new enableUser_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableUser_args.class, metaDataMap);
}
public enableUser_args() {
}
public enableUser_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username)
{
this();
this.authzToken = authzToken;
this.username = username;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public enableUser_args(enableUser_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
}
public enableUser_args deepCopy() {
return new enableUser_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public enableUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public enableUser_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof enableUser_args)
return this.equals((enableUser_args)that);
return false;
}
public boolean equals(enableUser_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
return hashCode;
}
@Override
public int compareTo(enableUser_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("enableUser_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class enableUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public enableUser_argsStandardScheme getScheme() {
return new enableUser_argsStandardScheme();
}
}
private static class enableUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<enableUser_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, enableUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, enableUser_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class enableUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public enableUser_argsTupleScheme getScheme() {
return new enableUser_argsTupleScheme();
}
}
private static class enableUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<enableUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, enableUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, enableUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class enableUser_result implements org.apache.thrift.TBase<enableUser_result, enableUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<enableUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableUser_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new enableUser_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new enableUser_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableUser_result.class, metaDataMap);
}
public enableUser_result() {
}
public enableUser_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public enableUser_result(enableUser_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public enableUser_result deepCopy() {
return new enableUser_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public enableUser_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public enableUser_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public enableUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof enableUser_result)
return this.equals((enableUser_result)that);
return false;
}
public boolean equals(enableUser_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(enableUser_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("enableUser_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class enableUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public enableUser_resultStandardScheme getScheme() {
return new enableUser_resultStandardScheme();
}
}
private static class enableUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<enableUser_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, enableUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, enableUser_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class enableUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public enableUser_resultTupleScheme getScheme() {
return new enableUser_resultTupleScheme();
}
}
private static class enableUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<enableUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, enableUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, enableUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class isUserEnabled_args implements org.apache.thrift.TBase<isUserEnabled_args, isUserEnabled_args._Fields>, java.io.Serializable, Cloneable, Comparable<isUserEnabled_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUserEnabled_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUserEnabled_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUserEnabled_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUserEnabled_args.class, metaDataMap);
}
public isUserEnabled_args() {
}
public isUserEnabled_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username)
{
this();
this.authzToken = authzToken;
this.username = username;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isUserEnabled_args(isUserEnabled_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
}
public isUserEnabled_args deepCopy() {
return new isUserEnabled_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public isUserEnabled_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public isUserEnabled_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof isUserEnabled_args)
return this.equals((isUserEnabled_args)that);
return false;
}
public boolean equals(isUserEnabled_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
return hashCode;
}
@Override
public int compareTo(isUserEnabled_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("isUserEnabled_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class isUserEnabled_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserEnabled_argsStandardScheme getScheme() {
return new isUserEnabled_argsStandardScheme();
}
}
private static class isUserEnabled_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<isUserEnabled_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isUserEnabled_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, isUserEnabled_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isUserEnabled_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserEnabled_argsTupleScheme getScheme() {
return new isUserEnabled_argsTupleScheme();
}
}
private static class isUserEnabled_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<isUserEnabled_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isUserEnabled_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isUserEnabled_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class isUserEnabled_result implements org.apache.thrift.TBase<isUserEnabled_result, isUserEnabled_result._Fields>, java.io.Serializable, Cloneable, Comparable<isUserEnabled_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUserEnabled_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUserEnabled_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUserEnabled_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUserEnabled_result.class, metaDataMap);
}
public isUserEnabled_result() {
}
public isUserEnabled_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isUserEnabled_result(isUserEnabled_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public isUserEnabled_result deepCopy() {
return new isUserEnabled_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public isUserEnabled_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public isUserEnabled_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public isUserEnabled_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof isUserEnabled_result)
return this.equals((isUserEnabled_result)that);
return false;
}
public boolean equals(isUserEnabled_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(isUserEnabled_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("isUserEnabled_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class isUserEnabled_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserEnabled_resultStandardScheme getScheme() {
return new isUserEnabled_resultStandardScheme();
}
}
private static class isUserEnabled_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<isUserEnabled_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isUserEnabled_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, isUserEnabled_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isUserEnabled_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserEnabled_resultTupleScheme getScheme() {
return new isUserEnabled_resultTupleScheme();
}
}
private static class isUserEnabled_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<isUserEnabled_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isUserEnabled_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isUserEnabled_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class isUserExist_args implements org.apache.thrift.TBase<isUserExist_args, isUserExist_args._Fields>, java.io.Serializable, Cloneable, Comparable<isUserExist_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUserExist_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUserExist_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUserExist_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUserExist_args.class, metaDataMap);
}
public isUserExist_args() {
}
public isUserExist_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username)
{
this();
this.authzToken = authzToken;
this.username = username;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isUserExist_args(isUserExist_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
}
public isUserExist_args deepCopy() {
return new isUserExist_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public isUserExist_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public isUserExist_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof isUserExist_args)
return this.equals((isUserExist_args)that);
return false;
}
public boolean equals(isUserExist_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
return hashCode;
}
@Override
public int compareTo(isUserExist_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("isUserExist_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class isUserExist_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserExist_argsStandardScheme getScheme() {
return new isUserExist_argsStandardScheme();
}
}
private static class isUserExist_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<isUserExist_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isUserExist_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, isUserExist_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isUserExist_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserExist_argsTupleScheme getScheme() {
return new isUserExist_argsTupleScheme();
}
}
private static class isUserExist_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<isUserExist_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isUserExist_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isUserExist_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class isUserExist_result implements org.apache.thrift.TBase<isUserExist_result, isUserExist_result._Fields>, java.io.Serializable, Cloneable, Comparable<isUserExist_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isUserExist_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUserExist_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUserExist_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUserExist_result.class, metaDataMap);
}
public isUserExist_result() {
}
public isUserExist_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isUserExist_result(isUserExist_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public isUserExist_result deepCopy() {
return new isUserExist_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public isUserExist_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public isUserExist_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public isUserExist_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof isUserExist_result)
return this.equals((isUserExist_result)that);
return false;
}
public boolean equals(isUserExist_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(isUserExist_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("isUserExist_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class isUserExist_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserExist_resultStandardScheme getScheme() {
return new isUserExist_resultStandardScheme();
}
}
private static class isUserExist_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<isUserExist_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isUserExist_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, isUserExist_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isUserExist_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public isUserExist_resultTupleScheme getScheme() {
return new isUserExist_resultTupleScheme();
}
}
private static class isUserExist_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<isUserExist_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isUserExist_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isUserExist_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getUser_args implements org.apache.thrift.TBase<getUser_args, getUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUser_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUser_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUser_args.class, metaDataMap);
}
public getUser_args() {
}
public getUser_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username)
{
this();
this.authzToken = authzToken;
this.username = username;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUser_args(getUser_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
}
public getUser_args deepCopy() {
return new getUser_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public getUser_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getUser_args)
return this.equals((getUser_args)that);
return false;
}
public boolean equals(getUser_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
return hashCode;
}
@Override
public int compareTo(getUser_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUser_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUser_argsStandardScheme getScheme() {
return new getUser_argsStandardScheme();
}
}
private static class getUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUser_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUser_argsTupleScheme getScheme() {
return new getUser_argsTupleScheme();
}
}
private static class getUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getUser_result implements org.apache.thrift.TBase<getUser_result, getUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUser_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUser_resultTupleSchemeFactory();
public org.apache.airavata.model.user.UserProfile success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.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, org.apache.airavata.model.user.UserProfile.class)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUser_result.class, metaDataMap);
}
public getUser_result() {
}
public getUser_result(
org.apache.airavata.model.user.UserProfile success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUser_result(getUser_result other) {
if (other.isSetSuccess()) {
this.success = new org.apache.airavata.model.user.UserProfile(other.success);
}
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getUser_result deepCopy() {
return new getUser_result(this);
}
@Override
public void clear() {
this.success = null;
this.Idse = null;
this.ae = null;
}
public org.apache.airavata.model.user.UserProfile getSuccess() {
return this.success;
}
public getUser_result setSuccess(org.apache.airavata.model.user.UserProfile success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public getUser_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((org.apache.airavata.model.user.UserProfile)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getUser_result)
return this.equals((getUser_result)that);
return false;
}
public boolean equals(getUser_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getUser_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUser_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = 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, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUser_resultStandardScheme getScheme() {
return new getUser_resultStandardScheme();
}
}
private static class getUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUser_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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 org.apache.airavata.model.user.UserProfile();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUser_resultTupleScheme getScheme() {
return new getUser_resultTupleScheme();
}
}
private static class getUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new org.apache.airavata.model.user.UserProfile();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getUsers_args implements org.apache.thrift.TBase<getUsers_args, getUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUsers_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUsers_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("search", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUsers_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUsers_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public int offset; // required
public int limit; // required
public java.lang.String search; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
OFFSET((short)2, "offset"),
LIMIT((short)3, "limit"),
SEARCH((short)4, "search");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // OFFSET
return OFFSET;
case 3: // LIMIT
return LIMIT;
case 4: // SEARCH
return SEARCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __OFFSET_ISSET_ID = 0;
private static final int __LIMIT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.SEARCH, new org.apache.thrift.meta_data.FieldMetaData("search", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsers_args.class, metaDataMap);
}
public getUsers_args() {
}
public getUsers_args(
org.apache.airavata.model.security.AuthzToken authzToken,
int offset,
int limit,
java.lang.String search)
{
this();
this.authzToken = authzToken;
this.offset = offset;
setOffsetIsSet(true);
this.limit = limit;
setLimitIsSet(true);
this.search = search;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUsers_args(getUsers_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
this.offset = other.offset;
this.limit = other.limit;
if (other.isSetSearch()) {
this.search = other.search;
}
}
public getUsers_args deepCopy() {
return new getUsers_args(this);
}
@Override
public void clear() {
this.authzToken = null;
setOffsetIsSet(false);
this.offset = 0;
setLimitIsSet(false);
this.limit = 0;
this.search = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getUsers_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public int getOffset() {
return this.offset;
}
public getUsers_args setOffset(int offset) {
this.offset = offset;
setOffsetIsSet(true);
return this;
}
public void unsetOffset() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
}
/** Returns true if field offset is set (has been assigned a value) and false otherwise */
public boolean isSetOffset() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
}
public void setOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
}
public int getLimit() {
return this.limit;
}
public getUsers_args setLimit(int limit) {
this.limit = limit;
setLimitIsSet(true);
return this;
}
public void unsetLimit() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMIT_ISSET_ID);
}
/** Returns true if field limit is set (has been assigned a value) and false otherwise */
public boolean isSetLimit() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMIT_ISSET_ID);
}
public void setLimitIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMIT_ISSET_ID, value);
}
public java.lang.String getSearch() {
return this.search;
}
public getUsers_args setSearch(java.lang.String search) {
this.search = search;
return this;
}
public void unsetSearch() {
this.search = null;
}
/** Returns true if field search is set (has been assigned a value) and false otherwise */
public boolean isSetSearch() {
return this.search != null;
}
public void setSearchIsSet(boolean value) {
if (!value) {
this.search = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case OFFSET:
if (value == null) {
unsetOffset();
} else {
setOffset((java.lang.Integer)value);
}
break;
case LIMIT:
if (value == null) {
unsetLimit();
} else {
setLimit((java.lang.Integer)value);
}
break;
case SEARCH:
if (value == null) {
unsetSearch();
} else {
setSearch((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case OFFSET:
return getOffset();
case LIMIT:
return getLimit();
case SEARCH:
return getSearch();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case OFFSET:
return isSetOffset();
case LIMIT:
return isSetLimit();
case SEARCH:
return isSetSearch();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getUsers_args)
return this.equals((getUsers_args)that);
return false;
}
public boolean equals(getUsers_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_offset = true;
boolean that_present_offset = true;
if (this_present_offset || that_present_offset) {
if (!(this_present_offset && that_present_offset))
return false;
if (this.offset != that.offset)
return false;
}
boolean this_present_limit = true;
boolean that_present_limit = true;
if (this_present_limit || that_present_limit) {
if (!(this_present_limit && that_present_limit))
return false;
if (this.limit != that.limit)
return false;
}
boolean this_present_search = true && this.isSetSearch();
boolean that_present_search = true && that.isSetSearch();
if (this_present_search || that_present_search) {
if (!(this_present_search && that_present_search))
return false;
if (!this.search.equals(that.search))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + offset;
hashCode = hashCode * 8191 + limit;
hashCode = hashCode * 8191 + ((isSetSearch()) ? 131071 : 524287);
if (isSetSearch())
hashCode = hashCode * 8191 + search.hashCode();
return hashCode;
}
@Override
public int compareTo(getUsers_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLimit()).compareTo(other.isSetLimit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLimit()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetSearch()).compareTo(other.isSetSearch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSearch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.search, other.search);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUsers_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("offset:");
sb.append(this.offset);
first = false;
if (!first) sb.append(", ");
sb.append("limit:");
sb.append(this.limit);
first = false;
if (!first) sb.append(", ");
sb.append("search:");
if (this.search == null) {
sb.append("null");
} else {
sb.append(this.search);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
// alas, we cannot check 'offset' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'limit' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUsers_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsers_argsStandardScheme getScheme() {
return new getUsers_argsStandardScheme();
}
}
private static class getUsers_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUsers_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUsers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.offset = iprot.readI32();
struct.setOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // LIMIT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.limit = iprot.readI32();
struct.setLimitIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // SEARCH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.search = iprot.readString();
struct.setSearchIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetOffset()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'offset' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetLimit()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'limit' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUsers_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(OFFSET_FIELD_DESC);
oprot.writeI32(struct.offset);
oprot.writeFieldEnd();
oprot.writeFieldBegin(LIMIT_FIELD_DESC);
oprot.writeI32(struct.limit);
oprot.writeFieldEnd();
if (struct.search != null) {
oprot.writeFieldBegin(SEARCH_FIELD_DESC);
oprot.writeString(struct.search);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUsers_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsers_argsTupleScheme getScheme() {
return new getUsers_argsTupleScheme();
}
}
private static class getUsers_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUsers_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUsers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeI32(struct.offset);
oprot.writeI32(struct.limit);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSearch()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSearch()) {
oprot.writeString(struct.search);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUsers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.offset = iprot.readI32();
struct.setOffsetIsSet(true);
struct.limit = iprot.readI32();
struct.setLimitIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.search = iprot.readString();
struct.setSearchIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getUsers_result implements org.apache.thrift.TBase<getUsers_result, getUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUsers_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUsers_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUsers_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUsers_resultTupleSchemeFactory();
public java.util.List<org.apache.airavata.model.user.UserProfile> success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class))));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsers_result.class, metaDataMap);
}
public getUsers_result() {
}
public getUsers_result(
java.util.List<org.apache.airavata.model.user.UserProfile> success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUsers_result(getUsers_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.user.UserProfile> __this__success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(other.success.size());
for (org.apache.airavata.model.user.UserProfile other_element : other.success) {
__this__success.add(new org.apache.airavata.model.user.UserProfile(other_element));
}
this.success = __this__success;
}
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getUsers_result deepCopy() {
return new getUsers_result(this);
}
@Override
public void clear() {
this.success = null;
this.Idse = null;
this.ae = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<org.apache.airavata.model.user.UserProfile> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(org.apache.airavata.model.user.UserProfile elem) {
if (this.success == null) {
this.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getSuccess() {
return this.success;
}
public getUsers_result setSuccess(java.util.List<org.apache.airavata.model.user.UserProfile> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public getUsers_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getUsers_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.List<org.apache.airavata.model.user.UserProfile>)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getUsers_result)
return this.equals((getUsers_result)that);
return false;
}
public boolean equals(getUsers_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getUsers_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUsers_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUsers_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsers_resultStandardScheme getScheme() {
return new getUsers_resultStandardScheme();
}
}
private static class getUsers_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUsers_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUsers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(_list0.size);
org.apache.airavata.model.user.UserProfile _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new org.apache.airavata.model.user.UserProfile();
_elem1.read(iprot);
struct.success.add(_elem1);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUsers_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (org.apache.airavata.model.user.UserProfile _iter3 : struct.success)
{
_iter3.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUsers_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsers_resultTupleScheme getScheme() {
return new getUsers_resultTupleScheme();
}
}
private static class getUsers_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUsers_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUsers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (org.apache.airavata.model.user.UserProfile _iter4 : struct.success)
{
_iter4.write(oprot);
}
}
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUsers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(_list5.size);
org.apache.airavata.model.user.UserProfile _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = new org.apache.airavata.model.user.UserProfile();
_elem6.read(iprot);
struct.success.add(_elem6);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class resetUserPassword_args implements org.apache.thrift.TBase<resetUserPassword_args, resetUserPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<resetUserPassword_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetUserPassword_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField NEW_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("newPassword", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new resetUserPassword_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new resetUserPassword_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
public java.lang.String newPassword; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username"),
NEW_PASSWORD((short)3, "newPassword");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
case 3: // NEW_PASSWORD
return NEW_PASSWORD;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NEW_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("newPassword", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetUserPassword_args.class, metaDataMap);
}
public resetUserPassword_args() {
}
public resetUserPassword_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username,
java.lang.String newPassword)
{
this();
this.authzToken = authzToken;
this.username = username;
this.newPassword = newPassword;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public resetUserPassword_args(resetUserPassword_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
if (other.isSetNewPassword()) {
this.newPassword = other.newPassword;
}
}
public resetUserPassword_args deepCopy() {
return new resetUserPassword_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
this.newPassword = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public resetUserPassword_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public resetUserPassword_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public java.lang.String getNewPassword() {
return this.newPassword;
}
public resetUserPassword_args setNewPassword(java.lang.String newPassword) {
this.newPassword = newPassword;
return this;
}
public void unsetNewPassword() {
this.newPassword = null;
}
/** Returns true if field newPassword is set (has been assigned a value) and false otherwise */
public boolean isSetNewPassword() {
return this.newPassword != null;
}
public void setNewPasswordIsSet(boolean value) {
if (!value) {
this.newPassword = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
case NEW_PASSWORD:
if (value == null) {
unsetNewPassword();
} else {
setNewPassword((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
case NEW_PASSWORD:
return getNewPassword();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
case NEW_PASSWORD:
return isSetNewPassword();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof resetUserPassword_args)
return this.equals((resetUserPassword_args)that);
return false;
}
public boolean equals(resetUserPassword_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
boolean this_present_newPassword = true && this.isSetNewPassword();
boolean that_present_newPassword = true && that.isSetNewPassword();
if (this_present_newPassword || that_present_newPassword) {
if (!(this_present_newPassword && that_present_newPassword))
return false;
if (!this.newPassword.equals(that.newPassword))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
hashCode = hashCode * 8191 + ((isSetNewPassword()) ? 131071 : 524287);
if (isSetNewPassword())
hashCode = hashCode * 8191 + newPassword.hashCode();
return hashCode;
}
@Override
public int compareTo(resetUserPassword_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetNewPassword()).compareTo(other.isSetNewPassword());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNewPassword()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newPassword, other.newPassword);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("resetUserPassword_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
if (!first) sb.append(", ");
sb.append("newPassword:");
if (this.newPassword == null) {
sb.append("null");
} else {
sb.append(this.newPassword);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
if (newPassword == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'newPassword' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class resetUserPassword_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public resetUserPassword_argsStandardScheme getScheme() {
return new resetUserPassword_argsStandardScheme();
}
}
private static class resetUserPassword_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<resetUserPassword_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, resetUserPassword_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // NEW_PASSWORD
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.newPassword = iprot.readString();
struct.setNewPasswordIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, resetUserPassword_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
if (struct.newPassword != null) {
oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
oprot.writeString(struct.newPassword);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class resetUserPassword_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public resetUserPassword_argsTupleScheme getScheme() {
return new resetUserPassword_argsTupleScheme();
}
}
private static class resetUserPassword_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<resetUserPassword_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, resetUserPassword_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
oprot.writeString(struct.newPassword);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, resetUserPassword_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
struct.newPassword = iprot.readString();
struct.setNewPasswordIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class resetUserPassword_result implements org.apache.thrift.TBase<resetUserPassword_result, resetUserPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetUserPassword_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetUserPassword_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new resetUserPassword_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new resetUserPassword_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetUserPassword_result.class, metaDataMap);
}
public resetUserPassword_result() {
}
public resetUserPassword_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public resetUserPassword_result(resetUserPassword_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public resetUserPassword_result deepCopy() {
return new resetUserPassword_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public resetUserPassword_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public resetUserPassword_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public resetUserPassword_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof resetUserPassword_result)
return this.equals((resetUserPassword_result)that);
return false;
}
public boolean equals(resetUserPassword_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(resetUserPassword_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("resetUserPassword_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class resetUserPassword_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public resetUserPassword_resultStandardScheme getScheme() {
return new resetUserPassword_resultStandardScheme();
}
}
private static class resetUserPassword_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<resetUserPassword_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, resetUserPassword_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, resetUserPassword_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class resetUserPassword_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public resetUserPassword_resultTupleScheme getScheme() {
return new resetUserPassword_resultTupleScheme();
}
}
private static class resetUserPassword_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<resetUserPassword_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, resetUserPassword_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, resetUserPassword_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class findUsers_args implements org.apache.thrift.TBase<findUsers_args, findUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<findUsers_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUsers_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new findUsers_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new findUsers_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String email; // required
public java.lang.String userId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
EMAIL((short)2, "email"),
USER_ID((short)3, "userId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // EMAIL
return EMAIL;
case 3: // USER_ID
return USER_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUsers_args.class, metaDataMap);
}
public findUsers_args() {
}
public findUsers_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String email,
java.lang.String userId)
{
this();
this.authzToken = authzToken;
this.email = email;
this.userId = userId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findUsers_args(findUsers_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetEmail()) {
this.email = other.email;
}
if (other.isSetUserId()) {
this.userId = other.userId;
}
}
public findUsers_args deepCopy() {
return new findUsers_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.email = null;
this.userId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public findUsers_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getEmail() {
return this.email;
}
public findUsers_args setEmail(java.lang.String email) {
this.email = email;
return this;
}
public void unsetEmail() {
this.email = null;
}
/** Returns true if field email is set (has been assigned a value) and false otherwise */
public boolean isSetEmail() {
return this.email != null;
}
public void setEmailIsSet(boolean value) {
if (!value) {
this.email = null;
}
}
public java.lang.String getUserId() {
return this.userId;
}
public findUsers_args setUserId(java.lang.String userId) {
this.userId = userId;
return this;
}
public void unsetUserId() {
this.userId = null;
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return this.userId != null;
}
public void setUserIdIsSet(boolean value) {
if (!value) {
this.userId = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case EMAIL:
if (value == null) {
unsetEmail();
} else {
setEmail((java.lang.String)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case EMAIL:
return getEmail();
case USER_ID:
return getUserId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case EMAIL:
return isSetEmail();
case USER_ID:
return isSetUserId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof findUsers_args)
return this.equals((findUsers_args)that);
return false;
}
public boolean equals(findUsers_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_email = true && this.isSetEmail();
boolean that_present_email = true && that.isSetEmail();
if (this_present_email || that_present_email) {
if (!(this_present_email && that_present_email))
return false;
if (!this.email.equals(that.email))
return false;
}
boolean this_present_userId = true && this.isSetUserId();
boolean that_present_userId = true && that.isSetUserId();
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (!this.userId.equals(that.userId))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetEmail()) ? 131071 : 524287);
if (isSetEmail())
hashCode = hashCode * 8191 + email.hashCode();
hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
if (isSetUserId())
hashCode = hashCode * 8191 + userId.hashCode();
return hashCode;
}
@Override
public int compareTo(findUsers_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEmail()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, other.email);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("findUsers_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("email:");
if (this.email == null) {
sb.append("null");
} else {
sb.append(this.email);
}
first = false;
if (!first) sb.append(", ");
sb.append("userId:");
if (this.userId == null) {
sb.append("null");
} else {
sb.append(this.userId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (email == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'email' was not present! Struct: " + toString());
}
if (userId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class findUsers_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public findUsers_argsStandardScheme getScheme() {
return new findUsers_argsStandardScheme();
}
}
private static class findUsers_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<findUsers_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, findUsers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // EMAIL
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.email = iprot.readString();
struct.setEmailIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.userId = iprot.readString();
struct.setUserIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, findUsers_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.email != null) {
oprot.writeFieldBegin(EMAIL_FIELD_DESC);
oprot.writeString(struct.email);
oprot.writeFieldEnd();
}
if (struct.userId != null) {
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeString(struct.userId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findUsers_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public findUsers_argsTupleScheme getScheme() {
return new findUsers_argsTupleScheme();
}
}
private static class findUsers_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<findUsers_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, findUsers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.email);
oprot.writeString(struct.userId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findUsers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.email = iprot.readString();
struct.setEmailIsSet(true);
struct.userId = iprot.readString();
struct.setUserIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class findUsers_result implements org.apache.thrift.TBase<findUsers_result, findUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<findUsers_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUsers_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new findUsers_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new findUsers_resultTupleSchemeFactory();
public java.util.List<org.apache.airavata.model.user.UserProfile> success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class))));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUsers_result.class, metaDataMap);
}
public findUsers_result() {
}
public findUsers_result(
java.util.List<org.apache.airavata.model.user.UserProfile> success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findUsers_result(findUsers_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.user.UserProfile> __this__success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(other.success.size());
for (org.apache.airavata.model.user.UserProfile other_element : other.success) {
__this__success.add(new org.apache.airavata.model.user.UserProfile(other_element));
}
this.success = __this__success;
}
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public findUsers_result deepCopy() {
return new findUsers_result(this);
}
@Override
public void clear() {
this.success = null;
this.Idse = null;
this.ae = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<org.apache.airavata.model.user.UserProfile> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(org.apache.airavata.model.user.UserProfile elem) {
if (this.success == null) {
this.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getSuccess() {
return this.success;
}
public findUsers_result setSuccess(java.util.List<org.apache.airavata.model.user.UserProfile> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public findUsers_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public findUsers_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.List<org.apache.airavata.model.user.UserProfile>)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof findUsers_result)
return this.equals((findUsers_result)that);
return false;
}
public boolean equals(findUsers_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(findUsers_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("findUsers_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class findUsers_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public findUsers_resultStandardScheme getScheme() {
return new findUsers_resultStandardScheme();
}
}
private static class findUsers_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<findUsers_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, findUsers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
struct.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(_list8.size);
org.apache.airavata.model.user.UserProfile _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = new org.apache.airavata.model.user.UserProfile();
_elem9.read(iprot);
struct.success.add(_elem9);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, findUsers_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (org.apache.airavata.model.user.UserProfile _iter11 : struct.success)
{
_iter11.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findUsers_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public findUsers_resultTupleScheme getScheme() {
return new findUsers_resultTupleScheme();
}
}
private static class findUsers_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<findUsers_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, findUsers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (org.apache.airavata.model.user.UserProfile _iter12 : struct.success)
{
_iter12.write(oprot);
}
}
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findUsers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(_list13.size);
org.apache.airavata.model.user.UserProfile _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = new org.apache.airavata.model.user.UserProfile();
_elem14.read(iprot);
struct.success.add(_elem14);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class updateUserProfile_args implements org.apache.thrift.TBase<updateUserProfile_args, updateUserProfile_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUserProfile_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateUserProfile_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USER_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("userDetails", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateUserProfile_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateUserProfile_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public org.apache.airavata.model.user.UserProfile userDetails; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USER_DETAILS((short)2, "userDetails");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USER_DETAILS
return USER_DETAILS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USER_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("userDetails", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUserProfile_args.class, metaDataMap);
}
public updateUserProfile_args() {
}
public updateUserProfile_args(
org.apache.airavata.model.security.AuthzToken authzToken,
org.apache.airavata.model.user.UserProfile userDetails)
{
this();
this.authzToken = authzToken;
this.userDetails = userDetails;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public updateUserProfile_args(updateUserProfile_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUserDetails()) {
this.userDetails = new org.apache.airavata.model.user.UserProfile(other.userDetails);
}
}
public updateUserProfile_args deepCopy() {
return new updateUserProfile_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.userDetails = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public updateUserProfile_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public org.apache.airavata.model.user.UserProfile getUserDetails() {
return this.userDetails;
}
public updateUserProfile_args setUserDetails(org.apache.airavata.model.user.UserProfile userDetails) {
this.userDetails = userDetails;
return this;
}
public void unsetUserDetails() {
this.userDetails = null;
}
/** Returns true if field userDetails is set (has been assigned a value) and false otherwise */
public boolean isSetUserDetails() {
return this.userDetails != null;
}
public void setUserDetailsIsSet(boolean value) {
if (!value) {
this.userDetails = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USER_DETAILS:
if (value == null) {
unsetUserDetails();
} else {
setUserDetails((org.apache.airavata.model.user.UserProfile)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_DETAILS:
return getUserDetails();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USER_DETAILS:
return isSetUserDetails();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof updateUserProfile_args)
return this.equals((updateUserProfile_args)that);
return false;
}
public boolean equals(updateUserProfile_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_userDetails = true && this.isSetUserDetails();
boolean that_present_userDetails = true && that.isSetUserDetails();
if (this_present_userDetails || that_present_userDetails) {
if (!(this_present_userDetails && that_present_userDetails))
return false;
if (!this.userDetails.equals(that.userDetails))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUserDetails()) ? 131071 : 524287);
if (isSetUserDetails())
hashCode = hashCode * 8191 + userDetails.hashCode();
return hashCode;
}
@Override
public int compareTo(updateUserProfile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUserDetails()).compareTo(other.isSetUserDetails());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserDetails()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDetails, other.userDetails);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("updateUserProfile_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("userDetails:");
if (this.userDetails == null) {
sb.append("null");
} else {
sb.append(this.userDetails);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (userDetails == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'userDetails' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
if (userDetails != null) {
userDetails.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class updateUserProfile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_argsStandardScheme getScheme() {
return new updateUserProfile_argsStandardScheme();
}
}
private static class updateUserProfile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateUserProfile_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, updateUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USER_DETAILS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.userDetails = new org.apache.airavata.model.user.UserProfile();
struct.userDetails.read(iprot);
struct.setUserDetailsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, updateUserProfile_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.userDetails != null) {
oprot.writeFieldBegin(USER_DETAILS_FIELD_DESC);
struct.userDetails.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class updateUserProfile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_argsTupleScheme getScheme() {
return new updateUserProfile_argsTupleScheme();
}
}
private static class updateUserProfile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateUserProfile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
struct.userDetails.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.userDetails = new org.apache.airavata.model.user.UserProfile();
struct.userDetails.read(iprot);
struct.setUserDetailsIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class updateUserProfile_result implements org.apache.thrift.TBase<updateUserProfile_result, updateUserProfile_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUserProfile_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateUserProfile_result");
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateUserProfile_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateUserProfile_resultTupleSchemeFactory();
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUserProfile_result.class, metaDataMap);
}
public updateUserProfile_result() {
}
public updateUserProfile_result(
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public updateUserProfile_result(updateUserProfile_result other) {
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public updateUserProfile_result deepCopy() {
return new updateUserProfile_result(this);
}
@Override
public void clear() {
this.Idse = null;
this.ae = null;
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public updateUserProfile_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public updateUserProfile_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof updateUserProfile_result)
return this.equals((updateUserProfile_result)that);
return false;
}
public boolean equals(updateUserProfile_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(updateUserProfile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("updateUserProfile_result(");
boolean first = true;
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class updateUserProfile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_resultStandardScheme getScheme() {
return new updateUserProfile_resultStandardScheme();
}
}
private static class updateUserProfile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateUserProfile_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, updateUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, updateUserProfile_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class updateUserProfile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateUserProfile_resultTupleScheme getScheme() {
return new updateUserProfile_resultTupleScheme();
}
}
private static class updateUserProfile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateUserProfile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetIdse()) {
optionals.set(0);
}
if (struct.isSetAe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateUserProfile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(1)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class deleteUser_args implements org.apache.thrift.TBase<deleteUser_args, deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteUser_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteUser_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteUser_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
}
public deleteUser_args() {
}
public deleteUser_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username)
{
this();
this.authzToken = authzToken;
this.username = username;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteUser_args(deleteUser_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
}
public deleteUser_args deepCopy() {
return new deleteUser_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public deleteUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public deleteUser_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof deleteUser_args)
return this.equals((deleteUser_args)that);
return false;
}
public boolean equals(deleteUser_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteUser_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteUser_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteUser_argsStandardScheme getScheme() {
return new deleteUser_argsStandardScheme();
}
}
private static class deleteUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteUser_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteUser_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteUser_argsTupleScheme getScheme() {
return new deleteUser_argsTupleScheme();
}
}
private static class deleteUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class deleteUser_result implements org.apache.thrift.TBase<deleteUser_result, deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteUser_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteUser_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteUser_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
}
public deleteUser_result() {
}
public deleteUser_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteUser_result(deleteUser_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public deleteUser_result deepCopy() {
return new deleteUser_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public deleteUser_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public deleteUser_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public deleteUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof deleteUser_result)
return this.equals((deleteUser_result)that);
return false;
}
public boolean equals(deleteUser_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteUser_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteUser_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteUser_resultStandardScheme getScheme() {
return new deleteUser_resultStandardScheme();
}
}
private static class deleteUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteUser_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteUser_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteUser_resultTupleScheme getScheme() {
return new deleteUser_resultTupleScheme();
}
}
private static class deleteUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class addRoleToUser_args implements org.apache.thrift.TBase<addRoleToUser_args, addRoleToUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addRoleToUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addRoleToUser_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addRoleToUser_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addRoleToUser_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
public java.lang.String roleName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username"),
ROLE_NAME((short)3, "roleName");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
case 3: // ROLE_NAME
return ROLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addRoleToUser_args.class, metaDataMap);
}
public addRoleToUser_args() {
}
public addRoleToUser_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username,
java.lang.String roleName)
{
this();
this.authzToken = authzToken;
this.username = username;
this.roleName = roleName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addRoleToUser_args(addRoleToUser_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
if (other.isSetRoleName()) {
this.roleName = other.roleName;
}
}
public addRoleToUser_args deepCopy() {
return new addRoleToUser_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
this.roleName = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public addRoleToUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public addRoleToUser_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public java.lang.String getRoleName() {
return this.roleName;
}
public addRoleToUser_args setRoleName(java.lang.String roleName) {
this.roleName = roleName;
return this;
}
public void unsetRoleName() {
this.roleName = null;
}
/** Returns true if field roleName is set (has been assigned a value) and false otherwise */
public boolean isSetRoleName() {
return this.roleName != null;
}
public void setRoleNameIsSet(boolean value) {
if (!value) {
this.roleName = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
case ROLE_NAME:
if (value == null) {
unsetRoleName();
} else {
setRoleName((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
case ROLE_NAME:
return getRoleName();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
case ROLE_NAME:
return isSetRoleName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof addRoleToUser_args)
return this.equals((addRoleToUser_args)that);
return false;
}
public boolean equals(addRoleToUser_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
boolean this_present_roleName = true && this.isSetRoleName();
boolean that_present_roleName = true && that.isSetRoleName();
if (this_present_roleName || that_present_roleName) {
if (!(this_present_roleName && that_present_roleName))
return false;
if (!this.roleName.equals(that.roleName))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
hashCode = hashCode * 8191 + ((isSetRoleName()) ? 131071 : 524287);
if (isSetRoleName())
hashCode = hashCode * 8191 + roleName.hashCode();
return hashCode;
}
@Override
public int compareTo(addRoleToUser_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRoleName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("addRoleToUser_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
if (!first) sb.append(", ");
sb.append("roleName:");
if (this.roleName == null) {
sb.append("null");
} else {
sb.append(this.roleName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
if (roleName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class addRoleToUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addRoleToUser_argsStandardScheme getScheme() {
return new addRoleToUser_argsStandardScheme();
}
}
private static class addRoleToUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<addRoleToUser_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addRoleToUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ROLE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.roleName = iprot.readString();
struct.setRoleNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, addRoleToUser_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
if (struct.roleName != null) {
oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
oprot.writeString(struct.roleName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addRoleToUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addRoleToUser_argsTupleScheme getScheme() {
return new addRoleToUser_argsTupleScheme();
}
}
private static class addRoleToUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addRoleToUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addRoleToUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
oprot.writeString(struct.roleName);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addRoleToUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
struct.roleName = iprot.readString();
struct.setRoleNameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class addRoleToUser_result implements org.apache.thrift.TBase<addRoleToUser_result, addRoleToUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addRoleToUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addRoleToUser_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addRoleToUser_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addRoleToUser_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addRoleToUser_result.class, metaDataMap);
}
public addRoleToUser_result() {
}
public addRoleToUser_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addRoleToUser_result(addRoleToUser_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public addRoleToUser_result deepCopy() {
return new addRoleToUser_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public addRoleToUser_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public addRoleToUser_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public addRoleToUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof addRoleToUser_result)
return this.equals((addRoleToUser_result)that);
return false;
}
public boolean equals(addRoleToUser_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(addRoleToUser_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("addRoleToUser_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class addRoleToUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addRoleToUser_resultStandardScheme getScheme() {
return new addRoleToUser_resultStandardScheme();
}
}
private static class addRoleToUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<addRoleToUser_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addRoleToUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, addRoleToUser_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addRoleToUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addRoleToUser_resultTupleScheme getScheme() {
return new addRoleToUser_resultTupleScheme();
}
}
private static class addRoleToUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addRoleToUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addRoleToUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addRoleToUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class removeRoleFromUser_args implements org.apache.thrift.TBase<removeRoleFromUser_args, removeRoleFromUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeRoleFromUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeRoleFromUser_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeRoleFromUser_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeRoleFromUser_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String username; // required
public java.lang.String roleName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
USERNAME((short)2, "username"),
ROLE_NAME((short)3, "roleName");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // USERNAME
return USERNAME;
case 3: // ROLE_NAME
return ROLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeRoleFromUser_args.class, metaDataMap);
}
public removeRoleFromUser_args() {
}
public removeRoleFromUser_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String username,
java.lang.String roleName)
{
this();
this.authzToken = authzToken;
this.username = username;
this.roleName = roleName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public removeRoleFromUser_args(removeRoleFromUser_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUsername()) {
this.username = other.username;
}
if (other.isSetRoleName()) {
this.roleName = other.roleName;
}
}
public removeRoleFromUser_args deepCopy() {
return new removeRoleFromUser_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.username = null;
this.roleName = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public removeRoleFromUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getUsername() {
return this.username;
}
public removeRoleFromUser_args setUsername(java.lang.String username) {
this.username = username;
return this;
}
public void unsetUsername() {
this.username = null;
}
/** Returns true if field username is set (has been assigned a value) and false otherwise */
public boolean isSetUsername() {
return this.username != null;
}
public void setUsernameIsSet(boolean value) {
if (!value) {
this.username = null;
}
}
public java.lang.String getRoleName() {
return this.roleName;
}
public removeRoleFromUser_args setRoleName(java.lang.String roleName) {
this.roleName = roleName;
return this;
}
public void unsetRoleName() {
this.roleName = null;
}
/** Returns true if field roleName is set (has been assigned a value) and false otherwise */
public boolean isSetRoleName() {
return this.roleName != null;
}
public void setRoleNameIsSet(boolean value) {
if (!value) {
this.roleName = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case USERNAME:
if (value == null) {
unsetUsername();
} else {
setUsername((java.lang.String)value);
}
break;
case ROLE_NAME:
if (value == null) {
unsetRoleName();
} else {
setRoleName((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USERNAME:
return getUsername();
case ROLE_NAME:
return getRoleName();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case USERNAME:
return isSetUsername();
case ROLE_NAME:
return isSetRoleName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof removeRoleFromUser_args)
return this.equals((removeRoleFromUser_args)that);
return false;
}
public boolean equals(removeRoleFromUser_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
if (!(this_present_username && that_present_username))
return false;
if (!this.username.equals(that.username))
return false;
}
boolean this_present_roleName = true && this.isSetRoleName();
boolean that_present_roleName = true && that.isSetRoleName();
if (this_present_roleName || that_present_roleName) {
if (!(this_present_roleName && that_present_roleName))
return false;
if (!this.roleName.equals(that.roleName))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
if (isSetUsername())
hashCode = hashCode * 8191 + username.hashCode();
hashCode = hashCode * 8191 + ((isSetRoleName()) ? 131071 : 524287);
if (isSetRoleName())
hashCode = hashCode * 8191 + roleName.hashCode();
return hashCode;
}
@Override
public int compareTo(removeRoleFromUser_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUsername()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRoleName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("removeRoleFromUser_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("username:");
if (this.username == null) {
sb.append("null");
} else {
sb.append(this.username);
}
first = false;
if (!first) sb.append(", ");
sb.append("roleName:");
if (this.roleName == null) {
sb.append("null");
} else {
sb.append(this.roleName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
if (roleName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class removeRoleFromUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeRoleFromUser_argsStandardScheme getScheme() {
return new removeRoleFromUser_argsStandardScheme();
}
}
private static class removeRoleFromUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeRoleFromUser_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, removeRoleFromUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ROLE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.roleName = iprot.readString();
struct.setRoleNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, removeRoleFromUser_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.username != null) {
oprot.writeFieldBegin(USERNAME_FIELD_DESC);
oprot.writeString(struct.username);
oprot.writeFieldEnd();
}
if (struct.roleName != null) {
oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
oprot.writeString(struct.roleName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class removeRoleFromUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeRoleFromUser_argsTupleScheme getScheme() {
return new removeRoleFromUser_argsTupleScheme();
}
}
private static class removeRoleFromUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeRoleFromUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeRoleFromUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.username);
oprot.writeString(struct.roleName);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, removeRoleFromUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
struct.roleName = iprot.readString();
struct.setRoleNameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class removeRoleFromUser_result implements org.apache.thrift.TBase<removeRoleFromUser_result, removeRoleFromUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeRoleFromUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeRoleFromUser_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeRoleFromUser_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeRoleFromUser_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeRoleFromUser_result.class, metaDataMap);
}
public removeRoleFromUser_result() {
}
public removeRoleFromUser_result(
boolean success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public removeRoleFromUser_result(removeRoleFromUser_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public removeRoleFromUser_result deepCopy() {
return new removeRoleFromUser_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.Idse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public removeRoleFromUser_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public removeRoleFromUser_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public removeRoleFromUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof removeRoleFromUser_result)
return this.equals((removeRoleFromUser_result)that);
return false;
}
public boolean equals(removeRoleFromUser_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(removeRoleFromUser_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("removeRoleFromUser_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class removeRoleFromUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeRoleFromUser_resultStandardScheme getScheme() {
return new removeRoleFromUser_resultStandardScheme();
}
}
private static class removeRoleFromUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeRoleFromUser_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, removeRoleFromUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, removeRoleFromUser_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class removeRoleFromUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeRoleFromUser_resultTupleScheme getScheme() {
return new removeRoleFromUser_resultTupleScheme();
}
}
private static class removeRoleFromUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeRoleFromUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeRoleFromUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, removeRoleFromUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getUsersWithRole_args implements org.apache.thrift.TBase<getUsersWithRole_args, getUsersWithRole_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUsersWithRole_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUsersWithRole_args");
private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUsersWithRole_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUsersWithRole_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String roleName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AUTHZ_TOKEN((short)1, "authzToken"),
ROLE_NAME((short)2, "roleName");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
case 2: // ROLE_NAME
return ROLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsersWithRole_args.class, metaDataMap);
}
public getUsersWithRole_args() {
}
public getUsersWithRole_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String roleName)
{
this();
this.authzToken = authzToken;
this.roleName = roleName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUsersWithRole_args(getUsersWithRole_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetRoleName()) {
this.roleName = other.roleName;
}
}
public getUsersWithRole_args deepCopy() {
return new getUsersWithRole_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.roleName = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getUsersWithRole_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
public void unsetAuthzToken() {
this.authzToken = null;
}
/** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
public boolean isSetAuthzToken() {
return this.authzToken != null;
}
public void setAuthzTokenIsSet(boolean value) {
if (!value) {
this.authzToken = null;
}
}
public java.lang.String getRoleName() {
return this.roleName;
}
public getUsersWithRole_args setRoleName(java.lang.String roleName) {
this.roleName = roleName;
return this;
}
public void unsetRoleName() {
this.roleName = null;
}
/** Returns true if field roleName is set (has been assigned a value) and false otherwise */
public boolean isSetRoleName() {
return this.roleName != null;
}
public void setRoleNameIsSet(boolean value) {
if (!value) {
this.roleName = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHZ_TOKEN:
if (value == null) {
unsetAuthzToken();
} else {
setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
}
break;
case ROLE_NAME:
if (value == null) {
unsetRoleName();
} else {
setRoleName((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case ROLE_NAME:
return getRoleName();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
case ROLE_NAME:
return isSetRoleName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getUsersWithRole_args)
return this.equals((getUsersWithRole_args)that);
return false;
}
public boolean equals(getUsersWithRole_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_authzToken = true && this.isSetAuthzToken();
boolean that_present_authzToken = true && that.isSetAuthzToken();
if (this_present_authzToken || that_present_authzToken) {
if (!(this_present_authzToken && that_present_authzToken))
return false;
if (!this.authzToken.equals(that.authzToken))
return false;
}
boolean this_present_roleName = true && this.isSetRoleName();
boolean that_present_roleName = true && that.isSetRoleName();
if (this_present_roleName || that_present_roleName) {
if (!(this_present_roleName && that_present_roleName))
return false;
if (!this.roleName.equals(that.roleName))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
hashCode = hashCode * 8191 + ((isSetRoleName()) ? 131071 : 524287);
if (isSetRoleName())
hashCode = hashCode * 8191 + roleName.hashCode();
return hashCode;
}
@Override
public int compareTo(getUsersWithRole_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthzToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRoleName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUsersWithRole_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("roleName:");
if (this.roleName == null) {
sb.append("null");
} else {
sb.append(this.roleName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
if (roleName == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUsersWithRole_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsersWithRole_argsStandardScheme getScheme() {
return new getUsersWithRole_argsStandardScheme();
}
}
private static class getUsersWithRole_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUsersWithRole_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUsersWithRole_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AUTHZ_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROLE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.roleName = iprot.readString();
struct.setRoleNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUsersWithRole_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.authzToken != null) {
oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
if (struct.roleName != null) {
oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
oprot.writeString(struct.roleName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUsersWithRole_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsersWithRole_argsTupleScheme getScheme() {
return new getUsersWithRole_argsTupleScheme();
}
}
private static class getUsersWithRole_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUsersWithRole_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUsersWithRole_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
oprot.writeString(struct.roleName);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUsersWithRole_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
struct.roleName = iprot.readString();
struct.setRoleNameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getUsersWithRole_result implements org.apache.thrift.TBase<getUsersWithRole_result, getUsersWithRole_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUsersWithRole_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUsersWithRole_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUsersWithRole_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUsersWithRole_resultTupleSchemeFactory();
public java.util.List<org.apache.airavata.model.user.UserProfile> success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IDSE((short)1, "Idse"),
AE((short)2, "ae");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IDSE
return IDSE;
case 2: // AE
return AE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class))));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUsersWithRole_result.class, metaDataMap);
}
public getUsersWithRole_result() {
}
public getUsersWithRole_result(
java.util.List<org.apache.airavata.model.user.UserProfile> success,
org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.Idse = Idse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUsersWithRole_result(getUsersWithRole_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.user.UserProfile> __this__success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(other.success.size());
for (org.apache.airavata.model.user.UserProfile other_element : other.success) {
__this__success.add(new org.apache.airavata.model.user.UserProfile(other_element));
}
this.success = __this__success;
}
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getUsersWithRole_result deepCopy() {
return new getUsersWithRole_result(this);
}
@Override
public void clear() {
this.success = null;
this.Idse = null;
this.ae = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<org.apache.airavata.model.user.UserProfile> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(org.apache.airavata.model.user.UserProfile elem) {
if (this.success == null) {
this.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.user.UserProfile> getSuccess() {
return this.success;
}
public getUsersWithRole_result setSuccess(java.util.List<org.apache.airavata.model.user.UserProfile> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
return this.Idse;
}
public getUsersWithRole_result setIdse(org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
this.Idse = Idse;
return this;
}
public void unsetIdse() {
this.Idse = null;
}
/** Returns true if field Idse is set (has been assigned a value) and false otherwise */
public boolean isSetIdse() {
return this.Idse != null;
}
public void setIdseIsSet(boolean value) {
if (!value) {
this.Idse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getUsersWithRole_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.List<org.apache.airavata.model.user.UserProfile>)value);
}
break;
case IDSE:
if (value == null) {
unsetIdse();
} else {
setIdse((org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.apache.airavata.model.error.AuthorizationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IDSE:
return getIdse();
case AE:
return getAe();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IDSE:
return isSetIdse();
case AE:
return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getUsersWithRole_result)
return this.equals((getUsersWithRole_result)that);
return false;
}
public boolean equals(getUsersWithRole_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_Idse = true && this.isSetIdse();
boolean that_present_Idse = true && that.isSetIdse();
if (this_present_Idse || that_present_Idse) {
if (!(this_present_Idse && that_present_Idse))
return false;
if (!this.Idse.equals(that.Idse))
return false;
}
boolean this_present_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetIdse()) ? 131071 : 524287);
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getUsersWithRole_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Idse, other.Idse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getUsersWithRole_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("Idse:");
if (this.Idse == null) {
sb.append("null");
} else {
sb.append(this.Idse);
}
first = false;
if (!first) sb.append(", ");
sb.append("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUsersWithRole_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsersWithRole_resultStandardScheme getScheme() {
return new getUsersWithRole_resultStandardScheme();
}
}
private static class getUsersWithRole_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUsersWithRole_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUsersWithRole_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
struct.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(_list16.size);
org.apache.airavata.model.user.UserProfile _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = new org.apache.airavata.model.user.UserProfile();
_elem17.read(iprot);
struct.success.add(_elem17);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IDSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUsersWithRole_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (org.apache.airavata.model.user.UserProfile _iter19 : struct.success)
{
_iter19.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.Idse != null) {
oprot.writeFieldBegin(IDSE_FIELD_DESC);
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUsersWithRole_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getUsersWithRole_resultTupleScheme getScheme() {
return new getUsersWithRole_resultTupleScheme();
}
}
private static class getUsersWithRole_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUsersWithRole_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUsersWithRole_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIdse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (org.apache.airavata.model.user.UserProfile _iter20 : struct.success)
{
_iter20.write(oprot);
}
}
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUsersWithRole_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList<org.apache.airavata.model.user.UserProfile>(_list21.size);
org.apache.airavata.model.user.UserProfile _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = new org.apache.airavata.model.user.UserProfile();
_elem22.read(iprot);
struct.success.add(_elem22);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
if (incoming.get(2)) {
struct.ae = new org.apache.airavata.model.error.AuthorizationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
}