http://git-wip-us.apache.org/repos/asf/airavata/blob/edfbbfe0/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 eb378eb..06570d1 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-06") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-07-07") public class Airavata { public interface Iface { @@ -2509,6 +2509,21 @@ public class Airavata { public List<org.apache.airavata.model.data.replica.DataProductModel> getChildDataProducts(org.apache.airavata.model.security.AuthzToken authzToken, String productUri) 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; + /** + * Group Manager and Data Sharing Related API methods + * + * + * @param authzToken + * @param resourceId + * @param resourceType + * @param userPermissionList + */ + public boolean shareResourceWithUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList) 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 revokeSharingOfResourceFromUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList) 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<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 interface AsyncIface { @@ -2795,6 +2810,12 @@ public class Airavata { public void getChildDataProducts(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void shareResourceWithUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void revokeSharingOfResourceFromUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + 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 static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -7971,6 +7992,120 @@ public class Airavata { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getChildDataProducts failed: unknown result"); } + public boolean shareResourceWithUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList) 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_shareResourceWithUsers(authzToken, resourceId, resourceType, userPermissionList); + return recv_shareResourceWithUsers(); + } + + public void send_shareResourceWithUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList) throws org.apache.thrift.TException + { + shareResourceWithUsers_args args = new shareResourceWithUsers_args(); + args.setAuthzToken(authzToken); + args.setResourceId(resourceId); + args.setResourceType(resourceType); + args.setUserPermissionList(userPermissionList); + sendBase("shareResourceWithUsers", args); + } + + public boolean recv_shareResourceWithUsers() 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 + { + shareResourceWithUsers_result result = new shareResourceWithUsers_result(); + receiveBase(result, "shareResourceWithUsers"); + 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, "shareResourceWithUsers failed: unknown result"); + } + + public boolean revokeSharingOfResourceFromUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList) 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_revokeSharingOfResourceFromUsers(authzToken, resourceId, resourceType, userPermissionList); + return recv_revokeSharingOfResourceFromUsers(); + } + + public void send_revokeSharingOfResourceFromUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList) throws org.apache.thrift.TException + { + revokeSharingOfResourceFromUsers_args args = new revokeSharingOfResourceFromUsers_args(); + args.setAuthzToken(authzToken); + args.setResourceId(resourceId); + args.setResourceType(resourceType); + args.setUserPermissionList(userPermissionList); + sendBase("revokeSharingOfResourceFromUsers", args); + } + + public boolean recv_revokeSharingOfResourceFromUsers() 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 + { + revokeSharingOfResourceFromUsers_result result = new revokeSharingOfResourceFromUsers_result(); + receiveBase(result, "revokeSharingOfResourceFromUsers"); + 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, "revokeSharingOfResourceFromUsers failed: unknown result"); + } + + 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 + { + send_getAllAccessibleUsers(authzToken, resourceId, resourceType, permissionType); + return recv_getAllAccessibleUsers(); + } + + public void send_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.thrift.TException + { + getAllAccessibleUsers_args args = new getAllAccessibleUsers_args(); + args.setAuthzToken(authzToken); + args.setResourceId(resourceId); + args.setResourceType(resourceType); + args.setPermissionType(permissionType); + sendBase("getAllAccessibleUsers", args); + } + + public List<String> recv_getAllAccessibleUsers() 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 + { + getAllAccessibleUsers_result result = new getAllAccessibleUsers_result(); + receiveBase(result, "getAllAccessibleUsers"); + 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, "getAllAccessibleUsers 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> { @@ -13212,6 +13347,129 @@ public class Airavata { } } + public void shareResourceWithUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + shareResourceWithUsers_call method_call = new shareResourceWithUsers_call(authzToken, resourceId, resourceType, userPermissionList, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class shareResourceWithUsers_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.security.AuthzToken authzToken; + private String resourceId; + private org.apache.airavata.model.group.ResourceType resourceType; + private Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList; + public shareResourceWithUsers_call(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList, 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.resourceId = resourceId; + this.resourceType = resourceType; + this.userPermissionList = userPermissionList; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareResourceWithUsers", org.apache.thrift.protocol.TMessageType.CALL, 0)); + shareResourceWithUsers_args args = new shareResourceWithUsers_args(); + args.setAuthzToken(authzToken); + args.setResourceId(resourceId); + args.setResourceType(resourceType); + args.setUserPermissionList(userPermissionList); + 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_shareResourceWithUsers(); + } + } + + public void revokeSharingOfResourceFromUsers(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + revokeSharingOfResourceFromUsers_call method_call = new revokeSharingOfResourceFromUsers_call(authzToken, resourceId, resourceType, userPermissionList, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class revokeSharingOfResourceFromUsers_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.security.AuthzToken authzToken; + private String resourceId; + private org.apache.airavata.model.group.ResourceType resourceType; + private Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList; + public revokeSharingOfResourceFromUsers_call(org.apache.airavata.model.security.AuthzToken authzToken, String resourceId, org.apache.airavata.model.group.ResourceType resourceType, Map<String,org.apache.airavata.model.group.ResourcePermissionType> userPermissionList, 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.resourceId = resourceId; + this.resourceType = resourceType; + this.userPermissionList = userPermissionList; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeSharingOfResourceFromUsers", org.apache.thrift.protocol.TMessageType.CALL, 0)); + revokeSharingOfResourceFromUsers_args args = new revokeSharingOfResourceFromUsers_args(); + args.setAuthzToken(authzToken); + args.setResourceId(resourceId); + args.setResourceType(resourceType); + args.setUserPermissionList(userPermissionList); + 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_revokeSharingOfResourceFromUsers(); + } + } + + 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 { + checkReady(); + getAllAccessibleUsers_call method_call = new getAllAccessibleUsers_call(authzToken, resourceId, resourceType, permissionType, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getAllAccessibleUsers_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.security.AuthzToken authzToken; + private String resourceId; + private org.apache.airavata.model.group.ResourceType resourceType; + private org.apache.airavata.model.group.ResourcePermissionType permissionType; + public getAllAccessibleUsers_call(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, 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.resourceId = resourceId; + this.resourceType = resourceType; + this.permissionType = permissionType; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllAccessibleUsers", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllAccessibleUsers_args args = new getAllAccessibleUsers_args(); + args.setAuthzToken(authzToken); + args.setResourceId(resourceId); + args.setResourceType(resourceType); + args.setPermissionType(permissionType); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<String> 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_getAllAccessibleUsers(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -13366,6 +13624,9 @@ public class Airavata { processMap.put("registerReplicaLocation", new registerReplicaLocation()); processMap.put("getParentDataProduct", new getParentDataProduct()); processMap.put("getChildDataProducts", new getChildDataProducts()); + processMap.put("shareResourceWithUsers", new shareResourceWithUsers()); + processMap.put("revokeSharingOfResourceFromUsers", new revokeSharingOfResourceFromUsers()); + processMap.put("getAllAccessibleUsers", new getAllAccessibleUsers()); return processMap; } @@ -17651,6 +17912,98 @@ public class Airavata { } } + public static class shareResourceWithUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shareResourceWithUsers_args> { + public shareResourceWithUsers() { + super("shareResourceWithUsers"); + } + + public shareResourceWithUsers_args getEmptyArgsInstance() { + return new shareResourceWithUsers_args(); + } + + protected boolean isOneway() { + return false; + } + + public shareResourceWithUsers_result getResult(I iface, shareResourceWithUsers_args args) throws org.apache.thrift.TException { + shareResourceWithUsers_result result = new shareResourceWithUsers_result(); + try { + result.success = iface.shareResourceWithUsers(args.authzToken, args.resourceId, args.resourceType, args.userPermissionList); + 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 revokeSharingOfResourceFromUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revokeSharingOfResourceFromUsers_args> { + public revokeSharingOfResourceFromUsers() { + super("revokeSharingOfResourceFromUsers"); + } + + public revokeSharingOfResourceFromUsers_args getEmptyArgsInstance() { + return new revokeSharingOfResourceFromUsers_args(); + } + + protected boolean isOneway() { + return false; + } + + public revokeSharingOfResourceFromUsers_result getResult(I iface, revokeSharingOfResourceFromUsers_args args) throws org.apache.thrift.TException { + revokeSharingOfResourceFromUsers_result result = new revokeSharingOfResourceFromUsers_result(); + try { + result.success = iface.revokeSharingOfResourceFromUsers(args.authzToken, args.resourceId, args.resourceType, args.userPermissionList); + 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 getAllAccessibleUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllAccessibleUsers_args> { + public getAllAccessibleUsers() { + super("getAllAccessibleUsers"); + } + + public getAllAccessibleUsers_args getEmptyArgsInstance() { + return new getAllAccessibleUsers_args(); + } + + protected boolean isOneway() { + return false; + } + + public getAllAccessibleUsers_result getResult(I iface, getAllAccessibleUsers_args args) throws org.apache.thrift.TException { + getAllAccessibleUsers_result result = new getAllAccessibleUsers_result(); + try { + result.success = iface.getAllAccessibleUsers(args.authzToken, args.resourceId, args.resourceType, args.permissionType); + } 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> { @@ -17805,6 +18158,9 @@ public class Airavata { processMap.put("registerReplicaLocation", new registerReplicaLocation()); processMap.put("getParentDataProduct", new getParentDataProduct()); processMap.put("getChildDataProducts", new getChildDataProducts()); + processMap.put("shareResourceWithUsers", new shareResourceWithUsers()); + processMap.put("revokeSharingOfResourceFromUsers", new revokeSharingOfResourceFromUsers()); + processMap.put("getAllAccessibleUsers", new getAllAccessibleUsers()); return processMap; } @@ -28012,395 +28368,242 @@ 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); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // AUTHZ_TOKEN - return AUTHZ_TOKEN; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new 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 static class shareResourceWithUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, shareResourceWithUsers_args, Boolean> { + public shareResourceWithUsers() { + super("shareResourceWithUsers"); } - public String getFieldName() { - return _fieldName; + public shareResourceWithUsers_args getEmptyArgsInstance() { + return new shareResourceWithUsers_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) { + shareResourceWithUsers_result result = new shareResourceWithUsers_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; + shareResourceWithUsers_result result = new shareResourceWithUsers_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, shareResourceWithUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.shareResourceWithUsers(args.authzToken, args.resourceId, args.resourceType, args.userPermissionList,resultHandler); } } - public Object getFieldValue(_Fields field) { - switch (field) { - case AUTHZ_TOKEN: - return getAuthzToken(); - + public static class revokeSharingOfResourceFromUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revokeSharingOfResourceFromUsers_args, Boolean> { + public revokeSharingOfResourceFromUsers() { + super("revokeSharingOfResourceFromUsers"); } - 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 revokeSharingOfResourceFromUsers_args getEmptyArgsInstance() { + return new revokeSharingOfResourceFromUsers_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) { + revokeSharingOfResourceFromUsers_result result = new revokeSharingOfResourceFromUsers_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; + revokeSharingOfResourceFromUsers_result result = new revokeSharingOfResourceFromUsers_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(); - } - - @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(); + public void start(I iface, revokeSharingOfResourceFromUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.revokeSharingOfResourceFromUsers(args.authzToken, args.resourceId, args.resourceType, args.userPermissionList,resultHandler); } } - 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 static class getAllAccessibleUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllAccessibleUsers_args, List<String>> { + public getAllAccessibleUsers() { + super("getAllAccessibleUsers"); } - } - 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 getAllAccessibleUsers_args getEmptyArgsInstance() { + return new getAllAccessibleUsers_args(); } - } - 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; + public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<List<String>>() { + public void onComplete(List<String> o) { + getAllAccessibleUsers_result result = new getAllAccessibleUsers_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; + getAllAccessibleUsers_result result = new getAllAccessibleUsers_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, getAllAccessibleUsers_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { + iface.getAllAccessibleUsers(args.authzToken, args.resourceId, args.resourceType, args.permissionType,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>(); @@ -28415,16 +28618,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; } @@ -78335,9 +78909,3950 @@ public class Airavata { @Override public String toString() { - StringBuilder sb = new StringBuilder("updateResourceScheduleing_result("); + StringBuilder sb = new StringBuilder("updateResourceScheduleing_result("); + boolean first = true; + + 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, 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 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() { + 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))); + tmpMap.put(_Fields.AIRAVATA_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataExperimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_args.class, metaDataMap); + } + + public validateExperiment_args() { + } + + public validateExperiment_args( + org.apache.airavata.model.security.AuthzToken authzToken, + String airavataExperimentId) + { + this(); + this.authzToken = authzToken; + this.airavataExperimentId = airavataExperimentId; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public validateExperiment_args(validateExperiment_args other) { + if (other.isSetAuthzToken()) { + this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + } + if (other.isSetAiravataExperimentId()) { + this.airavataExperimentId = other.airavataExperimentId; + } + } + + public validateExperiment_args deepCopy() { + return new validateExperiment_args(this); + } + + @Override + public void clear() { + this.authzToken = null; + this.airavataExperimentId = null; + } + + public org.apache.airavata.model.security.AuthzToken getAuthzToken() { + return this.authzToken; + } + + public validateExperiment_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 String getAiravataExperimentId() { + return this.airavataExperimentId; + } + + public validateExperiment_args setAiravataExperimentId(String airavataExperimentId) { + this.airavataExperimentId = airavataExperimentId; + return this; + } + + public void unsetAiravataExperimentId() { + this.airavataExperimentId = null; + } + + /** Returns true if field airavataExperimentId is set (has been assigned a value) and false otherwise */ + public boolean isSetAiravataExperimentId() { + return this.airavataExperimentId != null; + } + + public void setAiravataExperimentIdIsSet(boolean value) { + if (!value) { + this.airavataExperimentId = 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; + + case AIRAVATA_EXPERIMENT_ID: + if (value == null) { + unsetAiravataExperimentId(); + } else { + setAiravataExperimentId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AUTHZ_TOKEN: + return getAuthzToken(); + + case AIRAVATA_EXPERIMENT_ID: + return getAiravataExperimentId(); + + } + 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(); + case AIRAVATA_EXPERIMENT_ID: + return isSetAiravataExperimentId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof validateExperiment_args) + return this.equals((validateExperiment_args)that); + return false; + } + + public boolean equals(validateExperiment_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; + } + + boolean this_present_airavataExperimentId = true && this.isSetAiravataExperimentId(); + boolean that_present_airavataExperimentId = true && that.isSetAiravataExperimentId(); + if (this_present_airavataExperimentId || that_present_airavataExperimentId) { + if (!(this_present_airavataExperimentId && that_present_airavataExperimentId)) + return false; + if (!this.airavataExperimentId.equals(that.airavataExperimentId)) + 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); + + boolean present_airavataExperimentId = true && (isSetAiravataExperimentId()); + list.add(present_airavataExperimentId); + if (present_airavataExperimentId) + list.add(airavataExperimentId); + + return list.hashCode(); + } + + @Override + public int compareTo(validateExperiment_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; + } + } + lastComparison = Boolean.valueOf(isSetAiravataExperimentId()).compareTo(other.isSetAiravataExperimentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAiravataExperimentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataExperimentId, other.airavataExperimentId); + 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("validateExperiment_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("airavataExperimentId:"); + if (this.airavataExperimentId == null) { + sb.append("null"); + } else { + sb.append(this.airavataExperimentId); + } + 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 (airavataExperimentId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataExperimentId' 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 validateExperiment_argsStandardSchemeFactory implements SchemeFactory { + public validateExperiment_argsStandardScheme getScheme() { + return new validateExperiment_argsStandardScheme(); + } + } + + private static class validateExperiment_argsStandardScheme extends StandardScheme<validateExperiment_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_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: // AIRAVATA_EXPERIMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.airavataExperimentId = iprot.readString(); + struct.setAiravataExperimentIdIsSet(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, validateExperiment_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.airavataExperimentId != null) { + oprot.writeFieldBegin(AIRAVATA_EXPERIMENT_ID_FIELD_DESC); + oprot.writeString(struct.airavataExperimentId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class validateExperiment_argsTupleSchemeFactory implements SchemeFactory { + public validateExperiment_argsTupleScheme getScheme() { + return new validateExperiment_argsTupleScheme(); + } + } + + private static class validateExperiment_argsTupleScheme extends TupleScheme<validateExperiment_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.authzToken.write(oprot); + oprot.writeString(struct.airavataExperimentId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot,
<TRUNCATED>
