From commits-return-18656-apmail-airavata-commits-archive=airavata.apache.org@airavata.apache.org Mon Dec 11 19:56:14 2017 Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32CAF17D0C for ; Mon, 11 Dec 2017 19:56:14 +0000 (UTC) Received: (qmail 27448 invoked by uid 500); 11 Dec 2017 19:56:14 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 27318 invoked by uid 500); 11 Dec 2017 19:56:14 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 27294 invoked by uid 99); 11 Dec 2017 19:56:13 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2017 19:56:13 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 68FE48205F; Mon, 11 Dec 2017 19:56:08 +0000 (UTC) Date: Mon, 11 Dec 2017 19:56:07 +0000 To: "commits@airavata.apache.org" Subject: [airavata] 02/13: Generating thrift stubs for group manager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: smarru@apache.org In-Reply-To: <151302216581.5718.9854151141807674870@gitbox.apache.org> References: <151302216581.5718.9854151141807674870@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: airavata X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Rev: 206abb82e8257a30d2428027a96f04c5d96ecd32 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20171211195610.68FE48205F@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. smarru pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/airavata.git commit 206abb82e8257a30d2428027a96f04c5d96ecd32 Author: Sachin Kariyattin AuthorDate: Sun Dec 3 18:05:48 2017 -0500 Generating thrift stubs for group manager --- .../groupmanager/cpi/GroupManagerService.java | 13470 +++++++++++++++++++ .../exception/GroupManagerServiceException.java | 381 + .../cpi/group_manager_cpiConstants.java | 32 + .../group-manager/group-manager-cpi.thrift | 82 + .../group_manager_cpi_errors.thrift} | 22 +- .../profile-service/profile-service-cpi.thrift | 1 + 6 files changed, 13976 insertions(+), 12 deletions(-) diff --git a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java new file mode 100644 index 0000000..22cd705 --- /dev/null +++ b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java @@ -0,0 +1,13470 @@ + /* + * 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 (1.0.0-dev) + * + * 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 (1.0.0-dev)") +public class GroupManagerService { + + public interface Iface { + + 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 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 transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, 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 domainId, java.lang.String groupId, java.util.List 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 domainId, java.lang.String groupId, java.util.List 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 domainId, 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 domainId, 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 { + + public void createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback 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 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 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 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> resultHandler) throws org.apache.thrift.TException; + + public void transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.util.List adminIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.util.List adminIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String adminId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + 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 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 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 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 transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, 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, domainId, groupId, newOwnerId); + return recv_transferGroupOwnership(); + } + + public void send_transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String newOwnerId) throws org.apache.thrift.TException + { + transferGroupOwnership_args args = new transferGroupOwnership_args(); + args.setAuthzToken(authzToken); + args.setDomainId(domainId); + 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 domainId, java.lang.String groupId, java.util.List adminIds) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException + { + send_addGroupAdmins(authzToken, domainId, groupId, adminIds); + return recv_addGroupAdmins(); + } + + public void send_addGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.util.List adminIds) throws org.apache.thrift.TException + { + addGroupAdmins_args args = new addGroupAdmins_args(); + args.setAuthzToken(authzToken); + args.setDomainId(domainId); + 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 domainId, java.lang.String groupId, java.util.List adminIds) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException + { + send_removeGroupAdmins(authzToken, domainId, groupId, adminIds); + return recv_removeGroupAdmins(); + } + + public void send_removeGroupAdmins(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.util.List adminIds) throws org.apache.thrift.TException + { + removeGroupAdmins_args args = new removeGroupAdmins_args(); + args.setAuthzToken(authzToken); + args.setDomainId(domainId); + 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 domainId, 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, domainId, groupId, adminId); + return recv_hasAdminAccess(); + } + + public void send_hasAdminAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String adminId) throws org.apache.thrift.TException + { + hasAdminAccess_args args = new hasAdminAccess_args(); + args.setAuthzToken(authzToken); + args.setDomainId(domainId); + 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 domainId, 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, domainId, groupId, ownerId); + return recv_hasOwnerAccess(); + } + + public void send_hasOwnerAccess(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String ownerId) throws org.apache.thrift.TException + { + hasOwnerAccess_args args = new hasOwnerAccess_args(); + args.setAuthzToken(authzToken); + args.setDomainId(domainId); + 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.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + 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 createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback 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 { + 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 resultHandler, org.apache.thrift.async.TAsyncClient client, 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 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 { + 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 resultHandler, org.apache.thrift.async.TAsyncClient client, 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 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 { + 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 resultHandler, org.apache.thrift.async.TAsyncClient client, 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 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 { + 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 resultHandler, org.apache.thrift.async.TAsyncClient client, 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 getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback> 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> { + 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> resultHandler, org.apache.thrift.async.TAsyncClient client, 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 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 transferGroupOwnership(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + transferGroupOwnership_call method_call = new transferGroupOwnership_call(authzToken, domainId, 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 { + private org.apache.airavata.model.security.AuthzToken authzToken; + private java.lang.String domainId; + private java.lang.String groupId; + private java.lang.String newOwnerId; + public transferGroupOwnership_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.authzToken = authzToken; + this.domainId = domainId; + 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.setDomainId(domainId); + 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 domainId, java.lang.String groupId, java.util.List adminIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + addGroupAdmins_call method_call = new addGroupAdmins_call(authzToken, domainId, 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 { + private org.apache.airavata.model.security.AuthzToken authzToken; + private java.lang.String domainId; + private java.lang.String groupId; + private java.util.List adminIds; + public addGroupAdmins_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.util.List adminIds, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.authzToken = authzToken; + this.domainId = domainId; + 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.setDomainId(domainId); + 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 domainId, java.lang.String groupId, java.util.List adminIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + removeGroupAdmins_call method_call = new removeGroupAdmins_call(authzToken, domainId, 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 { + private org.apache.airavata.model.security.AuthzToken authzToken; + private java.lang.String domainId; + private java.lang.String groupId; + private java.util.List adminIds; + public removeGroupAdmins_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.util.List adminIds, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.authzToken = authzToken; + this.domainId = domainId; + 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.setDomainId(domainId); + 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 domainId, java.lang.String groupId, java.lang.String adminId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + hasAdminAccess_call method_call = new hasAdminAccess_call(authzToken, domainId, 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 { + private org.apache.airavata.model.security.AuthzToken authzToken; + private java.lang.String domainId; + private java.lang.String groupId; + private java.lang.String adminId; + public hasAdminAccess_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String adminId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.authzToken = authzToken; + this.domainId = domainId; + 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.setDomainId(domainId); + 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 domainId, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + hasOwnerAccess_call method_call = new hasOwnerAccess_call(authzToken, domainId, 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 { + private org.apache.airavata.model.security.AuthzToken authzToken; + private java.lang.String domainId; + private java.lang.String groupId; + private java.lang.String ownerId; + public hasOwnerAccess_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String domainId, java.lang.String groupId, java.lang.String ownerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.authzToken = authzToken; + this.domainId = domainId; + 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.setDomainId(domainId); + 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 extends org.apache.thrift.TBaseProcessor 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>())); + } + + protected Processor(I iface, java.util.Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static java.util.Map> getProcessMap(java.util.Map> processMap) { + processMap.put("createGroup", new createGroup()); + processMap.put("updateGroup", new updateGroup()); + processMap.put("deleteGroup", new deleteGroup()); + processMap.put("getGroup", new getGroup()); + processMap.put("getAllGroupsUserBelongs", new getAllGroupsUserBelongs()); + 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 createGroup extends org.apache.thrift.ProcessFunction { + public createGroup() { + super("createGroup"); + } + + public createGroup_args getEmptyArgsInstance() { + return new createGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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 extends org.apache.thrift.ProcessFunction { + public updateGroup() { + super("updateGroup"); + } + + public updateGroup_args getEmptyArgsInstance() { + return new updateGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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 extends org.apache.thrift.ProcessFunction { + public deleteGroup() { + super("deleteGroup"); + } + + public deleteGroup_args getEmptyArgsInstance() { + return new deleteGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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 extends org.apache.thrift.ProcessFunction { + public getGroup() { + super("getGroup"); + } + + public getGroup_args getEmptyArgsInstance() { + return new getGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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 getAllGroupsUserBelongs extends org.apache.thrift.ProcessFunction { + public getAllGroupsUserBelongs() { + super("getAllGroupsUserBelongs"); + } + + public getAllGroupsUserBelongs_args getEmptyArgsInstance() { + return new getAllGroupsUserBelongs_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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 transferGroupOwnership extends org.apache.thrift.ProcessFunction { + public transferGroupOwnership() { + super("transferGroupOwnership"); + } + + public transferGroupOwnership_args getEmptyArgsInstance() { + return new transferGroupOwnership_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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.domainId, 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 extends org.apache.thrift.ProcessFunction { + public addGroupAdmins() { + super("addGroupAdmins"); + } + + public addGroupAdmins_args getEmptyArgsInstance() { + return new addGroupAdmins_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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.domainId, 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 extends org.apache.thrift.ProcessFunction { + public removeGroupAdmins() { + super("removeGroupAdmins"); + } + + public removeGroupAdmins_args getEmptyArgsInstance() { + return new removeGroupAdmins_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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.domainId, 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 extends org.apache.thrift.ProcessFunction { + public hasAdminAccess() { + super("hasAdminAccess"); + } + + public hasAdminAccess_args getEmptyArgsInstance() { + return new hasAdminAccess_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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.domainId, 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 extends org.apache.thrift.ProcessFunction { + public hasOwnerAccess() { + super("hasOwnerAccess"); + } + + public hasOwnerAccess_args getEmptyArgsInstance() { + return new hasOwnerAccess_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean handleRuntimeExceptions() { + 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.domainId, 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 extends org.apache.thrift.TBaseAsyncProcessor { + 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>())); + } + + protected AsyncProcessor(I iface, java.util.Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static java.util.Map> getProcessMap(java.util.Map> processMap) { + processMap.put("createGroup", new createGroup()); + processMap.put("updateGroup", new updateGroup()); + processMap.put("deleteGroup", new deleteGroup()); + processMap.put("getGroup", new getGroup()); + processMap.put("getAllGroupsUserBelongs", new getAllGroupsUserBelongs()); + 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 createGroup extends org.apache.thrift.AsyncProcessFunction { + public createGroup() { + super("createGroup"); + } + + public createGroup_args getEmptyArgsInstance() { + return new createGroup_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.createGroup(args.authzToken, args.groupModel,resultHandler); + } + } + + public static class updateGroup extends org.apache.thrift.AsyncProcessFunction { + public updateGroup() { + super("updateGroup"); + } + + public updateGroup_args getEmptyArgsInstance() { + return new updateGroup_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.updateGroup(args.authzToken, args.groupModel,resultHandler); + } + } + + public static class deleteGroup extends org.apache.thrift.AsyncProcessFunction { + public deleteGroup() { + super("deleteGroup"); + } + + public deleteGroup_args getEmptyArgsInstance() { + return new deleteGroup_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.deleteGroup(args.authzToken, args.groupId, args.ownerId,resultHandler); + } + } + + public static class getGroup extends org.apache.thrift.AsyncProcessFunction { + public getGroup() { + super("getGroup"); + } + + public getGroup_args getEmptyArgsInstance() { + return new getGroup_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.getGroup(args.authzToken, args.groupId,resultHandler); + } + } + + public static class getAllGroupsUserBelongs extends org.apache.thrift.AsyncProcessFunction> { + public getAllGroupsUserBelongs() { + super("getAllGroupsUserBelongs"); + } + + public getAllGroupsUserBelongs_args getEmptyArgsInstance() { + return new getAllGroupsUserBelongs_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback> 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>() { + public void onComplete(java.util.List 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> resultHandler) throws org.apache.thrift.TException { + iface.getAllGroupsUserBelongs(args.authzToken, args.userName,resultHandler); + } + } + + public static class transferGroupOwnership extends org.apache.thrift.AsyncProcessFunction { + public transferGroupOwnership() { + super("transferGroupOwnership"); + } + + public transferGroupOwnership_args getEmptyArgsInstance() { + return new transferGroupOwnership_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.transferGroupOwnership(args.authzToken, args.domainId, args.groupId, args.newOwnerId,resultHandler); + } + } + + public static class addGroupAdmins extends org.apache.thrift.AsyncProcessFunction { + public addGroupAdmins() { + super("addGroupAdmins"); + } + + public addGroupAdmins_args getEmptyArgsInstance() { + return new addGroupAdmins_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.addGroupAdmins(args.authzToken, args.domainId, args.groupId, args.adminIds,resultHandler); + } + } + + public static class removeGroupAdmins extends org.apache.thrift.AsyncProcessFunction { + public removeGroupAdmins() { + super("removeGroupAdmins"); + } + + public removeGroupAdmins_args getEmptyArgsInstance() { + return new removeGroupAdmins_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.removeGroupAdmins(args.authzToken, args.domainId, args.groupId, args.adminIds,resultHandler); + } + } + + public static class hasAdminAccess extends org.apache.thrift.AsyncProcessFunction { + public hasAdminAccess() { + super("hasAdminAccess"); + } + + public hasAdminAccess_args getEmptyArgsInstance() { + return new hasAdminAccess_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.hasAdminAccess(args.authzToken, args.domainId, args.groupId, args.adminId,resultHandler); + } + } + + public static class hasOwnerAccess extends org.apache.thrift.AsyncProcessFunction { + public hasOwnerAccess() { + super("hasOwnerAccess"); + } + + public hasOwnerAccess_args getEmptyArgsInstance() { + return new hasOwnerAccess_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback 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() { + 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 resultHandler) throws org.apache.thrift.TException { + iface.hasOwnerAccess(args.authzToken, args.domainId, args.groupId, args.ownerId,resultHandler); + } + } + + } + + public static class createGroup_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 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 byName = new java.util.HashMap(); + + 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 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 other. + */ + public getAllGroupsUserBelongs_result(getAllGroupsUserBelongs_result other) { + if (other.isSetSuccess()) { + java.util.List __this__success = new java.util.ArrayList(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 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(); + } + this.success.add(elem); + } + + public java.util.List getSuccess() { + return this.success; + } + + public getAllGroupsUserBelongs_result setSuccess(java.util.List 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)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 { + + 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 _list0 = iprot.readListBegin(); + struct.success = new java.util.ArrayList(_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, 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 _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 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 { + + @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 _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, 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 _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new java.util.ArrayList(_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 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, java.io.Serializable, Cloneable, Comparable { + 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 DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (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.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)4); + + 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 domainId; // 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"), + DOMAIN_ID((short)2, "domainId"), + GROUP_ID((short)3, "groupId"), + NEW_OWNER_ID((short)4, "newOwnerId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + 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: // DOMAIN_ID + return DOMAIN_ID; + case 3: // GROUP_ID + return GROUP_ID; + case 4: // 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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.REQUIRED, + 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))); + 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 domainId, + java.lang.String groupId, + java.lang.String newOwnerId) + { + this(); + this.authzToken = authzToken; + this.domainId = domainId; + this.groupId = groupId; + this.newOwnerId = newOwnerId; + } + + /** + * Performs a deep copy on other. + */ + public transferGroupOwnership_args(transferGroupOwnership_args other) { + if (other.isSetAuthzToken()) { + this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + } + if (other.isSetDomainId()) { + this.domainId = other.domainId; + } + 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.domainId = 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 getDomainId() { + return this.domainId; + } + + public transferGroupOwnership_args setDomainId(java.lang.String domainId) { + this.domainId = domainId; + return this; + } + + public void unsetDomainId() { + this.domainId = null; + } + + /** Returns true if field domainId is set (has been assigned a value) and false otherwise */ + public boolean isSetDomainId() { + return this.domainId != null; + } + + public void setDomainIdIsSet(boolean value) { + if (!value) { + this.domainId = 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 DOMAIN_ID: + if (value == null) { + unsetDomainId(); + } else { + setDomainId((java.lang.String)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 DOMAIN_ID: + return getDomainId(); + + 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 DOMAIN_ID: + return isSetDomainId(); + 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_domainId = true && this.isSetDomainId(); + boolean that_present_domainId = true && that.isSetDomainId(); + if (this_present_domainId || that_present_domainId) { + if (!(this_present_domainId && that_present_domainId)) + return false; + if (!this.domainId.equals(that.domainId)) + 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 + ((isSetDomainId()) ? 131071 : 524287); + if (isSetDomainId()) + hashCode = hashCode * 8191 + domainId.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(isSetDomainId()).compareTo(other.isSetDomainId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDomainId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId); + 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("domainId:"); + if (this.domainId == null) { + sb.append("null"); + } else { + sb.append(this.domainId); + } + 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 (domainId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' 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 { + + 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: // DOMAIN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.domainId = iprot.readString(); + struct.setDomainIdIsSet(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; + case 4: // 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.domainId != null) { + oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC); + oprot.writeString(struct.domainId); + 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 { + + @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.domainId); + 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.domainId = iprot.readString(); + struct.setDomainIdIsSet(true); + struct.groupId = iprot.readString(); + struct.setGroupIdIsSet(true); + struct.newOwnerId = iprot.readString(); + struct.setNewOwnerIdIsSet(true); + } + } + + private static 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (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.protocol.TField ADMIN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("adminIds", org.apache.thrift.protocol.TType.LIST, (short)4); + + 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 domainId; // required + public java.lang.String groupId; // required + public java.util.List 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"), + DOMAIN_ID((short)2, "domainId"), + GROUP_ID((short)3, "groupId"), + ADMIN_IDS((short)4, "adminIds"); + + private static final java.util.Map byName = new java.util.HashMap(); + + 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: // DOMAIN_ID + return DOMAIN_ID; + case 3: // GROUP_ID + return GROUP_ID; + case 4: // 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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.REQUIRED, + 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))); + 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 domainId, + java.lang.String groupId, + java.util.List adminIds) + { + this(); + this.authzToken = authzToken; + this.domainId = domainId; + this.groupId = groupId; + this.adminIds = adminIds; + } + + /** + * Performs a deep copy on other. + */ + public addGroupAdmins_args(addGroupAdmins_args other) { + if (other.isSetAuthzToken()) { + this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + } + if (other.isSetDomainId()) { + this.domainId = other.domainId; + } + if (other.isSetGroupId()) { + this.groupId = other.groupId; + } + if (other.isSetAdminIds()) { + java.util.List __this__adminIds = new java.util.ArrayList(other.adminIds); + this.adminIds = __this__adminIds; + } + } + + public addGroupAdmins_args deepCopy() { + return new addGroupAdmins_args(this); + } + + @Override + public void clear() { + this.authzToken = null; + this.domainId = 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 getDomainId() { + return this.domainId; + } + + public addGroupAdmins_args setDomainId(java.lang.String domainId) { + this.domainId = domainId; + return this; + } + + public void unsetDomainId() { + this.domainId = null; + } + + /** Returns true if field domainId is set (has been assigned a value) and false otherwise */ + public boolean isSetDomainId() { + return this.domainId != null; + } + + public void setDomainIdIsSet(boolean value) { + if (!value) { + this.domainId = 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 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(); + } + this.adminIds.add(elem); + } + + public java.util.List getAdminIds() { + return this.adminIds; + } + + public addGroupAdmins_args setAdminIds(java.util.List 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 DOMAIN_ID: + if (value == null) { + unsetDomainId(); + } else { + setDomainId((java.lang.String)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)value); + } + break; + + } + } + + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case AUTHZ_TOKEN: + return getAuthzToken(); + + case DOMAIN_ID: + return getDomainId(); + + 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 DOMAIN_ID: + return isSetDomainId(); + 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_domainId = true && this.isSetDomainId(); + boolean that_present_domainId = true && that.isSetDomainId(); + if (this_present_domainId || that_present_domainId) { + if (!(this_present_domainId && that_present_domainId)) + return false; + if (!this.domainId.equals(that.domainId)) + 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 + ((isSetDomainId()) ? 131071 : 524287); + if (isSetDomainId()) + hashCode = hashCode * 8191 + domainId.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(isSetDomainId()).compareTo(other.isSetDomainId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDomainId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId); + 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("domainId:"); + if (this.domainId == null) { + sb.append("null"); + } else { + sb.append(this.domainId); + } + 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 (domainId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' 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 { + + 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: // DOMAIN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.domainId = iprot.readString(); + struct.setDomainIdIsSet(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; + case 4: // ADMIN_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.adminIds = new java.util.ArrayList(_list8.size); + java.lang.String _elem9; + for (int _i10 = 0; _i10 < _list8.size; ++_i10) + { + _elem9 = iprot.readString(); + struct.adminIds.add(_elem9); + } + 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.domainId != null) { + oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC); + oprot.writeString(struct.domainId); + 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 _iter11 : struct.adminIds) + { + oprot.writeString(_iter11); + } + 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 { + + @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.domainId); + oprot.writeString(struct.groupId); + { + oprot.writeI32(struct.adminIds.size()); + for (java.lang.String _iter12 : struct.adminIds) + { + oprot.writeString(_iter12); + } + } + } + + @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.domainId = iprot.readString(); + struct.setDomainIdIsSet(true); + struct.groupId = iprot.readString(); + struct.setGroupIdIsSet(true); + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.adminIds = new java.util.ArrayList(_list13.size); + java.lang.String _elem14; + for (int _i15 = 0; _i15 < _list13.size; ++_i15) + { + _elem14 = iprot.readString(); + struct.adminIds.add(_elem14); + } + } + struct.setAdminIdsIsSet(true); + } + } + + private static 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, java.io.Serializable, Cloneable, Comparable { + 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 byName = new java.util.HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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 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, java.io.Serializable, Cloneable, Comparable { + 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 DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (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.protocol.TField ADMIN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("adminIds", org.apache.thrift.protocol.TType.LIST, (short)4); + + 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 domainId; // required + public java.lang.String groupId; // required + public java.util.List 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"), + DOMAIN_ID((short)2, "domainId"), + GROUP_ID((short)3, "groupId"), + ADMIN_IDS((short)4, "adminIds"); + + private static final java.util.Map byName = new java.util.HashMap(); + + 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: // DOMAIN_ID + return DOMAIN_ID; + case 3: // GROUP_ID + return GROUP_ID; + case 4: // 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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.REQUIRED, + 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))); + 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 domainId, + java.lang.String groupId, + java.util.List adminIds) + { + this(); + this.authzToken = authzToken; + this.domainId = domainId; + this.groupId = groupId; + this.adminIds = adminIds; + } + + /** + * Performs a deep copy on other. + */ + public removeGroupAdmins_args(removeGroupAdmins_args other) { + if (other.isSetAuthzToken()) { + this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + } + if (other.isSetDomainId()) { + this.domainId = other.domainId; + } + if (other.isSetGroupId()) { + this.groupId = other.groupId; + } + if (other.isSetAdminIds()) { + java.util.List __this__adminIds = new java.util.ArrayList(other.adminIds); + this.adminIds = __this__adminIds; + } + } + + public removeGroupAdmins_args deepCopy() { + return new removeGroupAdmins_args(this); + } + + @Override + public void clear() { + this.authzToken = null; + this.domainId = 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 getDomainId() { + return this.domainId; + } + + public removeGroupAdmins_args setDomainId(java.lang.String domainId) { + this.domainId = domainId; + return this; + } + + public void unsetDomainId() { + this.domainId = null; + } + + /** Returns true if field domainId is set (has been assigned a value) and false otherwise */ + public boolean isSetDomainId() { + return this.domainId != null; + } + + public void setDomainIdIsSet(boolean value) { + if (!value) { + this.domainId = 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 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(); + } + this.adminIds.add(elem); + } + + public java.util.List getAdminIds() { + return this.adminIds; + } + + public removeGroupAdmins_args setAdminIds(java.util.List 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; + } ... 4050 lines suppressed ... -- To stop receiving notification emails like this one, please contact "commits@airavata.apache.org" .