http://git-wip-us.apache.org/repos/asf/airavata/blob/171ee0c2/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java index 06570d1..932b9f6 100644 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java +++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-07-07") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-07-11") public class Airavata { public interface Iface { @@ -2524,6 +2524,16 @@ public class Airavata { public List<String> getAllAccessibleUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, org.apache.airavata.model.group.ResourcePermissionType permissionType) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException; + public boolean createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException; + + public boolean deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, String groupId, String ownerId, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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, String groupId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException; + + public List<org.apache.airavata.model.group.GroupModel> getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException; + } public interface AsyncIface { @@ -2816,6 +2826,16 @@ public class Airavata { public void getAllAccessibleUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, org.apache.airavata.model.group.ResourcePermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback 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, String groupId, String ownerId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getGroup(org.apache.airavata.model.security.AuthzToken authzToken, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -8106,6 +8126,189 @@ public class Airavata { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllAccessibleUsers failed: unknown result"); } + public boolean createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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 boolean recv_createGroup() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.ire != null) { + throw result.ire; + } + if (result.ace != null) { + throw result.ace; + } + if (result.ase != null) { + throw result.ase; + } + 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.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.ire != null) { + throw result.ire; + } + if (result.ace != null) { + throw result.ace; + } + if (result.ase != null) { + throw result.ase; + } + 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, String groupId, String ownerId, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException + { + send_deleteGroup(authzToken, groupId, ownerId, gatewayId); + return recv_deleteGroup(); + } + + public void send_deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, String groupId, String ownerId, String gatewayId) throws org.apache.thrift.TException + { + deleteGroup_args args = new deleteGroup_args(); + args.setAuthzToken(authzToken); + args.setGroupId(groupId); + args.setOwnerId(ownerId); + args.setGatewayId(gatewayId); + sendBase("deleteGroup", args); + } + + public boolean recv_deleteGroup() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.ire != null) { + throw result.ire; + } + if (result.ace != null) { + throw result.ace; + } + if (result.ase != null) { + throw result.ase; + } + 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, String groupId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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, 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.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.ire != null) { + throw result.ire; + } + if (result.ace != null) { + throw result.ace; + } + if (result.ase != null) { + throw result.ase; + } + if (result.ae != null) { + throw result.ae; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroup failed: unknown result"); + } + + public List<org.apache.airavata.model.group.GroupModel> getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException + { + send_getAllGroupsUserBelongs(authzToken, userName, gatewayId); + return recv_getAllGroupsUserBelongs(); + } + + public void send_getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) throws org.apache.thrift.TException + { + getAllGroupsUserBelongs_args args = new getAllGroupsUserBelongs_args(); + args.setAuthzToken(authzToken); + args.setUserName(userName); + args.setGatewayId(gatewayId); + sendBase("getAllGroupsUserBelongs", args); + } + + public List<org.apache.airavata.model.group.GroupModel> recv_getAllGroupsUserBelongs() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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.ire != null) { + throw result.ire; + } + if (result.ace != null) { + throw result.ace; + } + if (result.ase != null) { + throw result.ase; + } + if (result.ae != null) { + throw result.ae; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGroupsUserBelongs failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { @@ -13470,6 +13673,190 @@ public class Airavata { } } + 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 boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_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 boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_updateGroup(); + } + } + + public void deleteGroup(org.apache.airavata.model.security.AuthzToken authzToken, String groupId, String ownerId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteGroup_call method_call = new deleteGroup_call(authzToken, groupId, ownerId, gatewayId, 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 String groupId; + private String ownerId; + private String gatewayId; + public deleteGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, String groupId, String ownerId, String gatewayId, 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; + this.gatewayId = gatewayId; + } + + 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.setGatewayId(gatewayId); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deleteGroup(); + } + } + + public void getGroup(org.apache.airavata.model.security.AuthzToken authzToken, 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 String groupId; + public getGroup_call(org.apache.airavata.model.security.AuthzToken authzToken, 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.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getGroup(); + } + } + + public void getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getAllGroupsUserBelongs_call method_call = new getAllGroupsUserBelongs_call(authzToken, userName, gatewayId, 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 String userName; + private String gatewayId; + public getAllGroupsUserBelongs_call(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, 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; + this.gatewayId = gatewayId; + } + + 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.setGatewayId(gatewayId); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<org.apache.airavata.model.group.GroupModel> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getAllGroupsUserBelongs(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -13627,6 +14014,11 @@ public class Airavata { processMap.put("shareResourceWithUsers", new shareResourceWithUsers()); processMap.put("revokeSharingOfResourceFromUsers", new revokeSharingOfResourceFromUsers()); processMap.put("getAllAccessibleUsers", new getAllAccessibleUsers()); + 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()); return processMap; } @@ -18004,6 +18396,159 @@ public class Airavata { } } + public static class createGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createGroup_args> { + public createGroup() { + super("createGroup"); + } + + public createGroup_args getEmptyArgsInstance() { + return new createGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + public createGroup_result getResult(I iface, createGroup_args args) throws org.apache.thrift.TException { + createGroup_result result = new createGroup_result(); + try { + result.success = iface.createGroup(args.authzToken, args.groupModel); + result.setSuccessIsSet(true); + } catch (org.apache.airavata.model.error.InvalidRequestException ire) { + result.ire = ire; + } catch (org.apache.airavata.model.error.AiravataClientException ace) { + result.ace = ace; + } catch (org.apache.airavata.model.error.AiravataSystemException ase) { + result.ase = ase; + } catch (org.apache.airavata.model.error.AuthorizationException ae) { + result.ae = ae; + } + return result; + } + } + + public static class updateGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateGroup_args> { + public updateGroup() { + super("updateGroup"); + } + + public updateGroup_args getEmptyArgsInstance() { + return new updateGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + public updateGroup_result getResult(I iface, updateGroup_args args) throws org.apache.thrift.TException { + updateGroup_result result = new updateGroup_result(); + try { + result.success = iface.updateGroup(args.authzToken, args.groupModel); + result.setSuccessIsSet(true); + } catch (org.apache.airavata.model.error.InvalidRequestException ire) { + result.ire = ire; + } catch (org.apache.airavata.model.error.AiravataClientException ace) { + result.ace = ace; + } catch (org.apache.airavata.model.error.AiravataSystemException ase) { + result.ase = ase; + } catch (org.apache.airavata.model.error.AuthorizationException ae) { + result.ae = ae; + } + return result; + } + } + + public static class deleteGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteGroup_args> { + public deleteGroup() { + super("deleteGroup"); + } + + public deleteGroup_args getEmptyArgsInstance() { + return new deleteGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + public deleteGroup_result getResult(I iface, deleteGroup_args args) throws org.apache.thrift.TException { + deleteGroup_result result = new deleteGroup_result(); + try { + result.success = iface.deleteGroup(args.authzToken, args.groupId, args.ownerId, args.gatewayId); + result.setSuccessIsSet(true); + } catch (org.apache.airavata.model.error.InvalidRequestException ire) { + result.ire = ire; + } catch (org.apache.airavata.model.error.AiravataClientException ace) { + result.ace = ace; + } catch (org.apache.airavata.model.error.AiravataSystemException ase) { + result.ase = ase; + } catch (org.apache.airavata.model.error.AuthorizationException ae) { + result.ae = ae; + } + return result; + } + } + + public static class getGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGroup_args> { + public getGroup() { + super("getGroup"); + } + + public getGroup_args getEmptyArgsInstance() { + return new getGroup_args(); + } + + protected boolean isOneway() { + return false; + } + + public getGroup_result getResult(I iface, getGroup_args args) throws org.apache.thrift.TException { + getGroup_result result = new getGroup_result(); + try { + result.success = iface.getGroup(args.authzToken, args.groupId); + } catch (org.apache.airavata.model.error.InvalidRequestException ire) { + result.ire = ire; + } catch (org.apache.airavata.model.error.AiravataClientException ace) { + result.ace = ace; + } catch (org.apache.airavata.model.error.AiravataSystemException ase) { + result.ase = ase; + } catch (org.apache.airavata.model.error.AuthorizationException ae) { + result.ae = ae; + } + return result; + } + } + + public static class getAllGroupsUserBelongs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGroupsUserBelongs_args> { + public getAllGroupsUserBelongs() { + super("getAllGroupsUserBelongs"); + } + + public getAllGroupsUserBelongs_args getEmptyArgsInstance() { + return new getAllGroupsUserBelongs_args(); + } + + protected boolean isOneway() { + return false; + } + + public getAllGroupsUserBelongs_result getResult(I iface, getAllGroupsUserBelongs_args args) throws org.apache.thrift.TException { + getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_result(); + try { + result.success = iface.getAllGroupsUserBelongs(args.authzToken, args.userName, args.gatewayId); + } catch (org.apache.airavata.model.error.InvalidRequestException ire) { + result.ire = ire; + } catch (org.apache.airavata.model.error.AiravataClientException ace) { + result.ace = ace; + } catch (org.apache.airavata.model.error.AiravataSystemException ase) { + result.ase = ase; + } catch (org.apache.airavata.model.error.AuthorizationException ae) { + result.ae = ae; + } + return result; + } + } + } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { @@ -18161,6 +18706,11 @@ public class Airavata { processMap.put("shareResourceWithUsers", new shareResourceWithUsers()); processMap.put("revokeSharingOfResourceFromUsers", new revokeSharingOfResourceFromUsers()); processMap.put("getAllAccessibleUsers", new getAllAccessibleUsers()); + 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()); return processMap; } @@ -28586,395 +29136,387 @@ public class Airavata { } } - } - - public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args"); - - private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getAPIVersion_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAPIVersion_argsTupleSchemeFactory()); - } - - public org.apache.airavata.model.security.AuthzToken authzToken; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - AUTHZ_TOKEN((short)1, "authzToken"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } + public static class createGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createGroup_args, Boolean> { + public createGroup() { + super("createGroup"); } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // AUTHZ_TOKEN - return AUTHZ_TOKEN; - default: - return null; - } + public createGroup_args getEmptyArgsInstance() { + return new createGroup_args(); } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + createGroup_result result = new createGroup_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + createGroup_result result = new createGroup_result(); + if (e instanceof org.apache.airavata.model.error.InvalidRequestException) { + result.ire = (org.apache.airavata.model.error.InvalidRequestException) e; + result.setIreIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataClientException) { + result.ace = (org.apache.airavata.model.error.AiravataClientException) e; + result.setAceIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) { + result.ase = (org.apache.airavata.model.error.AiravataSystemException) e; + result.setAseIsSet(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 + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); + protected boolean isOneway() { + return false; } - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public void start(I iface, createGroup_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.createGroup(args.authzToken, args.groupModel,resultHandler); } + } - public short getThriftFieldId() { - return _thriftId; + public static class updateGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGroup_args, Boolean> { + public updateGroup() { + super("updateGroup"); } - public String getFieldName() { - return _fieldName; + public updateGroup_args getEmptyArgsInstance() { + return new updateGroup_args(); } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap); - } - - public getAPIVersion_args() { - } - - public getAPIVersion_args( - org.apache.airavata.model.security.AuthzToken authzToken) - { - this(); - this.authzToken = authzToken; - } - /** - * Performs a deep copy on <i>other</i>. - */ - public getAPIVersion_args(getAPIVersion_args other) { - if (other.isSetAuthzToken()) { - this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(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); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + updateGroup_result result = new updateGroup_result(); + if (e instanceof org.apache.airavata.model.error.InvalidRequestException) { + result.ire = (org.apache.airavata.model.error.InvalidRequestException) e; + result.setIreIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataClientException) { + result.ace = (org.apache.airavata.model.error.AiravataClientException) e; + result.setAceIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) { + result.ase = (org.apache.airavata.model.error.AiravataSystemException) e; + result.setAseIsSet(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 + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; } - } - - public getAPIVersion_args deepCopy() { - return new getAPIVersion_args(this); - } - - @Override - public void clear() { - this.authzToken = null; - } - - public org.apache.airavata.model.security.AuthzToken getAuthzToken() { - return this.authzToken; - } - - public getAPIVersion_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; + protected boolean isOneway() { + return false; } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case AUTHZ_TOKEN: - if (value == null) { - unsetAuthzToken(); - } else { - setAuthzToken((org.apache.airavata.model.security.AuthzToken)value); - } - break; + public void start(I iface, updateGroup_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.updateGroup(args.authzToken, args.groupModel,resultHandler); } } - public Object getFieldValue(_Fields field) { - switch (field) { - case AUTHZ_TOKEN: - return getAuthzToken(); - + public static class deleteGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGroup_args, Boolean> { + public deleteGroup() { + super("deleteGroup"); } - throw new IllegalStateException(); - } - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); + public deleteGroup_args getEmptyArgsInstance() { + return new deleteGroup_args(); } - switch (field) { - case AUTHZ_TOKEN: - return isSetAuthzToken(); + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(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); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteGroup_result result = new deleteGroup_result(); + if (e instanceof org.apache.airavata.model.error.InvalidRequestException) { + result.ire = (org.apache.airavata.model.error.InvalidRequestException) e; + result.setIreIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataClientException) { + result.ace = (org.apache.airavata.model.error.AiravataClientException) e; + result.setAceIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) { + result.ase = (org.apache.airavata.model.error.AiravataSystemException) e; + result.setAseIsSet(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 + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getAPIVersion_args) - return this.equals((getAPIVersion_args)that); - return false; - } - public boolean equals(getAPIVersion_args that) { - if (that == null) + protected boolean isOneway() { return false; - - boolean this_present_authzToken = true && this.isSetAuthzToken(); - boolean that_present_authzToken = true && that.isSetAuthzToken(); - if (this_present_authzToken || that_present_authzToken) { - if (!(this_present_authzToken && that_present_authzToken)) - return false; - if (!this.authzToken.equals(that.authzToken)) - return false; } - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_authzToken = true && (isSetAuthzToken()); - list.add(present_authzToken); - if (present_authzToken) - list.add(authzToken); - - return list.hashCode(); + public void start(I iface, deleteGroup_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.deleteGroup(args.authzToken, args.groupId, args.ownerId, args.gatewayId,resultHandler); + } } - @Override - public int compareTo(getAPIVersion_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); + public static class getGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroup_args, org.apache.airavata.model.group.GroupModel> { + public getGroup() { + super("getGroup"); } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken()); - if (lastComparison != 0) { - return lastComparison; + public getGroup_args getEmptyArgsInstance() { + return new getGroup_args(); } - if (isSetAuthzToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getAPIVersion_args("); - boolean first = true; - - sb.append("authzToken:"); - if (this.authzToken == null) { - sb.append("null"); - } else { - sb.append(this.authzToken); + public AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<org.apache.airavata.model.group.GroupModel>() { + public void onComplete(org.apache.airavata.model.group.GroupModel o) { + getGroup_result result = new getGroup_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getGroup_result result = new getGroup_result(); + if (e instanceof org.apache.airavata.model.error.InvalidRequestException) { + result.ire = (org.apache.airavata.model.error.InvalidRequestException) e; + result.setIreIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataClientException) { + result.ace = (org.apache.airavata.model.error.AiravataClientException) e; + result.setAceIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) { + result.ase = (org.apache.airavata.model.error.AiravataSystemException) e; + result.setAseIsSet(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 + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; } - first = false; - sb.append(")"); - return sb.toString(); - } - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (authzToken == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (authzToken != null) { - authzToken.validate(); + protected boolean isOneway() { + return false; } - } - 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); + public void start(I iface, getGroup_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.group.GroupModel> resultHandler) throws TException { + iface.getGroup(args.authzToken, args.groupId,resultHandler); } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + public static class getAllGroupsUserBelongs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGroupsUserBelongs_args, List<org.apache.airavata.model.group.GroupModel>> { + public getAllGroupsUserBelongs() { + super("getAllGroupsUserBelongs"); } - } - private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory { - public getAPIVersion_argsStandardScheme getScheme() { - return new getAPIVersion_argsStandardScheme(); + public getAllGroupsUserBelongs_args getEmptyArgsInstance() { + return new getAllGroupsUserBelongs_args(); } - } - private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; + public AsyncMethodCallback<List<org.apache.airavata.model.group.GroupModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<List<org.apache.airavata.model.group.GroupModel>>() { + public void onComplete(List<org.apache.airavata.model.group.GroupModel> o) { + getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); } - switch (schemeField.id) { - case 1: // AUTHZ_TOKEN - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.authzToken = new org.apache.airavata.model.security.AuthzToken(); - struct.authzToken.read(iprot); - struct.setAuthzTokenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getAllGroupsUserBelongs_result result = new getAllGroupsUserBelongs_result(); + if (e instanceof org.apache.airavata.model.error.InvalidRequestException) { + result.ire = (org.apache.airavata.model.error.InvalidRequestException) e; + result.setIreIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataClientException) { + result.ace = (org.apache.airavata.model.error.AiravataClientException) e; + result.setAceIsSet(true); + msg = result; + } + else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) { + result.ase = (org.apache.airavata.model.error.AiravataSystemException) e; + result.setAseIsSet(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 + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.authzToken != null) { - oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC); - struct.authzToken.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory { - public getAPIVersion_argsTupleScheme getScheme() { - return new getAPIVersion_argsTupleScheme(); + }; } - } - private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - struct.authzToken.write(oprot); + protected boolean isOneway() { + return false; } - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.authzToken = new org.apache.airavata.model.security.AuthzToken(); - struct.authzToken.read(iprot); - struct.setAuthzTokenIsSet(true); + public void start(I iface, getAllGroupsUserBelongs_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.group.GroupModel>> resultHandler) throws TException { + iface.getAllGroupsUserBelongs(args.authzToken, args.userName, args.gatewayId,resultHandler); } } } - public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result"); + public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args"); - private static final org.apache.thrift.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 IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3); - 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)4); + 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAPIVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAPIVersion_argsTupleSchemeFactory()); } - public String success; // required - public org.apache.airavata.model.error.InvalidRequestException ire; // required - public org.apache.airavata.model.error.AiravataClientException ace; // required - public org.apache.airavata.model.error.AiravataSystemException ase; // required - public org.apache.airavata.model.error.AuthorizationException ae; // required + public org.apache.airavata.model.security.AuthzToken authzToken; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IRE((short)1, "ire"), - ACE((short)2, "ace"), - ASE((short)3, "ase"), - AE((short)4, "ae"); + AUTHZ_TOKEN((short)1, "authzToken"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -28989,16 +29531,387 @@ public class Airavata { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IRE - return IRE; - case 2: // ACE - return ACE; - case 3: // ASE - return ASE; - case 4: // AE - return AE; + case 1: // AUTHZ_TOKEN + return AUTHZ_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap); + } + + public getAPIVersion_args() { + } + + public getAPIVersion_args( + org.apache.airavata.model.security.AuthzToken authzToken) + { + this(); + this.authzToken = authzToken; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getAPIVersion_args(getAPIVersion_args other) { + if (other.isSetAuthzToken()) { + this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + } + } + + public getAPIVersion_args deepCopy() { + return new getAPIVersion_args(this); + } + + @Override + public void clear() { + this.authzToken = null; + } + + public org.apache.airavata.model.security.AuthzToken getAuthzToken() { + return this.authzToken; + } + + public getAPIVersion_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) { + this.authzToken = authzToken; + return this; + } + + public void unsetAuthzToken() { + this.authzToken = null; + } + + /** Returns true if field authzToken is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthzToken() { + return this.authzToken != null; + } + + public void setAuthzTokenIsSet(boolean value) { + if (!value) { + this.authzToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AUTHZ_TOKEN: + if (value == null) { + unsetAuthzToken(); + } else { + setAuthzToken((org.apache.airavata.model.security.AuthzToken)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AUTHZ_TOKEN: + return getAuthzToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case AUTHZ_TOKEN: + return isSetAuthzToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAPIVersion_args) + return this.equals((getAPIVersion_args)that); + return false; + } + + public boolean equals(getAPIVersion_args that) { + if (that == null) + return false; + + boolean this_present_authzToken = true && this.isSetAuthzToken(); + boolean that_present_authzToken = true && that.isSetAuthzToken(); + if (this_present_authzToken || that_present_authzToken) { + if (!(this_present_authzToken && that_present_authzToken)) + return false; + if (!this.authzToken.equals(that.authzToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_authzToken = true && (isSetAuthzToken()); + list.add(present_authzToken); + if (present_authzToken) + list.add(authzToken); + + return list.hashCode(); + } + + @Override + public int compareTo(getAPIVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthzToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAPIVersion_args("); + boolean first = true; + + sb.append("authzToken:"); + if (this.authzToken == null) { + sb.append("null"); + } else { + sb.append(this.authzToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (authzToken == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (authzToken != null) { + authzToken.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory { + public getAPIVersion_argsStandardScheme getScheme() { + return new getAPIVersion_argsStandardScheme(); + } + } + + private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // AUTHZ_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authzToken = new org.apache.airavata.model.security.AuthzToken(); + struct.authzToken.read(iprot); + struct.setAuthzTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.authzToken != null) { + oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC); + struct.authzToken.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory { + public getAPIVersion_argsTupleScheme getScheme() { + return new getAPIVersion_argsTupleScheme(); + } + } + + private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.authzToken.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.authzToken = new org.apache.airavata.model.security.AuthzToken(); + struct.authzToken.read(iprot); + struct.setAuthzTokenIsSet(true); + } + } + + } + + public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3); + 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)4); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory()); + } + + public String success; // required + public org.apache.airavata.model.error.InvalidRequestException ire; // required + public org.apache.airavata.model.error.AiravataClientException ace; // required + public org.apache.airavata.model.error.AiravataSystemException ase; // 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"), + IRE((short)1, "ire"), + ACE((short)2, "ace"), + ASE((short)3, "ase"), + AE((short)4, "ae"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IRE + return IRE; + case 2: // ACE + return ACE; + case 3: // ASE + return ASE; + case 4: // AE + return AE; default: return null; } @@ -78944,15 +79857,6747 @@ public class Airavata { } } - private static class updateResourceScheduleing_resultStandardSchemeFactory implements SchemeFactory { - public updateResourceScheduleing_resultStandardScheme getScheme() { - return new updateResourceScheduleing_resultStandardScheme(); + private static class updateResourceScheduleing_resultStandardSchemeFactory implements SchemeFactory { + public updateResourceScheduleing_resultStandardScheme getScheme() { + return new updateResourceScheduleing_resultStandardScheme(); + } + } + + private static class updateResourceScheduleing_resultStandardScheme extends StandardScheme<updateResourceScheduleing_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateResourceScheduleing_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // 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, updateResourceScheduleing_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.ae != null) { + oprot.writeFieldBegin(AE_FIELD_DESC); + struct.ae.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateResourceScheduleing_resultTupleSchemeFactory implements SchemeFactory { + public updateResourceScheduleing_resultTupleScheme getScheme() { + return new updateResourceScheduleing_resultTupleScheme(); + } + } + + private static class updateResourceScheduleing_resultTupleScheme extends TupleScheme<updateResourceScheduleing_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateResourceScheduleing_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAe()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetAe()) { + struct.ae.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateResourceScheduleing_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.ae = new org.apache.airavata.model.error.AuthorizationException(); + struct.ae.read(iprot); + struct.setAeIsSet(true); + } + } + } + + } + + public static class validateExperiment_args implements org.apache.thrift.TBase<validateExperiment_args, validateExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateExperiment_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateExperiment_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 AIRAVATA_EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataExperimentId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new validateExperiment_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new validateExperiment_argsTupleSchemeFactory()); + } + + public org.apache.airavata.model.security.AuthzToken authzToken; // required + public String airavataExperimentId; // 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"), + AIRAVATA_EXPERIMENT_ID((short)2, "airavataExperimentId"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // AUTHZ_TOKEN + return AUTHZ_TOKEN; + case 2: // AIRAVATA_EXPERIMENT_ID + return AIRAVATA_EXPERIMENT_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 IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + retur
<TRUNCATED>
