blob: e0e937883ee6b2882f097c6b2344a83474626119 [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.groupmanager.cpi;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GroupManagerService {
public interface Iface extends org.apache.airavata.base.api.BaseAPI.Iface {
public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException;
public java.lang.String createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public org.apache.airavata.model.group.GroupModel getGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.group.GroupModel> getGroups(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.group.GroupModel> getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean addUsersToGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean removeUsersFromGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String newOwnerId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String adminId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
}
public interface AsyncIface extends org.apache.airavata.base.api.BaseAPI .AsyncIface {
public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void getGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> resultHandler) throws org.apache.thrift.TException;
public void getGroups(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws org.apache.thrift.TException;
public void getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws org.apache.thrift.TException;
public void addUsersToGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void removeUsersFromGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String adminId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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 java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException
{
send_getAPIVersion();
return recv_getAPIVersion();
}
public void send_getAPIVersion() throws org.apache.thrift.TException
{
getAPIVersion_args args = new getAPIVersion_args();
sendBase("getAPIVersion", args);
}
public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException
{
getAPIVersion_result result = new getAPIVersion_result();
receiveBase(result, "getAPIVersion");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
}
public java.lang.String createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_createGroup(authzToken, groupModel);
return recv_createGroup();
}
public void send_createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.thrift.TException
{
createGroup_args args = new createGroup_args();
args.setAuthzToken(authzToken);
args.setGroupModel(groupModel);
sendBase("createGroup", args);
}
public java.lang.String recv_createGroup() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
createGroup_result result = new createGroup_result();
receiveBase(result, "createGroup");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createGroup failed: unknown result");
}
public boolean updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_updateGroup(authzToken, groupModel);
return recv_updateGroup();
}
public void send_updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.thrift.TException
{
updateGroup_args args = new updateGroup_args();
args.setAuthzToken(authzToken);
args.setGroupModel(groupModel);
sendBase("updateGroup", args);
}
public boolean recv_updateGroup() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
updateGroup_result result = new updateGroup_result();
receiveBase(result, "updateGroup");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateGroup failed: unknown result");
}
public boolean deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_deleteGroup(authzToken, groupId, ownerId);
return recv_deleteGroup();
}
public void send_deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId) throws org.apache.thrift.TException
{
deleteGroup_args args = new deleteGroup_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setOwnerId(ownerId);
sendBase("deleteGroup", args);
}
public boolean recv_deleteGroup() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
deleteGroup_result result = new deleteGroup_result();
receiveBase(result, "deleteGroup");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGroup failed: unknown result");
}
public org.apache.airavata.model.group.GroupModel getGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getGroup(authzToken, groupId);
return recv_getGroup();
}
public void send_getGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId) throws org.apache.thrift.TException
{
getGroup_args args = new getGroup_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
sendBase("getGroup", args);
}
public org.apache.airavata.model.group.GroupModel recv_getGroup() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getGroup_result result = new getGroup_result();
receiveBase(result, "getGroup");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroup failed: unknown result");
}
public java.util.List<org.apache.airavata.model.group.GroupModel> getGroups(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getGroups(authzToken);
return recv_getGroups();
}
public void send_getGroups(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
{
getGroups_args args = new getGroups_args();
args.setAuthzToken(authzToken);
sendBase("getGroups", args);
}
public java.util.List<org.apache.airavata.model.group.GroupModel> recv_getGroups() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getGroups_result result = new getGroups_result();
receiveBase(result, "getGroups");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroups failed: unknown result");
}
public java.util.List<org.apache.airavata.model.group.GroupModel> getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_getAllGroupsUserBelongs(authzToken, userName);
return recv_getAllGroupsUserBelongs();
}
public void send_getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName) throws org.apache.thrift.TException
{
getAllGroupsUserBelongs_args args = new getAllGroupsUserBelongs_args();
args.setAuthzToken(authzToken);
args.setUserName(userName);
sendBase("getAllGroupsUserBelongs", args);
}
public java.util.List<org.apache.airavata.model.group.GroupModel> recv_getAllGroupsUserBelongs() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_result();
receiveBase(result, "getAllGroupsUserBelongs");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGroupsUserBelongs failed: unknown result");
}
public boolean addUsersToGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_addUsersToGroup(authzToken, userIds, groupId);
return recv_addUsersToGroup();
}
public void send_addUsersToGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId) throws org.apache.thrift.TException
{
addUsersToGroup_args args = new addUsersToGroup_args();
args.setAuthzToken(authzToken);
args.setUserIds(userIds);
args.setGroupId(groupId);
sendBase("addUsersToGroup", args);
}
public boolean recv_addUsersToGroup() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
addUsersToGroup_result result = new addUsersToGroup_result();
receiveBase(result, "addUsersToGroup");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addUsersToGroup failed: unknown result");
}
public boolean removeUsersFromGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_removeUsersFromGroup(authzToken, userIds, groupId);
return recv_removeUsersFromGroup();
}
public void send_removeUsersFromGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId) throws org.apache.thrift.TException
{
removeUsersFromGroup_args args = new removeUsersFromGroup_args();
args.setAuthzToken(authzToken);
args.setUserIds(userIds);
args.setGroupId(groupId);
sendBase("removeUsersFromGroup", args);
}
public boolean recv_removeUsersFromGroup() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
removeUsersFromGroup_result result = new removeUsersFromGroup_result();
receiveBase(result, "removeUsersFromGroup");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeUsersFromGroup failed: unknown result");
}
public boolean transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String newOwnerId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_transferGroupOwnership(authzToken, groupId, newOwnerId);
return recv_transferGroupOwnership();
}
public void send_transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String newOwnerId) throws org.apache.thrift.TException
{
transferGroupOwnership_args args = new transferGroupOwnership_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setNewOwnerId(newOwnerId);
sendBase("transferGroupOwnership", args);
}
public boolean recv_transferGroupOwnership() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
transferGroupOwnership_result result = new transferGroupOwnership_result();
receiveBase(result, "transferGroupOwnership");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "transferGroupOwnership failed: unknown result");
}
public boolean addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_addGroupAdmins(authzToken, groupId, adminIds);
return recv_addGroupAdmins();
}
public void send_addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds) throws org.apache.thrift.TException
{
addGroupAdmins_args args = new addGroupAdmins_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setAdminIds(adminIds);
sendBase("addGroupAdmins", args);
}
public boolean recv_addGroupAdmins() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
addGroupAdmins_result result = new addGroupAdmins_result();
receiveBase(result, "addGroupAdmins");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addGroupAdmins failed: unknown result");
}
public boolean removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_removeGroupAdmins(authzToken, groupId, adminIds);
return recv_removeGroupAdmins();
}
public void send_removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds) throws org.apache.thrift.TException
{
removeGroupAdmins_args args = new removeGroupAdmins_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setAdminIds(adminIds);
sendBase("removeGroupAdmins", args);
}
public boolean recv_removeGroupAdmins() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
removeGroupAdmins_result result = new removeGroupAdmins_result();
receiveBase(result, "removeGroupAdmins");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeGroupAdmins failed: unknown result");
}
public boolean hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String adminId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_hasAdminAccess(authzToken, groupId, adminId);
return recv_hasAdminAccess();
}
public void send_hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String adminId) throws org.apache.thrift.TException
{
hasAdminAccess_args args = new hasAdminAccess_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setAdminId(adminId);
sendBase("hasAdminAccess", args);
}
public boolean recv_hasAdminAccess() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
hasAdminAccess_result result = new hasAdminAccess_result();
receiveBase(result, "hasAdminAccess");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasAdminAccess failed: unknown result");
}
public boolean hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_hasOwnerAccess(authzToken, groupId, ownerId);
return recv_hasOwnerAccess();
}
public void send_hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId) throws org.apache.thrift.TException
{
hasOwnerAccess_args args = new hasOwnerAccess_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setOwnerId(ownerId);
sendBase("hasOwnerAccess", args);
}
public boolean recv_hasOwnerAccess() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
hasOwnerAccess_result result = new hasOwnerAccess_result();
receiveBase(result, "hasOwnerAccess");
if (result.isSetSuccess()) {
return result.success;
}
if (result.gse != null) {
throw result.gse;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasOwnerAccess 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 getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAPIVersion_args args = new getAPIVersion_args();
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.String getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_getAPIVersion();
}
}
public void createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
createGroup_call method_call = new createGroup_call(authzToken, groupModel, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createGroup_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private org.apache.airavata.model.group.GroupModel groupModel;
public createGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, 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.groupModel = groupModel;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
createGroup_args args = new createGroup_args();
args.setAuthzToken(authzToken);
args.setGroupModel(groupModel);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.String getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_createGroup();
}
}
public void updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateGroup_call method_call = new updateGroup_call(authzToken, groupModel, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class updateGroup_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private org.apache.airavata.model.group.GroupModel groupModel;
public updateGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, 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.groupModel = groupModel;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateGroup_args args = new updateGroup_args();
args.setAuthzToken(authzToken);
args.setGroupModel(groupModel);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_updateGroup();
}
}
public void deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteGroup_call method_call = new deleteGroup_call(authzToken, groupId, ownerId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteGroup_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
private java.lang.String ownerId;
public deleteGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId, 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.groupId = groupId;
this.ownerId = ownerId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteGroup_args args = new deleteGroup_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setOwnerId(ownerId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_deleteGroup();
}
}
public void getGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> resultHandler) throws org.apache.thrift.TException {
checkReady();
getGroup_call method_call = new getGroup_call(authzToken, groupId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getGroup_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.airavata.model.group.GroupModel> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
public getGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> resultHandler, org.apache.thrift.async.TAsyncClient client, 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.groupId = groupId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
getGroup_args args = new getGroup_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.write(prot);
prot.writeMessageEnd();
}
public org.apache.airavata.model.group.GroupModel getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_getGroup();
}
}
public void getGroups(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getGroups_call method_call = new getGroups_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getGroups_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.group.GroupModel>> {
private org.apache.airavata.model.security.AuthzToken authzToken;
public getGroups_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler, org.apache.thrift.async.TAsyncClient client, 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;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
getGroups_args args = new getGroups_args();
args.setAuthzToken(authzToken);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List<org.apache.airavata.model.group.GroupModel> getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_getGroups();
}
}
public void getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllGroupsUserBelongs_call method_call = new getAllGroupsUserBelongs_call(authzToken, userName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAllGroupsUserBelongs_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.group.GroupModel>> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String userName;
public getAllGroupsUserBelongs_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler, org.apache.thrift.async.TAsyncClient client, 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("getAllGroupsUserBelongs", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAllGroupsUserBelongs_args args = new getAllGroupsUserBelongs_args();
args.setAuthzToken(authzToken);
args.setUserName(userName);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List<org.apache.airavata.model.group.GroupModel> getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_getAllGroupsUserBelongs();
}
}
public void addUsersToGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
addUsersToGroup_call method_call = new addUsersToGroup_call(authzToken, userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addUsersToGroup_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.util.List<java.lang.String> userIds;
private java.lang.String groupId;
public addUsersToGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId, 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.userIds = userIds;
this.groupId = groupId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUsersToGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
addUsersToGroup_args args = new addUsersToGroup_args();
args.setAuthzToken(authzToken);
args.setUserIds(userIds);
args.setGroupId(groupId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_addUsersToGroup();
}
}
public void removeUsersFromGroup(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
removeUsersFromGroup_call method_call = new removeUsersFromGroup_call(authzToken, userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeUsersFromGroup_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.util.List<java.lang.String> userIds;
private java.lang.String groupId;
public removeUsersFromGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, java.util.List<java.lang.String> userIds, java.lang.String groupId, 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.userIds = userIds;
this.groupId = groupId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUsersFromGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
removeUsersFromGroup_args args = new removeUsersFromGroup_args();
args.setAuthzToken(authzToken);
args.setUserIds(userIds);
args.setGroupId(groupId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_removeUsersFromGroup();
}
}
public void transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
transferGroupOwnership_call method_call = new transferGroupOwnership_call(authzToken, groupId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class transferGroupOwnership_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
private java.lang.String newOwnerId;
public transferGroupOwnership_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String newOwnerId, 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.groupId = groupId;
this.newOwnerId = newOwnerId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("transferGroupOwnership", org.apache.thrift.protocol.TMessageType.CALL, 0));
transferGroupOwnership_args args = new transferGroupOwnership_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setNewOwnerId(newOwnerId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_transferGroupOwnership();
}
}
public void addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
addGroupAdmins_call method_call = new addGroupAdmins_call(authzToken, groupId, adminIds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addGroupAdmins_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
private java.util.List<java.lang.String> adminIds;
public addGroupAdmins_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds, 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.groupId = groupId;
this.adminIds = adminIds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addGroupAdmins", org.apache.thrift.protocol.TMessageType.CALL, 0));
addGroupAdmins_args args = new addGroupAdmins_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setAdminIds(adminIds);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_addGroupAdmins();
}
}
public void removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
removeGroupAdmins_call method_call = new removeGroupAdmins_call(authzToken, groupId, adminIds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeGroupAdmins_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
private java.util.List<java.lang.String> adminIds;
public removeGroupAdmins_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.util.List<java.lang.String> adminIds, 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.groupId = groupId;
this.adminIds = adminIds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeGroupAdmins", org.apache.thrift.protocol.TMessageType.CALL, 0));
removeGroupAdmins_args args = new removeGroupAdmins_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setAdminIds(adminIds);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_removeGroupAdmins();
}
}
public void hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String adminId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
hasAdminAccess_call method_call = new hasAdminAccess_call(authzToken, groupId, adminId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class hasAdminAccess_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
private java.lang.String adminId;
public hasAdminAccess_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String adminId, 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.groupId = groupId;
this.adminId = adminId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("hasAdminAccess", org.apache.thrift.protocol.TMessageType.CALL, 0));
hasAdminAccess_args args = new hasAdminAccess_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setAdminId(adminId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_hasAdminAccess();
}
}
public void hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
hasOwnerAccess_call method_call = new hasOwnerAccess_call(authzToken, groupId, ownerId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class hasOwnerAccess_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.airavata.model.security.AuthzToken authzToken;
private java.lang.String groupId;
private java.lang.String ownerId;
public hasOwnerAccess_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String groupId, java.lang.String ownerId, 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.groupId = groupId;
this.ownerId = ownerId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("hasOwnerAccess", org.apache.thrift.protocol.TMessageType.CALL, 0));
hasOwnerAccess_args args = new hasOwnerAccess_args();
args.setAuthzToken(authzToken);
args.setGroupId(groupId);
args.setOwnerId(ownerId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, 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_hasOwnerAccess();
}
}
}
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("getAPIVersion", new getAPIVersion());
processMap.put("createGroup", new createGroup());
processMap.put("updateGroup", new updateGroup());
processMap.put("deleteGroup", new deleteGroup());
processMap.put("getGroup", new getGroup());
processMap.put("getGroups", new getGroups());
processMap.put("getAllGroupsUserBelongs", new getAllGroupsUserBelongs());
processMap.put("addUsersToGroup", new addUsersToGroup());
processMap.put("removeUsersFromGroup", new removeUsersFromGroup());
processMap.put("transferGroupOwnership", new transferGroupOwnership());
processMap.put("addGroupAdmins", new addGroupAdmins());
processMap.put("removeGroupAdmins", new removeGroupAdmins());
processMap.put("hasAdminAccess", new hasAdminAccess());
processMap.put("hasOwnerAccess", new hasOwnerAccess());
return processMap;
}
public static class getAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAPIVersion_args> {
public getAPIVersion() {
super("getAPIVersion");
}
public getAPIVersion_args getEmptyArgsInstance() {
return new getAPIVersion_args();
}
protected boolean isOneway() {
return false;
}
public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
getAPIVersion_result result = new getAPIVersion_result();
try {
result.success = iface.getAPIVersion();
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
}
return result;
}
}
public static class createGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createGroup_args> {
public createGroup() {
super("createGroup");
}
public createGroup_args getEmptyArgsInstance() {
return new createGroup_args();
}
protected boolean isOneway() {
return false;
}
public createGroup_result getResult(I iface, createGroup_args args) throws org.apache.thrift.TException {
createGroup_result result = new createGroup_result();
try {
result.success = iface.createGroup(args.authzToken, args.groupModel);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class updateGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateGroup_args> {
public updateGroup() {
super("updateGroup");
}
public updateGroup_args getEmptyArgsInstance() {
return new updateGroup_args();
}
protected boolean isOneway() {
return false;
}
public updateGroup_result getResult(I iface, updateGroup_args args) throws org.apache.thrift.TException {
updateGroup_result result = new updateGroup_result();
try {
result.success = iface.updateGroup(args.authzToken, args.groupModel);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class deleteGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteGroup_args> {
public deleteGroup() {
super("deleteGroup");
}
public deleteGroup_args getEmptyArgsInstance() {
return new deleteGroup_args();
}
protected boolean isOneway() {
return false;
}
public deleteGroup_result getResult(I iface, deleteGroup_args args) throws org.apache.thrift.TException {
deleteGroup_result result = new deleteGroup_result();
try {
result.success = iface.deleteGroup(args.authzToken, args.groupId, args.ownerId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class getGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGroup_args> {
public getGroup() {
super("getGroup");
}
public getGroup_args getEmptyArgsInstance() {
return new getGroup_args();
}
protected boolean isOneway() {
return false;
}
public getGroup_result getResult(I iface, getGroup_args args) throws org.apache.thrift.TException {
getGroup_result result = new getGroup_result();
try {
result.success = iface.getGroup(args.authzToken, args.groupId);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class getGroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGroups_args> {
public getGroups() {
super("getGroups");
}
public getGroups_args getEmptyArgsInstance() {
return new getGroups_args();
}
protected boolean isOneway() {
return false;
}
public getGroups_result getResult(I iface, getGroups_args args) throws org.apache.thrift.TException {
getGroups_result result = new getGroups_result();
try {
result.success = iface.getGroups(args.authzToken);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class getAllGroupsUserBelongs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGroupsUserBelongs_args> {
public getAllGroupsUserBelongs() {
super("getAllGroupsUserBelongs");
}
public getAllGroupsUserBelongs_args getEmptyArgsInstance() {
return new getAllGroupsUserBelongs_args();
}
protected boolean isOneway() {
return false;
}
public getAllGroupsUserBelongs_result getResult(I iface, getAllGroupsUserBelongs_args args) throws org.apache.thrift.TException {
getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_result();
try {
result.success = iface.getAllGroupsUserBelongs(args.authzToken, args.userName);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class addUsersToGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addUsersToGroup_args> {
public addUsersToGroup() {
super("addUsersToGroup");
}
public addUsersToGroup_args getEmptyArgsInstance() {
return new addUsersToGroup_args();
}
protected boolean isOneway() {
return false;
}
public addUsersToGroup_result getResult(I iface, addUsersToGroup_args args) throws org.apache.thrift.TException {
addUsersToGroup_result result = new addUsersToGroup_result();
try {
result.success = iface.addUsersToGroup(args.authzToken, args.userIds, args.groupId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class removeUsersFromGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeUsersFromGroup_args> {
public removeUsersFromGroup() {
super("removeUsersFromGroup");
}
public removeUsersFromGroup_args getEmptyArgsInstance() {
return new removeUsersFromGroup_args();
}
protected boolean isOneway() {
return false;
}
public removeUsersFromGroup_result getResult(I iface, removeUsersFromGroup_args args) throws org.apache.thrift.TException {
removeUsersFromGroup_result result = new removeUsersFromGroup_result();
try {
result.success = iface.removeUsersFromGroup(args.authzToken, args.userIds, args.groupId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class transferGroupOwnership<I extends Iface> extends org.apache.thrift.ProcessFunction<I, transferGroupOwnership_args> {
public transferGroupOwnership() {
super("transferGroupOwnership");
}
public transferGroupOwnership_args getEmptyArgsInstance() {
return new transferGroupOwnership_args();
}
protected boolean isOneway() {
return false;
}
public transferGroupOwnership_result getResult(I iface, transferGroupOwnership_args args) throws org.apache.thrift.TException {
transferGroupOwnership_result result = new transferGroupOwnership_result();
try {
result.success = iface.transferGroupOwnership(args.authzToken, args.groupId, args.newOwnerId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class addGroupAdmins<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addGroupAdmins_args> {
public addGroupAdmins() {
super("addGroupAdmins");
}
public addGroupAdmins_args getEmptyArgsInstance() {
return new addGroupAdmins_args();
}
protected boolean isOneway() {
return false;
}
public addGroupAdmins_result getResult(I iface, addGroupAdmins_args args) throws org.apache.thrift.TException {
addGroupAdmins_result result = new addGroupAdmins_result();
try {
result.success = iface.addGroupAdmins(args.authzToken, args.groupId, args.adminIds);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class removeGroupAdmins<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeGroupAdmins_args> {
public removeGroupAdmins() {
super("removeGroupAdmins");
}
public removeGroupAdmins_args getEmptyArgsInstance() {
return new removeGroupAdmins_args();
}
protected boolean isOneway() {
return false;
}
public removeGroupAdmins_result getResult(I iface, removeGroupAdmins_args args) throws org.apache.thrift.TException {
removeGroupAdmins_result result = new removeGroupAdmins_result();
try {
result.success = iface.removeGroupAdmins(args.authzToken, args.groupId, args.adminIds);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class hasAdminAccess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, hasAdminAccess_args> {
public hasAdminAccess() {
super("hasAdminAccess");
}
public hasAdminAccess_args getEmptyArgsInstance() {
return new hasAdminAccess_args();
}
protected boolean isOneway() {
return false;
}
public hasAdminAccess_result getResult(I iface, hasAdminAccess_args args) throws org.apache.thrift.TException {
hasAdminAccess_result result = new hasAdminAccess_result();
try {
result.success = iface.hasAdminAccess(args.authzToken, args.groupId, args.adminId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} catch (org.apache.airavata.model.error.AuthorizationException ae) {
result.ae = ae;
}
return result;
}
}
public static class hasOwnerAccess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, hasOwnerAccess_args> {
public hasOwnerAccess() {
super("hasOwnerAccess");
}
public hasOwnerAccess_args getEmptyArgsInstance() {
return new hasOwnerAccess_args();
}
protected boolean isOneway() {
return false;
}
public hasOwnerAccess_result getResult(I iface, hasOwnerAccess_args args) throws org.apache.thrift.TException {
hasOwnerAccess_result result = new hasOwnerAccess_result();
try {
result.success = iface.hasOwnerAccess(args.authzToken, args.groupId, args.ownerId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
result.gse = gse;
} 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("getAPIVersion", new getAPIVersion());
processMap.put("createGroup", new createGroup());
processMap.put("updateGroup", new updateGroup());
processMap.put("deleteGroup", new deleteGroup());
processMap.put("getGroup", new getGroup());
processMap.put("getGroups", new getGroups());
processMap.put("getAllGroupsUserBelongs", new getAllGroupsUserBelongs());
processMap.put("addUsersToGroup", new addUsersToGroup());
processMap.put("removeUsersFromGroup", new removeUsersFromGroup());
processMap.put("transferGroupOwnership", new transferGroupOwnership());
processMap.put("addGroupAdmins", new addGroupAdmins());
processMap.put("removeGroupAdmins", new removeGroupAdmins());
processMap.put("hasAdminAccess", new hasAdminAccess());
processMap.put("hasOwnerAccess", new hasOwnerAccess());
return processMap;
}
public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, java.lang.String> {
public getAPIVersion() {
super("getAPIVersion");
}
public getAPIVersion_args getEmptyArgsInstance() {
return new getAPIVersion_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.String>() {
public void onComplete(java.lang.String o) {
getAPIVersion_result result = new getAPIVersion_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;
getAPIVersion_result result = new getAPIVersion_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.getAPIVersion(resultHandler);
}
}
public static class createGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createGroup_args, java.lang.String> {
public createGroup() {
super("createGroup");
}
public createGroup_args getEmptyArgsInstance() {
return new createGroup_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.String>() {
public void onComplete(java.lang.String o) {
createGroup_result result = new createGroup_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;
createGroup_result result = new createGroup_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, createGroup_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.createGroup(args.authzToken, args.groupModel,resultHandler);
}
}
public static class updateGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGroup_args, java.lang.Boolean> {
public updateGroup() {
super("updateGroup");
}
public updateGroup_args getEmptyArgsInstance() {
return new updateGroup_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) {
updateGroup_result result = new updateGroup_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;
updateGroup_result result = new updateGroup_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, updateGroup_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.updateGroup(args.authzToken, args.groupModel,resultHandler);
}
}
public static class deleteGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGroup_args, java.lang.Boolean> {
public deleteGroup() {
super("deleteGroup");
}
public deleteGroup_args getEmptyArgsInstance() {
return new deleteGroup_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) {
deleteGroup_result result = new deleteGroup_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;
deleteGroup_result result = new deleteGroup_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, deleteGroup_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.deleteGroup(args.authzToken, args.groupId, args.ownerId,resultHandler);
}
}
public static class getGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroup_args, org.apache.airavata.model.group.GroupModel> {
public getGroup() {
super("getGroup");
}
public getGroup_args getEmptyArgsInstance() {
return new getGroup_args();
}
public org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> 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.group.GroupModel>() {
public void onComplete(org.apache.airavata.model.group.GroupModel o) {
getGroup_result result = new getGroup_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;
getGroup_result result = new getGroup_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, getGroup_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> resultHandler) throws org.apache.thrift.TException {
iface.getGroup(args.authzToken, args.groupId,resultHandler);
}
}
public static class getGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroups_args, java.util.List<org.apache.airavata.model.group.GroupModel>> {
public getGroups() {
super("getGroups");
}
public getGroups_args getEmptyArgsInstance() {
return new getGroups_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> 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.group.GroupModel>>() {
public void onComplete(java.util.List<org.apache.airavata.model.group.GroupModel> o) {
getGroups_result result = new getGroups_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;
getGroups_result result = new getGroups_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, getGroups_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws org.apache.thrift.TException {
iface.getGroups(args.authzToken,resultHandler);
}
}
public static class getAllGroupsUserBelongs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGroupsUserBelongs_args, java.util.List<org.apache.airavata.model.group.GroupModel>> {
public getAllGroupsUserBelongs() {
super("getAllGroupsUserBelongs");
}
public getAllGroupsUserBelongs_args getEmptyArgsInstance() {
return new getAllGroupsUserBelongs_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> 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.group.GroupModel>>() {
public void onComplete(java.util.List<org.apache.airavata.model.group.GroupModel> o) {
getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_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;
getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, getAllGroupsUserBelongs_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws org.apache.thrift.TException {
iface.getAllGroupsUserBelongs(args.authzToken, args.userName,resultHandler);
}
}
public static class addUsersToGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUsersToGroup_args, java.lang.Boolean> {
public addUsersToGroup() {
super("addUsersToGroup");
}
public addUsersToGroup_args getEmptyArgsInstance() {
return new addUsersToGroup_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) {
addUsersToGroup_result result = new addUsersToGroup_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;
addUsersToGroup_result result = new addUsersToGroup_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, addUsersToGroup_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.addUsersToGroup(args.authzToken, args.userIds, args.groupId,resultHandler);
}
}
public static class removeUsersFromGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeUsersFromGroup_args, java.lang.Boolean> {
public removeUsersFromGroup() {
super("removeUsersFromGroup");
}
public removeUsersFromGroup_args getEmptyArgsInstance() {
return new removeUsersFromGroup_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) {
removeUsersFromGroup_result result = new removeUsersFromGroup_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;
removeUsersFromGroup_result result = new removeUsersFromGroup_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, removeUsersFromGroup_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.removeUsersFromGroup(args.authzToken, args.userIds, args.groupId,resultHandler);
}
}
public static class transferGroupOwnership<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, transferGroupOwnership_args, java.lang.Boolean> {
public transferGroupOwnership() {
super("transferGroupOwnership");
}
public transferGroupOwnership_args getEmptyArgsInstance() {
return new transferGroupOwnership_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) {
transferGroupOwnership_result result = new transferGroupOwnership_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;
transferGroupOwnership_result result = new transferGroupOwnership_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, transferGroupOwnership_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.transferGroupOwnership(args.authzToken, args.groupId, args.newOwnerId,resultHandler);
}
}
public static class addGroupAdmins<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGroupAdmins_args, java.lang.Boolean> {
public addGroupAdmins() {
super("addGroupAdmins");
}
public addGroupAdmins_args getEmptyArgsInstance() {
return new addGroupAdmins_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) {
addGroupAdmins_result result = new addGroupAdmins_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;
addGroupAdmins_result result = new addGroupAdmins_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, addGroupAdmins_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.addGroupAdmins(args.authzToken, args.groupId, args.adminIds,resultHandler);
}
}
public static class removeGroupAdmins<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeGroupAdmins_args, java.lang.Boolean> {
public removeGroupAdmins() {
super("removeGroupAdmins");
}
public removeGroupAdmins_args getEmptyArgsInstance() {
return new removeGroupAdmins_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) {
removeGroupAdmins_result result = new removeGroupAdmins_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;
removeGroupAdmins_result result = new removeGroupAdmins_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, removeGroupAdmins_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.removeGroupAdmins(args.authzToken, args.groupId, args.adminIds,resultHandler);
}
}
public static class hasAdminAccess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, hasAdminAccess_args, java.lang.Boolean> {
public hasAdminAccess() {
super("hasAdminAccess");
}
public hasAdminAccess_args getEmptyArgsInstance() {
return new hasAdminAccess_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) {
hasAdminAccess_result result = new hasAdminAccess_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;
hasAdminAccess_result result = new hasAdminAccess_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, hasAdminAccess_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.hasAdminAccess(args.authzToken, args.groupId, args.adminId,resultHandler);
}
}
public static class hasOwnerAccess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, hasOwnerAccess_args, java.lang.Boolean> {
public hasOwnerAccess() {
super("hasOwnerAccess");
}
public hasOwnerAccess_args getEmptyArgsInstance() {
return new hasOwnerAccess_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) {
hasOwnerAccess_result result = new hasOwnerAccess_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;
hasOwnerAccess_result result = new hasOwnerAccess_result();
if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
result.setGseIsSet(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, hasOwnerAccess_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.hasOwnerAccess(args.authzToken, args.groupId, args.ownerId,resultHandler);
}
}
}
public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final 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) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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;
}
}
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);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
}
public getAPIVersion_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_args(getAPIVersion_args other) {
}
public getAPIVersion_args deepCopy() {
return new getAPIVersion_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
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) {
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAPIVersion_args)
return this.equals((getAPIVersion_args)that);
return false;
}
public boolean equals(getAPIVersion_args that) {
if (that == null)
return false;
if (this == that)
return true;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(getAPIVersion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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("getAPIVersion_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getAPIVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_argsStandardScheme getScheme() {
return new getAPIVersion_argsStandardScheme();
}
}
private static class getAPIVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// 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, getAPIVersion_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAPIVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_argsTupleScheme getScheme() {
return new getAPIVersion_argsTupleScheme();
}
}
private static class getAPIVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
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 getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
GSE((short)1, "gse");
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: // GSE
return GSE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
}
public getAPIVersion_result() {
}
public getAPIVersion_result(
java.lang.String success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse)
{
this();
this.success = success;
this.gse = gse;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_result(getAPIVersion_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
}
public getAPIVersion_result deepCopy() {
return new getAPIVersion_result(this);
}
@Override
public void clear() {
this.success = null;
this.gse = null;
}
public java.lang.String getSuccess() {
return this.success;
}
public getAPIVersion_result setSuccess(java.lang.String 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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public getAPIVersion_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case GSE:
return getGse();
}
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 GSE:
return isSetGse();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAPIVersion_result)
return this.equals((getAPIVersion_result)that);
return false;
}
public boolean equals(getAPIVersion_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
return hashCode;
}
@Override
public int compareTo(getAPIVersion_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("getAPIVersion_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("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 getAPIVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_resultStandardScheme getScheme() {
return new getAPIVersion_resultStandardScheme();
}
}
private static class getAPIVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(true);
} else {
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, getAPIVersion_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAPIVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAPIVersion_resultTupleScheme getScheme() {
return new getAPIVersion_resultTupleScheme();
}
}
private static class getAPIVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_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.isSetGse()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_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.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 createGroup_args implements org.apache.thrift.TBase<createGroup_args, createGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<createGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createGroup_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 GROUP_MODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("groupModel", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createGroup_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createGroup_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public org.apache.airavata.model.group.GroupModel groupModel; // required
/** 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"),
GROUP_MODEL((short)2, "groupModel");
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: // GROUP_MODEL
return GROUP_MODEL;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.GROUP_MODEL, new org.apache.thrift.meta_data.FieldMetaData("groupModel", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.group.GroupModel.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createGroup_args.class, metaDataMap);
}
public createGroup_args() {
}
public createGroup_args(
org.apache.airavata.model.security.AuthzToken authzToken,
org.apache.airavata.model.group.GroupModel groupModel)
{
this();
this.authzToken = authzToken;
this.groupModel = groupModel;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createGroup_args(createGroup_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupModel()) {
this.groupModel = new org.apache.airavata.model.group.GroupModel(other.groupModel);
}
}
public createGroup_args deepCopy() {
return new createGroup_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupModel = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public createGroup_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.group.GroupModel getGroupModel() {
return this.groupModel;
}
public createGroup_args setGroupModel(org.apache.airavata.model.group.GroupModel groupModel) {
this.groupModel = groupModel;
return this;
}
public void unsetGroupModel() {
this.groupModel = null;
}
/** Returns true if field groupModel is set (has been assigned a value) and false otherwise */
public boolean isSetGroupModel() {
return this.groupModel != null;
}
public void setGroupModelIsSet(boolean value) {
if (!value) {
this.groupModel = 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 GROUP_MODEL:
if (value == null) {
unsetGroupModel();
} else {
setGroupModel((org.apache.airavata.model.group.GroupModel)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_MODEL:
return getGroupModel();
}
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 GROUP_MODEL:
return isSetGroupModel();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createGroup_args)
return this.equals((createGroup_args)that);
return false;
}
public boolean equals(createGroup_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_groupModel = true && this.isSetGroupModel();
boolean that_present_groupModel = true && that.isSetGroupModel();
if (this_present_groupModel || that_present_groupModel) {
if (!(this_present_groupModel && that_present_groupModel))
return false;
if (!this.groupModel.equals(that.groupModel))
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 + ((isSetGroupModel()) ? 131071 : 524287);
if (isSetGroupModel())
hashCode = hashCode * 8191 + groupModel.hashCode();
return hashCode;
}
@Override
public int compareTo(createGroup_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(isSetGroupModel()).compareTo(other.isSetGroupModel());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupModel()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupModel, other.groupModel);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("createGroup_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("groupModel:");
if (this.groupModel == null) {
sb.append("null");
} else {
sb.append(this.groupModel);
}
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 (groupModel == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupModel' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
if (groupModel != null) {
groupModel.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 createGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createGroup_argsStandardScheme getScheme() {
return new createGroup_argsStandardScheme();
}
}
private static class createGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<createGroup_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_MODEL
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.groupModel = new org.apache.airavata.model.group.GroupModel();
struct.groupModel.read(iprot);
struct.setGroupModelIsSet(true);
} else {
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, createGroup_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.groupModel != null) {
oprot.writeFieldBegin(GROUP_MODEL_FIELD_DESC);
struct.groupModel.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createGroup_argsTupleScheme getScheme() {
return new createGroup_argsTupleScheme();
}
}
private static class createGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<createGroup_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
struct.groupModel.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createGroup_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.groupModel = new org.apache.airavata.model.group.GroupModel();
struct.groupModel.read(iprot);
struct.setGroupModelIsSet(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 createGroup_result implements org.apache.thrift.TBase<createGroup_result, createGroup_result._Fields>, java.io.Serializable, Cloneable, Comparable<createGroup_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createGroup_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 createGroup_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createGroup_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(createGroup_result.class, metaDataMap);
}
public createGroup_result() {
}
public createGroup_result(
java.lang.String success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createGroup_result(createGroup_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public createGroup_result deepCopy() {
return new createGroup_result(this);
}
@Override
public void clear() {
this.success = null;
this.gse = null;
this.ae = null;
}
public java.lang.String getSuccess() {
return this.success;
}
public createGroup_result setSuccess(java.lang.String 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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public createGroup_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public createGroup_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.String)value);
}
break;
case GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 createGroup_result)
return this.equals((createGroup_result)that);
return false;
}
public boolean equals(createGroup_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(createGroup_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("createGroup_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("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 createGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createGroup_resultStandardScheme getScheme() {
return new createGroup_resultStandardScheme();
}
}
private static class createGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<createGroup_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createGroup_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, createGroup_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 createGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createGroup_resultTupleScheme getScheme() {
return new createGroup_resultTupleScheme();
}
}
private static class createGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<createGroup_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createGroup_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createGroup_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.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 updateGroup_args implements org.apache.thrift.TBase<updateGroup_args, updateGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGroup_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 GROUP_MODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("groupModel", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateGroup_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateGroup_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public org.apache.airavata.model.group.GroupModel groupModel; // required
/** 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"),
GROUP_MODEL((short)2, "groupModel");
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: // GROUP_MODEL
return GROUP_MODEL;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.GROUP_MODEL, new org.apache.thrift.meta_data.FieldMetaData("groupModel", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.group.GroupModel.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGroup_args.class, metaDataMap);
}
public updateGroup_args() {
}
public updateGroup_args(
org.apache.airavata.model.security.AuthzToken authzToken,
org.apache.airavata.model.group.GroupModel groupModel)
{
this();
this.authzToken = authzToken;
this.groupModel = groupModel;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public updateGroup_args(updateGroup_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupModel()) {
this.groupModel = new org.apache.airavata.model.group.GroupModel(other.groupModel);
}
}
public updateGroup_args deepCopy() {
return new updateGroup_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupModel = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public updateGroup_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.group.GroupModel getGroupModel() {
return this.groupModel;
}
public updateGroup_args setGroupModel(org.apache.airavata.model.group.GroupModel groupModel) {
this.groupModel = groupModel;
return this;
}
public void unsetGroupModel() {
this.groupModel = null;
}
/** Returns true if field groupModel is set (has been assigned a value) and false otherwise */
public boolean isSetGroupModel() {
return this.groupModel != null;
}
public void setGroupModelIsSet(boolean value) {
if (!value) {
this.groupModel = 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 GROUP_MODEL:
if (value == null) {
unsetGroupModel();
} else {
setGroupModel((org.apache.airavata.model.group.GroupModel)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_MODEL:
return getGroupModel();
}
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 GROUP_MODEL:
return isSetGroupModel();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof updateGroup_args)
return this.equals((updateGroup_args)that);
return false;
}
public boolean equals(updateGroup_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_groupModel = true && this.isSetGroupModel();
boolean that_present_groupModel = true && that.isSetGroupModel();
if (this_present_groupModel || that_present_groupModel) {
if (!(this_present_groupModel && that_present_groupModel))
return false;
if (!this.groupModel.equals(that.groupModel))
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 + ((isSetGroupModel()) ? 131071 : 524287);
if (isSetGroupModel())
hashCode = hashCode * 8191 + groupModel.hashCode();
return hashCode;
}
@Override
public int compareTo(updateGroup_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(isSetGroupModel()).compareTo(other.isSetGroupModel());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupModel()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupModel, other.groupModel);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("updateGroup_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("groupModel:");
if (this.groupModel == null) {
sb.append("null");
} else {
sb.append(this.groupModel);
}
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 (groupModel == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupModel' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (authzToken != null) {
authzToken.validate();
}
if (groupModel != null) {
groupModel.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 updateGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateGroup_argsStandardScheme getScheme() {
return new updateGroup_argsStandardScheme();
}
}
private static class updateGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateGroup_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, updateGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_MODEL
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.groupModel = new org.apache.airavata.model.group.GroupModel();
struct.groupModel.read(iprot);
struct.setGroupModelIsSet(true);
} else {
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, updateGroup_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.groupModel != null) {
oprot.writeFieldBegin(GROUP_MODEL_FIELD_DESC);
struct.groupModel.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class updateGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateGroup_argsTupleScheme getScheme() {
return new updateGroup_argsTupleScheme();
}
}
private static class updateGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateGroup_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
struct.groupModel.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateGroup_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.groupModel = new org.apache.airavata.model.group.GroupModel();
struct.groupModel.read(iprot);
struct.setGroupModelIsSet(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 updateGroup_result implements org.apache.thrift.TBase<updateGroup_result, updateGroup_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateGroup_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGroup_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 updateGroup_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateGroup_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(updateGroup_result.class, metaDataMap);
}
public updateGroup_result() {
}
public updateGroup_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public updateGroup_result(updateGroup_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public updateGroup_result deepCopy() {
return new updateGroup_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public updateGroup_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public updateGroup_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public updateGroup_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 updateGroup_result)
return this.equals((updateGroup_result)that);
return false;
}
public boolean equals(updateGroup_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(updateGroup_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("updateGroup_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 updateGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateGroup_resultStandardScheme getScheme() {
return new updateGroup_resultStandardScheme();
}
}
private static class updateGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateGroup_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, updateGroup_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, updateGroup_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 updateGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public updateGroup_resultTupleScheme getScheme() {
return new updateGroup_resultTupleScheme();
}
}
private static class updateGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateGroup_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateGroup_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateGroup_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 deleteGroup_args implements org.apache.thrift.TBase<deleteGroup_args, deleteGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteGroup_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteGroup_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteGroup_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
public java.lang.String ownerId; // required
/** 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"),
GROUP_ID((short)2, "groupId"),
OWNER_ID((short)3, "ownerId");
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: // GROUP_ID
return GROUP_ID;
case 3: // OWNER_ID
return OWNER_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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", 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(deleteGroup_args.class, metaDataMap);
}
public deleteGroup_args() {
}
public deleteGroup_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId,
java.lang.String ownerId)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
this.ownerId = ownerId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteGroup_args(deleteGroup_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
if (other.isSetOwnerId()) {
this.ownerId = other.ownerId;
}
}
public deleteGroup_args deepCopy() {
return new deleteGroup_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
this.ownerId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public deleteGroup_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 getGroupId() {
return this.groupId;
}
public deleteGroup_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = null;
}
}
public java.lang.String getOwnerId() {
return this.ownerId;
}
public deleteGroup_args setOwnerId(java.lang.String ownerId) {
this.ownerId = ownerId;
return this;
}
public void unsetOwnerId() {
this.ownerId = null;
}
/** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
public boolean isSetOwnerId() {
return this.ownerId != null;
}
public void setOwnerIdIsSet(boolean value) {
if (!value) {
this.ownerId = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
case OWNER_ID:
if (value == null) {
unsetOwnerId();
} else {
setOwnerId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
case OWNER_ID:
return getOwnerId();
}
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 GROUP_ID:
return isSetGroupId();
case OWNER_ID:
return isSetOwnerId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof deleteGroup_args)
return this.equals((deleteGroup_args)that);
return false;
}
public boolean equals(deleteGroup_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
return false;
}
boolean this_present_ownerId = true && this.isSetOwnerId();
boolean that_present_ownerId = true && that.isSetOwnerId();
if (this_present_ownerId || that_present_ownerId) {
if (!(this_present_ownerId && that_present_ownerId))
return false;
if (!this.ownerId.equals(that.ownerId))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287);
if (isSetOwnerId())
hashCode = hashCode * 8191 + ownerId.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteGroup_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOwnerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("deleteGroup_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
first = false;
if (!first) sb.append(", ");
sb.append("ownerId:");
if (this.ownerId == null) {
sb.append("null");
} else {
sb.append(this.ownerId);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' was not present! Struct: " + toString());
}
if (ownerId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'ownerId' 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 deleteGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteGroup_argsStandardScheme getScheme() {
return new deleteGroup_argsStandardScheme();
}
}
private static class deleteGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteGroup_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OWNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
} else {
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, deleteGroup_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
if (struct.ownerId != null) {
oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
oprot.writeString(struct.ownerId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteGroup_argsTupleScheme getScheme() {
return new deleteGroup_argsTupleScheme();
}
}
private static class deleteGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteGroup_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteGroup_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.groupId);
oprot.writeString(struct.ownerId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteGroup_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.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(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 deleteGroup_result implements org.apache.thrift.TBase<deleteGroup_result, deleteGroup_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteGroup_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteGroup_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 deleteGroup_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteGroup_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(deleteGroup_result.class, metaDataMap);
}
public deleteGroup_result() {
}
public deleteGroup_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteGroup_result(deleteGroup_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public deleteGroup_result deepCopy() {
return new deleteGroup_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public deleteGroup_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public deleteGroup_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public deleteGroup_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 deleteGroup_result)
return this.equals((deleteGroup_result)that);
return false;
}
public boolean equals(deleteGroup_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteGroup_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("deleteGroup_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 deleteGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteGroup_resultStandardScheme getScheme() {
return new deleteGroup_resultStandardScheme();
}
}
private static class deleteGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteGroup_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteGroup_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, deleteGroup_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 deleteGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteGroup_resultTupleScheme getScheme() {
return new deleteGroup_resultTupleScheme();
}
}
private static class deleteGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteGroup_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteGroup_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteGroup_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 getGroup_args implements org.apache.thrift.TBase<getGroup_args, getGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGroup_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getGroup_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getGroup_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
/** 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"),
GROUP_ID((short)2, "groupId");
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: // GROUP_ID
return GROUP_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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", 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(getGroup_args.class, metaDataMap);
}
public getGroup_args() {
}
public getGroup_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getGroup_args(getGroup_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
}
public getGroup_args deepCopy() {
return new getGroup_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getGroup_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 getGroupId() {
return this.groupId;
}
public getGroup_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
}
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 GROUP_ID:
return isSetGroupId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getGroup_args)
return this.equals((getGroup_args)that);
return false;
}
public boolean equals(getGroup_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
return hashCode;
}
@Override
public int compareTo(getGroup_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("getGroup_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' 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 getGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroup_argsStandardScheme getScheme() {
return new getGroup_argsStandardScheme();
}
}
private static class getGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getGroup_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
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, getGroup_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroup_argsTupleScheme getScheme() {
return new getGroup_argsTupleScheme();
}
}
private static class getGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getGroup_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getGroup_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.groupId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getGroup_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.groupId = iprot.readString();
struct.setGroupIdIsSet(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 getGroup_result implements org.apache.thrift.TBase<getGroup_result, getGroup_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGroup_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGroup_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 getGroup_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getGroup_resultTupleSchemeFactory();
public org.apache.airavata.model.group.GroupModel success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.group.GroupModel.class)));
tmpMap.put(_Fields.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(getGroup_result.class, metaDataMap);
}
public getGroup_result() {
}
public getGroup_result(
org.apache.airavata.model.group.GroupModel success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getGroup_result(getGroup_result other) {
if (other.isSetSuccess()) {
this.success = new org.apache.airavata.model.group.GroupModel(other.success);
}
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getGroup_result deepCopy() {
return new getGroup_result(this);
}
@Override
public void clear() {
this.success = null;
this.gse = null;
this.ae = null;
}
public org.apache.airavata.model.group.GroupModel getSuccess() {
return this.success;
}
public getGroup_result setSuccess(org.apache.airavata.model.group.GroupModel 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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public getGroup_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getGroup_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.group.GroupModel)value);
}
break;
case GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 getGroup_result)
return this.equals((getGroup_result)that);
return false;
}
public boolean equals(getGroup_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getGroup_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("getGroup_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("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 getGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroup_resultStandardScheme getScheme() {
return new getGroup_resultStandardScheme();
}
}
private static class getGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getGroup_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getGroup_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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.group.GroupModel();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, getGroup_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 getGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroup_resultTupleScheme getScheme() {
return new getGroup_resultTupleScheme();
}
}
private static class getGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getGroup_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getGroup_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getGroup_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.group.GroupModel();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 getGroups_args implements org.apache.thrift.TBase<getGroups_args, getGroups_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGroups_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGroups_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.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getGroups_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getGroups_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
/** 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");
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;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGroups_args.class, metaDataMap);
}
public getGroups_args() {
}
public getGroups_args(
org.apache.airavata.model.security.AuthzToken authzToken)
{
this();
this.authzToken = authzToken;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getGroups_args(getGroups_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
}
public getGroups_args deepCopy() {
return new getGroups_args(this);
}
@Override
public void clear() {
this.authzToken = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getGroups_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 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;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
}
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();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getGroups_args)
return this.equals((getGroups_args)that);
return false;
}
public boolean equals(getGroups_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;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
if (isSetAuthzToken())
hashCode = hashCode * 8191 + authzToken.hashCode();
return hashCode;
}
@Override
public int compareTo(getGroups_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;
}
}
return 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("getGroups_args(");
boolean first = true;
sb.append("authzToken:");
if (this.authzToken == null) {
sb.append("null");
} else {
sb.append(this.authzToken);
}
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());
}
// 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 getGroups_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroups_argsStandardScheme getScheme() {
return new getGroups_argsStandardScheme();
}
}
private static class getGroups_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getGroups_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getGroups_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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;
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, getGroups_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.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getGroups_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroups_argsTupleScheme getScheme() {
return new getGroups_argsTupleScheme();
}
}
private static class getGroups_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getGroups_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getGroups_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.authzToken.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getGroups_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);
}
}
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 getGroups_result implements org.apache.thrift.TBase<getGroups_result, getGroups_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGroups_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGroups_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 getGroups_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getGroups_resultTupleSchemeFactory();
public java.util.List<org.apache.airavata.model.group.GroupModel> success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.group.GroupModel.class))));
tmpMap.put(_Fields.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(getGroups_result.class, metaDataMap);
}
public getGroups_result() {
}
public getGroups_result(
java.util.List<org.apache.airavata.model.group.GroupModel> success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getGroups_result(getGroups_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.group.GroupModel> __this__success = new java.util.ArrayList<org.apache.airavata.model.group.GroupModel>(other.success.size());
for (org.apache.airavata.model.group.GroupModel other_element : other.success) {
__this__success.add(new org.apache.airavata.model.group.GroupModel(other_element));
}
this.success = __this__success;
}
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getGroups_result deepCopy() {
return new getGroups_result(this);
}
@Override
public void clear() {
this.success = null;
this.gse = null;
this.ae = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<org.apache.airavata.model.group.GroupModel> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(org.apache.airavata.model.group.GroupModel elem) {
if (this.success == null) {
this.success = new java.util.ArrayList<org.apache.airavata.model.group.GroupModel>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.group.GroupModel> getSuccess() {
return this.success;
}
public getGroups_result setSuccess(java.util.List<org.apache.airavata.model.group.GroupModel> 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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public getGroups_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getGroups_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.group.GroupModel>)value);
}
break;
case GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 getGroups_result)
return this.equals((getGroups_result)that);
return false;
}
public boolean equals(getGroups_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getGroups_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("getGroups_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("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 getGroups_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroups_resultStandardScheme getScheme() {
return new getGroups_resultStandardScheme();
}
}
private static class getGroups_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getGroups_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getGroups_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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.group.GroupModel>(_list0.size);
org.apache.airavata.model.group.GroupModel _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new org.apache.airavata.model.group.GroupModel();
_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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, getGroups_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.group.GroupModel _iter3 : struct.success)
{
_iter3.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 getGroups_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getGroups_resultTupleScheme getScheme() {
return new getGroups_resultTupleScheme();
}
}
private static class getGroups_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getGroups_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getGroups_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.isSetGse()) {
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.group.GroupModel _iter4 : struct.success)
{
_iter4.write(oprot);
}
}
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getGroups_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.group.GroupModel>(_list5.size);
org.apache.airavata.model.group.GroupModel _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = new org.apache.airavata.model.group.GroupModel();
_elem6.read(iprot);
struct.success.add(_elem6);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 getAllGroupsUserBelongs_args implements org.apache.thrift.TBase<getAllGroupsUserBelongs_args, getAllGroupsUserBelongs_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGroupsUserBelongs_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGroupsUserBelongs_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_NAME_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 getAllGroupsUserBelongs_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllGroupsUserBelongs_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"),
USER_NAME((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: // USER_NAME
return USER_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.USER_NAME, 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(getAllGroupsUserBelongs_args.class, metaDataMap);
}
public getAllGroupsUserBelongs_args() {
}
public getAllGroupsUserBelongs_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 getAllGroupsUserBelongs_args(getAllGroupsUserBelongs_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUserName()) {
this.userName = other.userName;
}
}
public getAllGroupsUserBelongs_args deepCopy() {
return new getAllGroupsUserBelongs_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.userName = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public getAllGroupsUserBelongs_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 getAllGroupsUserBelongs_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 USER_NAME:
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 USER_NAME:
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 USER_NAME:
return isSetUserName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAllGroupsUserBelongs_args)
return this.equals((getAllGroupsUserBelongs_args)that);
return false;
}
public boolean equals(getAllGroupsUserBelongs_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(getAllGroupsUserBelongs_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("getAllGroupsUserBelongs_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 getAllGroupsUserBelongs_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllGroupsUserBelongs_argsStandardScheme getScheme() {
return new getAllGroupsUserBelongs_argsStandardScheme();
}
}
private static class getAllGroupsUserBelongs_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAllGroupsUserBelongs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGroupsUserBelongs_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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_NAME
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, getAllGroupsUserBelongs_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(USER_NAME_FIELD_DESC);
oprot.writeString(struct.userName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAllGroupsUserBelongs_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllGroupsUserBelongs_argsTupleScheme getScheme() {
return new getAllGroupsUserBelongs_argsTupleScheme();
}
}
private static class getAllGroupsUserBelongs_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllGroupsUserBelongs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllGroupsUserBelongs_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, getAllGroupsUserBelongs_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 getAllGroupsUserBelongs_result implements org.apache.thrift.TBase<getAllGroupsUserBelongs_result, getAllGroupsUserBelongs_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGroupsUserBelongs_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGroupsUserBelongs_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 getAllGroupsUserBelongs_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllGroupsUserBelongs_resultTupleSchemeFactory();
public java.util.List<org.apache.airavata.model.group.GroupModel> success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.group.GroupModel.class))));
tmpMap.put(_Fields.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(getAllGroupsUserBelongs_result.class, metaDataMap);
}
public getAllGroupsUserBelongs_result() {
}
public getAllGroupsUserBelongs_result(
java.util.List<org.apache.airavata.model.group.GroupModel> success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAllGroupsUserBelongs_result(getAllGroupsUserBelongs_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.group.GroupModel> __this__success = new java.util.ArrayList<org.apache.airavata.model.group.GroupModel>(other.success.size());
for (org.apache.airavata.model.group.GroupModel other_element : other.success) {
__this__success.add(new org.apache.airavata.model.group.GroupModel(other_element));
}
this.success = __this__success;
}
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public getAllGroupsUserBelongs_result deepCopy() {
return new getAllGroupsUserBelongs_result(this);
}
@Override
public void clear() {
this.success = null;
this.gse = null;
this.ae = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<org.apache.airavata.model.group.GroupModel> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(org.apache.airavata.model.group.GroupModel elem) {
if (this.success == null) {
this.success = new java.util.ArrayList<org.apache.airavata.model.group.GroupModel>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.group.GroupModel> getSuccess() {
return this.success;
}
public getAllGroupsUserBelongs_result setSuccess(java.util.List<org.apache.airavata.model.group.GroupModel> 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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public getAllGroupsUserBelongs_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public getAllGroupsUserBelongs_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.group.GroupModel>)value);
}
break;
case GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 getAllGroupsUserBelongs_result)
return this.equals((getAllGroupsUserBelongs_result)that);
return false;
}
public boolean equals(getAllGroupsUserBelongs_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllGroupsUserBelongs_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("getAllGroupsUserBelongs_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("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 getAllGroupsUserBelongs_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllGroupsUserBelongs_resultStandardScheme getScheme() {
return new getAllGroupsUserBelongs_resultStandardScheme();
}
}
private static class getAllGroupsUserBelongs_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAllGroupsUserBelongs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGroupsUserBelongs_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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.group.GroupModel>(_list8.size);
org.apache.airavata.model.group.GroupModel _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = new org.apache.airavata.model.group.GroupModel();
_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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, getAllGroupsUserBelongs_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.group.GroupModel _iter11 : struct.success)
{
_iter11.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 getAllGroupsUserBelongs_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllGroupsUserBelongs_resultTupleScheme getScheme() {
return new getAllGroupsUserBelongs_resultTupleScheme();
}
}
private static class getAllGroupsUserBelongs_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllGroupsUserBelongs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllGroupsUserBelongs_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.isSetGse()) {
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.group.GroupModel _iter12 : struct.success)
{
_iter12.write(oprot);
}
}
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllGroupsUserBelongs_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.group.GroupModel>(_list13.size);
org.apache.airavata.model.group.GroupModel _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = new org.apache.airavata.model.group.GroupModel();
_elem14.read(iprot);
struct.success.add(_elem14);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 addUsersToGroup_args implements org.apache.thrift.TBase<addUsersToGroup_args, addUsersToGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<addUsersToGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addUsersToGroup_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_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("userIds", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addUsersToGroup_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addUsersToGroup_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.util.List<java.lang.String> userIds; // required
public java.lang.String groupId; // required
/** 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_IDS((short)2, "userIds"),
GROUP_ID((short)3, "groupId");
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_IDS
return USER_IDS;
case 3: // GROUP_ID
return GROUP_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.USER_IDS, new org.apache.thrift.meta_data.FieldMetaData("userIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", 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(addUsersToGroup_args.class, metaDataMap);
}
public addUsersToGroup_args() {
}
public addUsersToGroup_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.util.List<java.lang.String> userIds,
java.lang.String groupId)
{
this();
this.authzToken = authzToken;
this.userIds = userIds;
this.groupId = groupId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addUsersToGroup_args(addUsersToGroup_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUserIds()) {
java.util.List<java.lang.String> __this__userIds = new java.util.ArrayList<java.lang.String>(other.userIds);
this.userIds = __this__userIds;
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
}
public addUsersToGroup_args deepCopy() {
return new addUsersToGroup_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.userIds = null;
this.groupId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public addUsersToGroup_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 getUserIdsSize() {
return (this.userIds == null) ? 0 : this.userIds.size();
}
public java.util.Iterator<java.lang.String> getUserIdsIterator() {
return (this.userIds == null) ? null : this.userIds.iterator();
}
public void addToUserIds(java.lang.String elem) {
if (this.userIds == null) {
this.userIds = new java.util.ArrayList<java.lang.String>();
}
this.userIds.add(elem);
}
public java.util.List<java.lang.String> getUserIds() {
return this.userIds;
}
public addUsersToGroup_args setUserIds(java.util.List<java.lang.String> userIds) {
this.userIds = userIds;
return this;
}
public void unsetUserIds() {
this.userIds = null;
}
/** Returns true if field userIds is set (has been assigned a value) and false otherwise */
public boolean isSetUserIds() {
return this.userIds != null;
}
public void setUserIdsIsSet(boolean value) {
if (!value) {
this.userIds = null;
}
}
public java.lang.String getGroupId() {
return this.groupId;
}
public addUsersToGroup_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = 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_IDS:
if (value == null) {
unsetUserIds();
} else {
setUserIds((java.util.List<java.lang.String>)value);
}
break;
case GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_IDS:
return getUserIds();
case GROUP_ID:
return getGroupId();
}
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_IDS:
return isSetUserIds();
case GROUP_ID:
return isSetGroupId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof addUsersToGroup_args)
return this.equals((addUsersToGroup_args)that);
return false;
}
public boolean equals(addUsersToGroup_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_userIds = true && this.isSetUserIds();
boolean that_present_userIds = true && that.isSetUserIds();
if (this_present_userIds || that_present_userIds) {
if (!(this_present_userIds && that_present_userIds))
return false;
if (!this.userIds.equals(that.userIds))
return false;
}
boolean this_present_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
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 + ((isSetUserIds()) ? 131071 : 524287);
if (isSetUserIds())
hashCode = hashCode * 8191 + userIds.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
return hashCode;
}
@Override
public int compareTo(addUsersToGroup_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(isSetUserIds()).compareTo(other.isSetUserIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userIds, other.userIds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("addUsersToGroup_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("userIds:");
if (this.userIds == null) {
sb.append("null");
} else {
sb.append(this.userIds);
}
first = false;
if (!first) sb.append(", ");
sb.append("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
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 (userIds == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'userIds' was not present! Struct: " + toString());
}
if (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' 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 addUsersToGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addUsersToGroup_argsStandardScheme getScheme() {
return new addUsersToGroup_argsStandardScheme();
}
}
private static class addUsersToGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<addUsersToGroup_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addUsersToGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
struct.userIds = new java.util.ArrayList<java.lang.String>(_list16.size);
java.lang.String _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = iprot.readString();
struct.userIds.add(_elem17);
}
iprot.readListEnd();
}
struct.setUserIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
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, addUsersToGroup_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.userIds != null) {
oprot.writeFieldBegin(USER_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.userIds.size()));
for (java.lang.String _iter19 : struct.userIds)
{
oprot.writeString(_iter19);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addUsersToGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addUsersToGroup_argsTupleScheme getScheme() {
return new addUsersToGroup_argsTupleScheme();
}
}
private static class addUsersToGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addUsersToGroup_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addUsersToGroup_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.userIds.size());
for (java.lang.String _iter20 : struct.userIds)
{
oprot.writeString(_iter20);
}
}
oprot.writeString(struct.groupId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addUsersToGroup_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);
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.userIds = new java.util.ArrayList<java.lang.String>(_list21.size);
java.lang.String _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = iprot.readString();
struct.userIds.add(_elem22);
}
}
struct.setUserIdsIsSet(true);
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(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 addUsersToGroup_result implements org.apache.thrift.TBase<addUsersToGroup_result, addUsersToGroup_result._Fields>, java.io.Serializable, Cloneable, Comparable<addUsersToGroup_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addUsersToGroup_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 addUsersToGroup_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addUsersToGroup_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(addUsersToGroup_result.class, metaDataMap);
}
public addUsersToGroup_result() {
}
public addUsersToGroup_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addUsersToGroup_result(addUsersToGroup_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public addUsersToGroup_result deepCopy() {
return new addUsersToGroup_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public addUsersToGroup_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public addUsersToGroup_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public addUsersToGroup_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 addUsersToGroup_result)
return this.equals((addUsersToGroup_result)that);
return false;
}
public boolean equals(addUsersToGroup_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(addUsersToGroup_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("addUsersToGroup_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 addUsersToGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addUsersToGroup_resultStandardScheme getScheme() {
return new addUsersToGroup_resultStandardScheme();
}
}
private static class addUsersToGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<addUsersToGroup_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addUsersToGroup_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, addUsersToGroup_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 addUsersToGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addUsersToGroup_resultTupleScheme getScheme() {
return new addUsersToGroup_resultTupleScheme();
}
}
private static class addUsersToGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addUsersToGroup_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addUsersToGroup_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addUsersToGroup_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 removeUsersFromGroup_args implements org.apache.thrift.TBase<removeUsersFromGroup_args, removeUsersFromGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeUsersFromGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeUsersFromGroup_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_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("userIds", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeUsersFromGroup_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeUsersFromGroup_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.util.List<java.lang.String> userIds; // required
public java.lang.String groupId; // required
/** 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_IDS((short)2, "userIds"),
GROUP_ID((short)3, "groupId");
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_IDS
return USER_IDS;
case 3: // GROUP_ID
return GROUP_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.USER_IDS, new org.apache.thrift.meta_data.FieldMetaData("userIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", 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(removeUsersFromGroup_args.class, metaDataMap);
}
public removeUsersFromGroup_args() {
}
public removeUsersFromGroup_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.util.List<java.lang.String> userIds,
java.lang.String groupId)
{
this();
this.authzToken = authzToken;
this.userIds = userIds;
this.groupId = groupId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public removeUsersFromGroup_args(removeUsersFromGroup_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetUserIds()) {
java.util.List<java.lang.String> __this__userIds = new java.util.ArrayList<java.lang.String>(other.userIds);
this.userIds = __this__userIds;
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
}
public removeUsersFromGroup_args deepCopy() {
return new removeUsersFromGroup_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.userIds = null;
this.groupId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public removeUsersFromGroup_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 getUserIdsSize() {
return (this.userIds == null) ? 0 : this.userIds.size();
}
public java.util.Iterator<java.lang.String> getUserIdsIterator() {
return (this.userIds == null) ? null : this.userIds.iterator();
}
public void addToUserIds(java.lang.String elem) {
if (this.userIds == null) {
this.userIds = new java.util.ArrayList<java.lang.String>();
}
this.userIds.add(elem);
}
public java.util.List<java.lang.String> getUserIds() {
return this.userIds;
}
public removeUsersFromGroup_args setUserIds(java.util.List<java.lang.String> userIds) {
this.userIds = userIds;
return this;
}
public void unsetUserIds() {
this.userIds = null;
}
/** Returns true if field userIds is set (has been assigned a value) and false otherwise */
public boolean isSetUserIds() {
return this.userIds != null;
}
public void setUserIdsIsSet(boolean value) {
if (!value) {
this.userIds = null;
}
}
public java.lang.String getGroupId() {
return this.groupId;
}
public removeUsersFromGroup_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = 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_IDS:
if (value == null) {
unsetUserIds();
} else {
setUserIds((java.util.List<java.lang.String>)value);
}
break;
case GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case USER_IDS:
return getUserIds();
case GROUP_ID:
return getGroupId();
}
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_IDS:
return isSetUserIds();
case GROUP_ID:
return isSetGroupId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof removeUsersFromGroup_args)
return this.equals((removeUsersFromGroup_args)that);
return false;
}
public boolean equals(removeUsersFromGroup_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_userIds = true && this.isSetUserIds();
boolean that_present_userIds = true && that.isSetUserIds();
if (this_present_userIds || that_present_userIds) {
if (!(this_present_userIds && that_present_userIds))
return false;
if (!this.userIds.equals(that.userIds))
return false;
}
boolean this_present_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
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 + ((isSetUserIds()) ? 131071 : 524287);
if (isSetUserIds())
hashCode = hashCode * 8191 + userIds.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
return hashCode;
}
@Override
public int compareTo(removeUsersFromGroup_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(isSetUserIds()).compareTo(other.isSetUserIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userIds, other.userIds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("removeUsersFromGroup_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("userIds:");
if (this.userIds == null) {
sb.append("null");
} else {
sb.append(this.userIds);
}
first = false;
if (!first) sb.append(", ");
sb.append("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
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 (userIds == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'userIds' was not present! Struct: " + toString());
}
if (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' 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 removeUsersFromGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeUsersFromGroup_argsStandardScheme getScheme() {
return new removeUsersFromGroup_argsStandardScheme();
}
}
private static class removeUsersFromGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeUsersFromGroup_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, removeUsersFromGroup_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
struct.userIds = new java.util.ArrayList<java.lang.String>(_list24.size);
java.lang.String _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = iprot.readString();
struct.userIds.add(_elem25);
}
iprot.readListEnd();
}
struct.setUserIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
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, removeUsersFromGroup_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.userIds != null) {
oprot.writeFieldBegin(USER_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.userIds.size()));
for (java.lang.String _iter27 : struct.userIds)
{
oprot.writeString(_iter27);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class removeUsersFromGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeUsersFromGroup_argsTupleScheme getScheme() {
return new removeUsersFromGroup_argsTupleScheme();
}
}
private static class removeUsersFromGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeUsersFromGroup_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeUsersFromGroup_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.userIds.size());
for (java.lang.String _iter28 : struct.userIds)
{
oprot.writeString(_iter28);
}
}
oprot.writeString(struct.groupId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, removeUsersFromGroup_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);
{
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.userIds = new java.util.ArrayList<java.lang.String>(_list29.size);
java.lang.String _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = iprot.readString();
struct.userIds.add(_elem30);
}
}
struct.setUserIdsIsSet(true);
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(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 removeUsersFromGroup_result implements org.apache.thrift.TBase<removeUsersFromGroup_result, removeUsersFromGroup_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeUsersFromGroup_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeUsersFromGroup_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 removeUsersFromGroup_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeUsersFromGroup_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(removeUsersFromGroup_result.class, metaDataMap);
}
public removeUsersFromGroup_result() {
}
public removeUsersFromGroup_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public removeUsersFromGroup_result(removeUsersFromGroup_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public removeUsersFromGroup_result deepCopy() {
return new removeUsersFromGroup_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public removeUsersFromGroup_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public removeUsersFromGroup_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public removeUsersFromGroup_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 removeUsersFromGroup_result)
return this.equals((removeUsersFromGroup_result)that);
return false;
}
public boolean equals(removeUsersFromGroup_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(removeUsersFromGroup_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("removeUsersFromGroup_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 removeUsersFromGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeUsersFromGroup_resultStandardScheme getScheme() {
return new removeUsersFromGroup_resultStandardScheme();
}
}
private static class removeUsersFromGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeUsersFromGroup_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, removeUsersFromGroup_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, removeUsersFromGroup_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 removeUsersFromGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeUsersFromGroup_resultTupleScheme getScheme() {
return new removeUsersFromGroup_resultTupleScheme();
}
}
private static class removeUsersFromGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeUsersFromGroup_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeUsersFromGroup_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, removeUsersFromGroup_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 transferGroupOwnership_args implements org.apache.thrift.TBase<transferGroupOwnership_args, transferGroupOwnership_args._Fields>, java.io.Serializable, Cloneable, Comparable<transferGroupOwnership_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("transferGroupOwnership_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new transferGroupOwnership_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new transferGroupOwnership_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
public java.lang.String newOwnerId; // required
/** 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"),
GROUP_ID((short)2, "groupId"),
NEW_OWNER_ID((short)3, "newOwnerId");
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: // GROUP_ID
return GROUP_ID;
case 3: // NEW_OWNER_ID
return NEW_OWNER_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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", 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(transferGroupOwnership_args.class, metaDataMap);
}
public transferGroupOwnership_args() {
}
public transferGroupOwnership_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId,
java.lang.String newOwnerId)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
this.newOwnerId = newOwnerId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public transferGroupOwnership_args(transferGroupOwnership_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
if (other.isSetNewOwnerId()) {
this.newOwnerId = other.newOwnerId;
}
}
public transferGroupOwnership_args deepCopy() {
return new transferGroupOwnership_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
this.newOwnerId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public transferGroupOwnership_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 getGroupId() {
return this.groupId;
}
public transferGroupOwnership_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = null;
}
}
public java.lang.String getNewOwnerId() {
return this.newOwnerId;
}
public transferGroupOwnership_args setNewOwnerId(java.lang.String newOwnerId) {
this.newOwnerId = newOwnerId;
return this;
}
public void unsetNewOwnerId() {
this.newOwnerId = null;
}
/** Returns true if field newOwnerId is set (has been assigned a value) and false otherwise */
public boolean isSetNewOwnerId() {
return this.newOwnerId != null;
}
public void setNewOwnerIdIsSet(boolean value) {
if (!value) {
this.newOwnerId = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
case NEW_OWNER_ID:
if (value == null) {
unsetNewOwnerId();
} else {
setNewOwnerId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
case NEW_OWNER_ID:
return getNewOwnerId();
}
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 GROUP_ID:
return isSetGroupId();
case NEW_OWNER_ID:
return isSetNewOwnerId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof transferGroupOwnership_args)
return this.equals((transferGroupOwnership_args)that);
return false;
}
public boolean equals(transferGroupOwnership_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
return false;
}
boolean this_present_newOwnerId = true && this.isSetNewOwnerId();
boolean that_present_newOwnerId = true && that.isSetNewOwnerId();
if (this_present_newOwnerId || that_present_newOwnerId) {
if (!(this_present_newOwnerId && that_present_newOwnerId))
return false;
if (!this.newOwnerId.equals(that.newOwnerId))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
hashCode = hashCode * 8191 + ((isSetNewOwnerId()) ? 131071 : 524287);
if (isSetNewOwnerId())
hashCode = hashCode * 8191 + newOwnerId.hashCode();
return hashCode;
}
@Override
public int compareTo(transferGroupOwnership_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNewOwnerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("transferGroupOwnership_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
first = false;
if (!first) sb.append(", ");
sb.append("newOwnerId:");
if (this.newOwnerId == null) {
sb.append("null");
} else {
sb.append(this.newOwnerId);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' was not present! Struct: " + toString());
}
if (newOwnerId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'newOwnerId' 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 transferGroupOwnership_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transferGroupOwnership_argsStandardScheme getScheme() {
return new transferGroupOwnership_argsStandardScheme();
}
}
private static class transferGroupOwnership_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<transferGroupOwnership_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, transferGroupOwnership_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // NEW_OWNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.newOwnerId = iprot.readString();
struct.setNewOwnerIdIsSet(true);
} else {
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, transferGroupOwnership_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
if (struct.newOwnerId != null) {
oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC);
oprot.writeString(struct.newOwnerId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class transferGroupOwnership_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transferGroupOwnership_argsTupleScheme getScheme() {
return new transferGroupOwnership_argsTupleScheme();
}
}
private static class transferGroupOwnership_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<transferGroupOwnership_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, transferGroupOwnership_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.groupId);
oprot.writeString(struct.newOwnerId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, transferGroupOwnership_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.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
struct.newOwnerId = iprot.readString();
struct.setNewOwnerIdIsSet(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 transferGroupOwnership_result implements org.apache.thrift.TBase<transferGroupOwnership_result, transferGroupOwnership_result._Fields>, java.io.Serializable, Cloneable, Comparable<transferGroupOwnership_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("transferGroupOwnership_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 transferGroupOwnership_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new transferGroupOwnership_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(transferGroupOwnership_result.class, metaDataMap);
}
public transferGroupOwnership_result() {
}
public transferGroupOwnership_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public transferGroupOwnership_result(transferGroupOwnership_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public transferGroupOwnership_result deepCopy() {
return new transferGroupOwnership_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public transferGroupOwnership_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public transferGroupOwnership_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public transferGroupOwnership_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 transferGroupOwnership_result)
return this.equals((transferGroupOwnership_result)that);
return false;
}
public boolean equals(transferGroupOwnership_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(transferGroupOwnership_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("transferGroupOwnership_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 transferGroupOwnership_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transferGroupOwnership_resultStandardScheme getScheme() {
return new transferGroupOwnership_resultStandardScheme();
}
}
private static class transferGroupOwnership_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<transferGroupOwnership_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, transferGroupOwnership_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, transferGroupOwnership_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 transferGroupOwnership_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transferGroupOwnership_resultTupleScheme getScheme() {
return new transferGroupOwnership_resultTupleScheme();
}
}
private static class transferGroupOwnership_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<transferGroupOwnership_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, transferGroupOwnership_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, transferGroupOwnership_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 addGroupAdmins_args implements org.apache.thrift.TBase<addGroupAdmins_args, addGroupAdmins_args._Fields>, java.io.Serializable, Cloneable, Comparable<addGroupAdmins_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGroupAdmins_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ADMIN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("adminIds", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addGroupAdmins_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addGroupAdmins_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
public java.util.List<java.lang.String> adminIds; // required
/** 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"),
GROUP_ID((short)2, "groupId"),
ADMIN_IDS((short)3, "adminIds");
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: // GROUP_ID
return GROUP_ID;
case 3: // ADMIN_IDS
return ADMIN_IDS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADMIN_IDS, new org.apache.thrift.meta_data.FieldMetaData("adminIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGroupAdmins_args.class, metaDataMap);
}
public addGroupAdmins_args() {
}
public addGroupAdmins_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId,
java.util.List<java.lang.String> adminIds)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
this.adminIds = adminIds;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addGroupAdmins_args(addGroupAdmins_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
if (other.isSetAdminIds()) {
java.util.List<java.lang.String> __this__adminIds = new java.util.ArrayList<java.lang.String>(other.adminIds);
this.adminIds = __this__adminIds;
}
}
public addGroupAdmins_args deepCopy() {
return new addGroupAdmins_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
this.adminIds = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public addGroupAdmins_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 getGroupId() {
return this.groupId;
}
public addGroupAdmins_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = null;
}
}
public int getAdminIdsSize() {
return (this.adminIds == null) ? 0 : this.adminIds.size();
}
public java.util.Iterator<java.lang.String> getAdminIdsIterator() {
return (this.adminIds == null) ? null : this.adminIds.iterator();
}
public void addToAdminIds(java.lang.String elem) {
if (this.adminIds == null) {
this.adminIds = new java.util.ArrayList<java.lang.String>();
}
this.adminIds.add(elem);
}
public java.util.List<java.lang.String> getAdminIds() {
return this.adminIds;
}
public addGroupAdmins_args setAdminIds(java.util.List<java.lang.String> adminIds) {
this.adminIds = adminIds;
return this;
}
public void unsetAdminIds() {
this.adminIds = null;
}
/** Returns true if field adminIds is set (has been assigned a value) and false otherwise */
public boolean isSetAdminIds() {
return this.adminIds != null;
}
public void setAdminIdsIsSet(boolean value) {
if (!value) {
this.adminIds = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
case ADMIN_IDS:
if (value == null) {
unsetAdminIds();
} else {
setAdminIds((java.util.List<java.lang.String>)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
case ADMIN_IDS:
return getAdminIds();
}
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 GROUP_ID:
return isSetGroupId();
case ADMIN_IDS:
return isSetAdminIds();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof addGroupAdmins_args)
return this.equals((addGroupAdmins_args)that);
return false;
}
public boolean equals(addGroupAdmins_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
return false;
}
boolean this_present_adminIds = true && this.isSetAdminIds();
boolean that_present_adminIds = true && that.isSetAdminIds();
if (this_present_adminIds || that_present_adminIds) {
if (!(this_present_adminIds && that_present_adminIds))
return false;
if (!this.adminIds.equals(that.adminIds))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
hashCode = hashCode * 8191 + ((isSetAdminIds()) ? 131071 : 524287);
if (isSetAdminIds())
hashCode = hashCode * 8191 + adminIds.hashCode();
return hashCode;
}
@Override
public int compareTo(addGroupAdmins_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAdminIds()).compareTo(other.isSetAdminIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAdminIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.adminIds, other.adminIds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("addGroupAdmins_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
first = false;
if (!first) sb.append(", ");
sb.append("adminIds:");
if (this.adminIds == null) {
sb.append("null");
} else {
sb.append(this.adminIds);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' was not present! Struct: " + toString());
}
if (adminIds == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'adminIds' 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 addGroupAdmins_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addGroupAdmins_argsStandardScheme getScheme() {
return new addGroupAdmins_argsStandardScheme();
}
}
private static class addGroupAdmins_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<addGroupAdmins_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addGroupAdmins_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ADMIN_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
struct.adminIds = new java.util.ArrayList<java.lang.String>(_list32.size);
java.lang.String _elem33;
for (int _i34 = 0; _i34 < _list32.size; ++_i34)
{
_elem33 = iprot.readString();
struct.adminIds.add(_elem33);
}
iprot.readListEnd();
}
struct.setAdminIdsIsSet(true);
} else {
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, addGroupAdmins_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
if (struct.adminIds != null) {
oprot.writeFieldBegin(ADMIN_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.adminIds.size()));
for (java.lang.String _iter35 : struct.adminIds)
{
oprot.writeString(_iter35);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addGroupAdmins_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addGroupAdmins_argsTupleScheme getScheme() {
return new addGroupAdmins_argsTupleScheme();
}
}
private static class addGroupAdmins_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addGroupAdmins_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addGroupAdmins_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.groupId);
{
oprot.writeI32(struct.adminIds.size());
for (java.lang.String _iter36 : struct.adminIds)
{
oprot.writeString(_iter36);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addGroupAdmins_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.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
{
org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.adminIds = new java.util.ArrayList<java.lang.String>(_list37.size);
java.lang.String _elem38;
for (int _i39 = 0; _i39 < _list37.size; ++_i39)
{
_elem38 = iprot.readString();
struct.adminIds.add(_elem38);
}
}
struct.setAdminIdsIsSet(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 addGroupAdmins_result implements org.apache.thrift.TBase<addGroupAdmins_result, addGroupAdmins_result._Fields>, java.io.Serializable, Cloneable, Comparable<addGroupAdmins_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGroupAdmins_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 addGroupAdmins_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addGroupAdmins_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(addGroupAdmins_result.class, metaDataMap);
}
public addGroupAdmins_result() {
}
public addGroupAdmins_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addGroupAdmins_result(addGroupAdmins_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public addGroupAdmins_result deepCopy() {
return new addGroupAdmins_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public addGroupAdmins_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public addGroupAdmins_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public addGroupAdmins_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 addGroupAdmins_result)
return this.equals((addGroupAdmins_result)that);
return false;
}
public boolean equals(addGroupAdmins_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(addGroupAdmins_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("addGroupAdmins_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 addGroupAdmins_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addGroupAdmins_resultStandardScheme getScheme() {
return new addGroupAdmins_resultStandardScheme();
}
}
private static class addGroupAdmins_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<addGroupAdmins_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addGroupAdmins_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, addGroupAdmins_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 addGroupAdmins_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public addGroupAdmins_resultTupleScheme getScheme() {
return new addGroupAdmins_resultTupleScheme();
}
}
private static class addGroupAdmins_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addGroupAdmins_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addGroupAdmins_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addGroupAdmins_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 removeGroupAdmins_args implements org.apache.thrift.TBase<removeGroupAdmins_args, removeGroupAdmins_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeGroupAdmins_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeGroupAdmins_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ADMIN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("adminIds", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeGroupAdmins_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeGroupAdmins_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
public java.util.List<java.lang.String> adminIds; // required
/** 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"),
GROUP_ID((short)2, "groupId"),
ADMIN_IDS((short)3, "adminIds");
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: // GROUP_ID
return GROUP_ID;
case 3: // ADMIN_IDS
return ADMIN_IDS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADMIN_IDS, new org.apache.thrift.meta_data.FieldMetaData("adminIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeGroupAdmins_args.class, metaDataMap);
}
public removeGroupAdmins_args() {
}
public removeGroupAdmins_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId,
java.util.List<java.lang.String> adminIds)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
this.adminIds = adminIds;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public removeGroupAdmins_args(removeGroupAdmins_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
if (other.isSetAdminIds()) {
java.util.List<java.lang.String> __this__adminIds = new java.util.ArrayList<java.lang.String>(other.adminIds);
this.adminIds = __this__adminIds;
}
}
public removeGroupAdmins_args deepCopy() {
return new removeGroupAdmins_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
this.adminIds = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public removeGroupAdmins_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 getGroupId() {
return this.groupId;
}
public removeGroupAdmins_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = null;
}
}
public int getAdminIdsSize() {
return (this.adminIds == null) ? 0 : this.adminIds.size();
}
public java.util.Iterator<java.lang.String> getAdminIdsIterator() {
return (this.adminIds == null) ? null : this.adminIds.iterator();
}
public void addToAdminIds(java.lang.String elem) {
if (this.adminIds == null) {
this.adminIds = new java.util.ArrayList<java.lang.String>();
}
this.adminIds.add(elem);
}
public java.util.List<java.lang.String> getAdminIds() {
return this.adminIds;
}
public removeGroupAdmins_args setAdminIds(java.util.List<java.lang.String> adminIds) {
this.adminIds = adminIds;
return this;
}
public void unsetAdminIds() {
this.adminIds = null;
}
/** Returns true if field adminIds is set (has been assigned a value) and false otherwise */
public boolean isSetAdminIds() {
return this.adminIds != null;
}
public void setAdminIdsIsSet(boolean value) {
if (!value) {
this.adminIds = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
case ADMIN_IDS:
if (value == null) {
unsetAdminIds();
} else {
setAdminIds((java.util.List<java.lang.String>)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
case ADMIN_IDS:
return getAdminIds();
}
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 GROUP_ID:
return isSetGroupId();
case ADMIN_IDS:
return isSetAdminIds();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof removeGroupAdmins_args)
return this.equals((removeGroupAdmins_args)that);
return false;
}
public boolean equals(removeGroupAdmins_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
return false;
}
boolean this_present_adminIds = true && this.isSetAdminIds();
boolean that_present_adminIds = true && that.isSetAdminIds();
if (this_present_adminIds || that_present_adminIds) {
if (!(this_present_adminIds && that_present_adminIds))
return false;
if (!this.adminIds.equals(that.adminIds))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
hashCode = hashCode * 8191 + ((isSetAdminIds()) ? 131071 : 524287);
if (isSetAdminIds())
hashCode = hashCode * 8191 + adminIds.hashCode();
return hashCode;
}
@Override
public int compareTo(removeGroupAdmins_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAdminIds()).compareTo(other.isSetAdminIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAdminIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.adminIds, other.adminIds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("removeGroupAdmins_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
first = false;
if (!first) sb.append(", ");
sb.append("adminIds:");
if (this.adminIds == null) {
sb.append("null");
} else {
sb.append(this.adminIds);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' was not present! Struct: " + toString());
}
if (adminIds == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'adminIds' 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 removeGroupAdmins_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeGroupAdmins_argsStandardScheme getScheme() {
return new removeGroupAdmins_argsStandardScheme();
}
}
private static class removeGroupAdmins_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeGroupAdmins_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, removeGroupAdmins_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ADMIN_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
struct.adminIds = new java.util.ArrayList<java.lang.String>(_list40.size);
java.lang.String _elem41;
for (int _i42 = 0; _i42 < _list40.size; ++_i42)
{
_elem41 = iprot.readString();
struct.adminIds.add(_elem41);
}
iprot.readListEnd();
}
struct.setAdminIdsIsSet(true);
} else {
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, removeGroupAdmins_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
if (struct.adminIds != null) {
oprot.writeFieldBegin(ADMIN_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.adminIds.size()));
for (java.lang.String _iter43 : struct.adminIds)
{
oprot.writeString(_iter43);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class removeGroupAdmins_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeGroupAdmins_argsTupleScheme getScheme() {
return new removeGroupAdmins_argsTupleScheme();
}
}
private static class removeGroupAdmins_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeGroupAdmins_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeGroupAdmins_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.groupId);
{
oprot.writeI32(struct.adminIds.size());
for (java.lang.String _iter44 : struct.adminIds)
{
oprot.writeString(_iter44);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, removeGroupAdmins_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.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
{
org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.adminIds = new java.util.ArrayList<java.lang.String>(_list45.size);
java.lang.String _elem46;
for (int _i47 = 0; _i47 < _list45.size; ++_i47)
{
_elem46 = iprot.readString();
struct.adminIds.add(_elem46);
}
}
struct.setAdminIdsIsSet(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 removeGroupAdmins_result implements org.apache.thrift.TBase<removeGroupAdmins_result, removeGroupAdmins_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeGroupAdmins_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeGroupAdmins_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 removeGroupAdmins_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeGroupAdmins_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(removeGroupAdmins_result.class, metaDataMap);
}
public removeGroupAdmins_result() {
}
public removeGroupAdmins_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public removeGroupAdmins_result(removeGroupAdmins_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public removeGroupAdmins_result deepCopy() {
return new removeGroupAdmins_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public removeGroupAdmins_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public removeGroupAdmins_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public removeGroupAdmins_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 removeGroupAdmins_result)
return this.equals((removeGroupAdmins_result)that);
return false;
}
public boolean equals(removeGroupAdmins_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(removeGroupAdmins_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("removeGroupAdmins_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 removeGroupAdmins_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeGroupAdmins_resultStandardScheme getScheme() {
return new removeGroupAdmins_resultStandardScheme();
}
}
private static class removeGroupAdmins_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeGroupAdmins_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, removeGroupAdmins_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, removeGroupAdmins_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 removeGroupAdmins_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public removeGroupAdmins_resultTupleScheme getScheme() {
return new removeGroupAdmins_resultTupleScheme();
}
}
private static class removeGroupAdmins_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeGroupAdmins_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeGroupAdmins_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, removeGroupAdmins_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 hasAdminAccess_args implements org.apache.thrift.TBase<hasAdminAccess_args, hasAdminAccess_args._Fields>, java.io.Serializable, Cloneable, Comparable<hasAdminAccess_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("hasAdminAccess_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ADMIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("adminId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new hasAdminAccess_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new hasAdminAccess_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
public java.lang.String adminId; // required
/** 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"),
GROUP_ID((short)2, "groupId"),
ADMIN_ID((short)3, "adminId");
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: // GROUP_ID
return GROUP_ID;
case 3: // ADMIN_ID
return ADMIN_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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADMIN_ID, new org.apache.thrift.meta_data.FieldMetaData("adminId", 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(hasAdminAccess_args.class, metaDataMap);
}
public hasAdminAccess_args() {
}
public hasAdminAccess_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId,
java.lang.String adminId)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
this.adminId = adminId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hasAdminAccess_args(hasAdminAccess_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
if (other.isSetAdminId()) {
this.adminId = other.adminId;
}
}
public hasAdminAccess_args deepCopy() {
return new hasAdminAccess_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
this.adminId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public hasAdminAccess_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 getGroupId() {
return this.groupId;
}
public hasAdminAccess_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = null;
}
}
public java.lang.String getAdminId() {
return this.adminId;
}
public hasAdminAccess_args setAdminId(java.lang.String adminId) {
this.adminId = adminId;
return this;
}
public void unsetAdminId() {
this.adminId = null;
}
/** Returns true if field adminId is set (has been assigned a value) and false otherwise */
public boolean isSetAdminId() {
return this.adminId != null;
}
public void setAdminIdIsSet(boolean value) {
if (!value) {
this.adminId = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
case ADMIN_ID:
if (value == null) {
unsetAdminId();
} else {
setAdminId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
case ADMIN_ID:
return getAdminId();
}
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 GROUP_ID:
return isSetGroupId();
case ADMIN_ID:
return isSetAdminId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof hasAdminAccess_args)
return this.equals((hasAdminAccess_args)that);
return false;
}
public boolean equals(hasAdminAccess_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
return false;
}
boolean this_present_adminId = true && this.isSetAdminId();
boolean that_present_adminId = true && that.isSetAdminId();
if (this_present_adminId || that_present_adminId) {
if (!(this_present_adminId && that_present_adminId))
return false;
if (!this.adminId.equals(that.adminId))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
hashCode = hashCode * 8191 + ((isSetAdminId()) ? 131071 : 524287);
if (isSetAdminId())
hashCode = hashCode * 8191 + adminId.hashCode();
return hashCode;
}
@Override
public int compareTo(hasAdminAccess_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAdminId()).compareTo(other.isSetAdminId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAdminId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.adminId, other.adminId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("hasAdminAccess_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
first = false;
if (!first) sb.append(", ");
sb.append("adminId:");
if (this.adminId == null) {
sb.append("null");
} else {
sb.append(this.adminId);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' was not present! Struct: " + toString());
}
if (adminId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'adminId' 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 hasAdminAccess_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasAdminAccess_argsStandardScheme getScheme() {
return new hasAdminAccess_argsStandardScheme();
}
}
private static class hasAdminAccess_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<hasAdminAccess_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, hasAdminAccess_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ADMIN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.adminId = iprot.readString();
struct.setAdminIdIsSet(true);
} else {
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, hasAdminAccess_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
if (struct.adminId != null) {
oprot.writeFieldBegin(ADMIN_ID_FIELD_DESC);
oprot.writeString(struct.adminId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class hasAdminAccess_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasAdminAccess_argsTupleScheme getScheme() {
return new hasAdminAccess_argsTupleScheme();
}
}
private static class hasAdminAccess_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<hasAdminAccess_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, hasAdminAccess_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.groupId);
oprot.writeString(struct.adminId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, hasAdminAccess_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.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
struct.adminId = iprot.readString();
struct.setAdminIdIsSet(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 hasAdminAccess_result implements org.apache.thrift.TBase<hasAdminAccess_result, hasAdminAccess_result._Fields>, java.io.Serializable, Cloneable, Comparable<hasAdminAccess_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("hasAdminAccess_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 hasAdminAccess_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new hasAdminAccess_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(hasAdminAccess_result.class, metaDataMap);
}
public hasAdminAccess_result() {
}
public hasAdminAccess_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hasAdminAccess_result(hasAdminAccess_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public hasAdminAccess_result deepCopy() {
return new hasAdminAccess_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public hasAdminAccess_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public hasAdminAccess_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public hasAdminAccess_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 hasAdminAccess_result)
return this.equals((hasAdminAccess_result)that);
return false;
}
public boolean equals(hasAdminAccess_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(hasAdminAccess_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("hasAdminAccess_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 hasAdminAccess_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasAdminAccess_resultStandardScheme getScheme() {
return new hasAdminAccess_resultStandardScheme();
}
}
private static class hasAdminAccess_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<hasAdminAccess_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, hasAdminAccess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, hasAdminAccess_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 hasAdminAccess_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasAdminAccess_resultTupleScheme getScheme() {
return new hasAdminAccess_resultTupleScheme();
}
}
private static class hasAdminAccess_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<hasAdminAccess_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, hasAdminAccess_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, hasAdminAccess_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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 hasOwnerAccess_args implements org.apache.thrift.TBase<hasOwnerAccess_args, hasOwnerAccess_args._Fields>, java.io.Serializable, Cloneable, Comparable<hasOwnerAccess_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("hasOwnerAccess_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 GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new hasOwnerAccess_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new hasOwnerAccess_argsTupleSchemeFactory();
public org.apache.airavata.model.security.AuthzToken authzToken; // required
public java.lang.String groupId; // required
public java.lang.String ownerId; // required
/** 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"),
GROUP_ID((short)2, "groupId"),
OWNER_ID((short)3, "ownerId");
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: // GROUP_ID
return GROUP_ID;
case 3: // OWNER_ID
return OWNER_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.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", 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(hasOwnerAccess_args.class, metaDataMap);
}
public hasOwnerAccess_args() {
}
public hasOwnerAccess_args(
org.apache.airavata.model.security.AuthzToken authzToken,
java.lang.String groupId,
java.lang.String ownerId)
{
this();
this.authzToken = authzToken;
this.groupId = groupId;
this.ownerId = ownerId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hasOwnerAccess_args(hasOwnerAccess_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
if (other.isSetOwnerId()) {
this.ownerId = other.ownerId;
}
}
public hasOwnerAccess_args deepCopy() {
return new hasOwnerAccess_args(this);
}
@Override
public void clear() {
this.authzToken = null;
this.groupId = null;
this.ownerId = null;
}
public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
return this.authzToken;
}
public hasOwnerAccess_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 getGroupId() {
return this.groupId;
}
public hasOwnerAccess_args setGroupId(java.lang.String groupId) {
this.groupId = groupId;
return this;
}
public void unsetGroupId() {
this.groupId = null;
}
/** Returns true if field groupId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupId() {
return this.groupId != null;
}
public void setGroupIdIsSet(boolean value) {
if (!value) {
this.groupId = null;
}
}
public java.lang.String getOwnerId() {
return this.ownerId;
}
public hasOwnerAccess_args setOwnerId(java.lang.String ownerId) {
this.ownerId = ownerId;
return this;
}
public void unsetOwnerId() {
this.ownerId = null;
}
/** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
public boolean isSetOwnerId() {
return this.ownerId != null;
}
public void setOwnerIdIsSet(boolean value) {
if (!value) {
this.ownerId = 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 GROUP_ID:
if (value == null) {
unsetGroupId();
} else {
setGroupId((java.lang.String)value);
}
break;
case OWNER_ID:
if (value == null) {
unsetOwnerId();
} else {
setOwnerId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHZ_TOKEN:
return getAuthzToken();
case GROUP_ID:
return getGroupId();
case OWNER_ID:
return getOwnerId();
}
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 GROUP_ID:
return isSetGroupId();
case OWNER_ID:
return isSetOwnerId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof hasOwnerAccess_args)
return this.equals((hasOwnerAccess_args)that);
return false;
}
public boolean equals(hasOwnerAccess_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_groupId = true && this.isSetGroupId();
boolean that_present_groupId = true && that.isSetGroupId();
if (this_present_groupId || that_present_groupId) {
if (!(this_present_groupId && that_present_groupId))
return false;
if (!this.groupId.equals(that.groupId))
return false;
}
boolean this_present_ownerId = true && this.isSetOwnerId();
boolean that_present_ownerId = true && that.isSetOwnerId();
if (this_present_ownerId || that_present_ownerId) {
if (!(this_present_ownerId && that_present_ownerId))
return false;
if (!this.ownerId.equals(that.ownerId))
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 + ((isSetGroupId()) ? 131071 : 524287);
if (isSetGroupId())
hashCode = hashCode * 8191 + groupId.hashCode();
hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287);
if (isSetOwnerId())
hashCode = hashCode * 8191 + ownerId.hashCode();
return hashCode;
}
@Override
public int compareTo(hasOwnerAccess_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(isSetGroupId()).compareTo(other.isSetGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOwnerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 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("hasOwnerAccess_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("groupId:");
if (this.groupId == null) {
sb.append("null");
} else {
sb.append(this.groupId);
}
first = false;
if (!first) sb.append(", ");
sb.append("ownerId:");
if (this.ownerId == null) {
sb.append("null");
} else {
sb.append(this.ownerId);
}
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 (groupId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupId' was not present! Struct: " + toString());
}
if (ownerId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'ownerId' 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 hasOwnerAccess_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasOwnerAccess_argsStandardScheme getScheme() {
return new hasOwnerAccess_argsStandardScheme();
}
}
private static class hasOwnerAccess_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<hasOwnerAccess_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, hasOwnerAccess_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.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: // GROUP_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OWNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
} else {
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, hasOwnerAccess_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.groupId != null) {
oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
oprot.writeString(struct.groupId);
oprot.writeFieldEnd();
}
if (struct.ownerId != null) {
oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
oprot.writeString(struct.ownerId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class hasOwnerAccess_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasOwnerAccess_argsTupleScheme getScheme() {
return new hasOwnerAccess_argsTupleScheme();
}
}
private static class hasOwnerAccess_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<hasOwnerAccess_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, hasOwnerAccess_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.groupId);
oprot.writeString(struct.ownerId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, hasOwnerAccess_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.groupId = iprot.readString();
struct.setGroupIdIsSet(true);
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(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 hasOwnerAccess_result implements org.apache.thrift.TBase<hasOwnerAccess_result, hasOwnerAccess_result._Fields>, java.io.Serializable, Cloneable, Comparable<hasOwnerAccess_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("hasOwnerAccess_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 GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", 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 hasOwnerAccess_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new hasOwnerAccess_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // 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"),
GSE((short)1, "gse"),
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: // GSE
return GSE;
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.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.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(hasOwnerAccess_result.class, metaDataMap);
}
public hasOwnerAccess_result() {
}
public hasOwnerAccess_result(
boolean success,
org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse,
org.apache.airavata.model.error.AuthorizationException ae)
{
this();
this.success = success;
setSuccessIsSet(true);
this.gse = gse;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hasOwnerAccess_result(hasOwnerAccess_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetGse()) {
this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
}
if (other.isSetAe()) {
this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
}
}
public hasOwnerAccess_result deepCopy() {
return new hasOwnerAccess_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.gse = null;
this.ae = null;
}
public boolean isSuccess() {
return this.success;
}
public hasOwnerAccess_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.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
return this.gse;
}
public hasOwnerAccess_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
this.gse = gse;
return this;
}
public void unsetGse() {
this.gse = null;
}
/** Returns true if field gse is set (has been assigned a value) and false otherwise */
public boolean isSetGse() {
return this.gse != null;
}
public void setGseIsSet(boolean value) {
if (!value) {
this.gse = null;
}
}
public org.apache.airavata.model.error.AuthorizationException getAe() {
return this.ae;
}
public hasOwnerAccess_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 GSE:
if (value == null) {
unsetGse();
} else {
setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)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 GSE:
return getGse();
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 GSE:
return isSetGse();
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 hasOwnerAccess_result)
return this.equals((hasOwnerAccess_result)that);
return false;
}
public boolean equals(hasOwnerAccess_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_gse = true && this.isSetGse();
boolean that_present_gse = true && that.isSetGse();
if (this_present_gse || that_present_gse) {
if (!(this_present_gse && that_present_gse))
return false;
if (!this.gse.equals(that.gse))
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 + ((isSetGse()) ? 131071 : 524287);
if (isSetGse())
hashCode = hashCode * 8191 + gse.hashCode();
hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
if (isSetAe())
hashCode = hashCode * 8191 + ae.hashCode();
return hashCode;
}
@Override
public int compareTo(hasOwnerAccess_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(isSetGse()).compareTo(other.isSetGse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
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("hasOwnerAccess_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("gse:");
if (this.gse == null) {
sb.append("null");
} else {
sb.append(this.gse);
}
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 hasOwnerAccess_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasOwnerAccess_resultStandardScheme getScheme() {
return new hasOwnerAccess_resultStandardScheme();
}
}
private static class hasOwnerAccess_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<hasOwnerAccess_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, hasOwnerAccess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.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: // GSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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, hasOwnerAccess_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.gse != null) {
oprot.writeFieldBegin(GSE_FIELD_DESC);
struct.gse.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 hasOwnerAccess_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public hasOwnerAccess_resultTupleScheme getScheme() {
return new hasOwnerAccess_resultTupleScheme();
}
}
private static class hasOwnerAccess_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<hasOwnerAccess_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, hasOwnerAccess_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.isSetGse()) {
optionals.set(1);
}
if (struct.isSetAe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetGse()) {
struct.gse.write(oprot);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, hasOwnerAccess_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.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
struct.gse.read(iprot);
struct.setGseIsSet(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();
}
}
}