http://git-wip-us.apache.org/repos/asf/airavata/blob/02cbb8dc/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 29f1056..19dc169 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 @@ -2638,7 +2638,7 @@ public class Airavata { public boolean isWorkflowExistWithName(org.apache.airavata.model.security.AuthzToken authzToken, String workflowName) 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; /** - * API Methods related to data catalog + * API Methods related to replica catalog * * * @param authzToken @@ -2650,6 +2650,10 @@ public class Airavata { public String registerReplicaLocation(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.data.replica.DataReplicaLocationModel replicaLocationModel) 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.data.replica.DataProductModel getParentDataProduct(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; + + 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; + } public interface AsyncIface { @@ -2928,6 +2932,10 @@ public class Airavata { public void registerReplicaLocation(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.data.replica.DataReplicaLocationModel replicaLocationModel, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getParentDataProduct(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getChildDataProducts(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -7984,6 +7992,78 @@ public class Airavata { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerReplicaLocation failed: unknown result"); } + public org.apache.airavata.model.data.replica.DataProductModel getParentDataProduct(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 + { + send_getParentDataProduct(authzToken, productUri); + return recv_getParentDataProduct(); + } + + public void send_getParentDataProduct(org.apache.airavata.model.security.AuthzToken authzToken, String productUri) throws org.apache.thrift.TException + { + getParentDataProduct_args args = new getParentDataProduct_args(); + args.setAuthzToken(authzToken); + args.setProductUri(productUri); + sendBase("getParentDataProduct", args); + } + + public org.apache.airavata.model.data.replica.DataProductModel recv_getParentDataProduct() 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 + { + getParentDataProduct_result result = new getParentDataProduct_result(); + receiveBase(result, "getParentDataProduct"); + 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, "getParentDataProduct failed: unknown result"); + } + + 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 + { + send_getChildDataProducts(authzToken, productUri); + return recv_getChildDataProducts(); + } + + public void send_getChildDataProducts(org.apache.airavata.model.security.AuthzToken authzToken, String productUri) throws org.apache.thrift.TException + { + getChildDataProducts_args args = new getChildDataProducts_args(); + args.setAuthzToken(authzToken); + args.setProductUri(productUri); + sendBase("getChildDataProducts", args); + } + + public List<org.apache.airavata.model.data.replica.DataProductModel> recv_getChildDataProducts() 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 + { + getChildDataProducts_result result = new getChildDataProducts_result(); + receiveBase(result, "getChildDataProducts"); + 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, "getChildDataProducts 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> { @@ -13139,6 +13219,76 @@ public class Airavata { } } + public void getParentDataProduct(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getParentDataProduct_call method_call = new getParentDataProduct_call(authzToken, productUri, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getParentDataProduct_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.security.AuthzToken authzToken; + private String productUri; + public getParentDataProduct_call(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, 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.productUri = productUri; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getParentDataProduct", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getParentDataProduct_args args = new getParentDataProduct_args(); + args.setAuthzToken(authzToken); + args.setProductUri(productUri); + args.write(prot); + prot.writeMessageEnd(); + } + + public org.apache.airavata.model.data.replica.DataProductModel 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_getParentDataProduct(); + } + } + + public void getChildDataProducts(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getChildDataProducts_call method_call = new getChildDataProducts_call(authzToken, productUri, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getChildDataProducts_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.security.AuthzToken authzToken; + private String productUri; + public getChildDataProducts_call(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, 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.productUri = productUri; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getChildDataProducts", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getChildDataProducts_args args = new getChildDataProducts_args(); + args.setAuthzToken(authzToken); + args.setProductUri(productUri); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<org.apache.airavata.model.data.replica.DataProductModel> 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_getChildDataProducts(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -13289,6 +13439,8 @@ public class Airavata { processMap.put("registerDataProduct", new registerDataProduct()); processMap.put("getDataProduct", new getDataProduct()); processMap.put("registerReplicaLocation", new registerReplicaLocation()); + processMap.put("getParentDataProduct", new getParentDataProduct()); + processMap.put("getChildDataProducts", new getChildDataProducts()); return processMap; } @@ -17455,6 +17607,66 @@ public class Airavata { } } + public static class getParentDataProduct<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getParentDataProduct_args> { + public getParentDataProduct() { + super("getParentDataProduct"); + } + + public getParentDataProduct_args getEmptyArgsInstance() { + return new getParentDataProduct_args(); + } + + protected boolean isOneway() { + return false; + } + + public getParentDataProduct_result getResult(I iface, getParentDataProduct_args args) throws org.apache.thrift.TException { + getParentDataProduct_result result = new getParentDataProduct_result(); + try { + result.success = iface.getParentDataProduct(args.authzToken, args.productUri); + } 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 getChildDataProducts<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getChildDataProducts_args> { + public getChildDataProducts() { + super("getChildDataProducts"); + } + + public getChildDataProducts_args getEmptyArgsInstance() { + return new getChildDataProducts_args(); + } + + protected boolean isOneway() { + return false; + } + + public getChildDataProducts_result getResult(I iface, getChildDataProducts_args args) throws org.apache.thrift.TException { + getChildDataProducts_result result = new getChildDataProducts_result(); + try { + result.success = iface.getChildDataProducts(args.authzToken, args.productUri); + } 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> { @@ -17605,6 +17817,8 @@ public class Airavata { processMap.put("registerDataProduct", new registerDataProduct()); processMap.put("getDataProduct", new getDataProduct()); processMap.put("registerReplicaLocation", new registerReplicaLocation()); + processMap.put("getParentDataProduct", new getParentDataProduct()); + processMap.put("getChildDataProducts", new getChildDataProducts()); return processMap; } @@ -27531,395 +27745,168 @@ 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 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 static class getParentDataProduct<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getParentDataProduct_args, org.apache.airavata.model.data.replica.DataProductModel> { + public getParentDataProduct() { + super("getParentDataProduct"); } - } - - 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 getParentDataProduct_args getEmptyArgsInstance() { + return new getParentDataProduct_args(); } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AUTHZ_TOKEN: - return getAuthzToken(); + public AsyncMethodCallback<org.apache.airavata.model.data.replica.DataProductModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<org.apache.airavata.model.data.replica.DataProductModel>() { + public void onComplete(org.apache.airavata.model.data.replica.DataProductModel o) { + getParentDataProduct_result result = new getParentDataProduct_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; + getParentDataProduct_result result = new getParentDataProduct_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(); - } - - /** 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) + 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(); - } - } - - 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, getParentDataProduct_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.data.replica.DataProductModel> resultHandler) throws TException { + iface.getParentDataProduct(args.authzToken, args.productUri,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 getChildDataProducts<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getChildDataProducts_args, List<org.apache.airavata.model.data.replica.DataProductModel>> { + public getChildDataProducts() { + super("getChildDataProducts"); } - } - private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory { - public getAPIVersion_argsStandardScheme getScheme() { - return new getAPIVersion_argsStandardScheme(); + public getChildDataProducts_args getEmptyArgsInstance() { + return new getChildDataProducts_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.data.replica.DataProductModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<List<org.apache.airavata.model.data.replica.DataProductModel>>() { + public void onComplete(List<org.apache.airavata.model.data.replica.DataProductModel> o) { + getChildDataProducts_result result = new getChildDataProducts_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; + getChildDataProducts_result result = new getChildDataProducts_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, getChildDataProducts_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.data.replica.DataProductModel>> resultHandler) throws TException { + iface.getChildDataProducts(args.authzToken, args.productUri,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>(); @@ -27934,16 +27921,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; } @@ -78174,13 +78532,2719 @@ public class Airavata { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.ENF, new org.apache.thrift.meta_data.FieldMetaData("enf", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_result.class, metaDataMap); + } + + public validateExperiment_result() { + } + + public validateExperiment_result( + boolean success, + org.apache.airavata.model.error.InvalidRequestException ire, + org.apache.airavata.model.error.ExperimentNotFoundException enf, + org.apache.airavata.model.error.AiravataClientException ace, + org.apache.airavata.model.error.AiravataSystemException ase, + org.apache.airavata.model.error.AuthorizationException ae) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.ire = ire; + this.enf = enf; + this.ace = ace; + this.ase = ase; + this.ae = ae; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public validateExperiment_result(validateExperiment_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIre()) { + this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire); + } + if (other.isSetEnf()) { + this.enf = new org.apache.airavata.model.error.ExperimentNotFoundException(other.enf); + } + if (other.isSetAce()) { + this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace); + } + if (other.isSetAse()) { + this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase); + } + if (other.isSetAe()) { + this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae); + } + } + + public validateExperiment_result deepCopy() { + return new validateExperiment_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.ire = null; + this.enf = null; + this.ace = null; + this.ase = null; + this.ae = null; + } + + public boolean isSuccess() { + return this.success; + } + + public validateExperiment_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public org.apache.airavata.model.error.InvalidRequestException getIre() { + return this.ire; + } + + public validateExperiment_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) { + this.ire = ire; + return this; + } + + public void unsetIre() { + this.ire = null; + } + + /** Returns true if field ire is set (has been assigned a value) and false otherwise */ + public boolean isSetIre() { + return this.ire != null; + } + + public void setIreIsSet(boolean value) { + if (!value) { + this.ire = null; + } + } + + public org.apache.airavata.model.error.ExperimentNotFoundException getEnf() { + return this.enf; + } + + public validateExperiment_result setEnf(org.apache.airavata.model.error.ExperimentNotFoundException enf) { + this.enf = enf; + return this; + } + + public void unsetEnf() { + this.enf = null; + } + + /** Returns true if field enf is set (has been assigned a value) and false otherwise */ + public boolean isSetEnf() { + return this.enf != null; + } + + public void setEnfIsSet(boolean value) { + if (!value) { + this.enf = null; + } + } + + public org.apache.airavata.model.error.AiravataClientException getAce() { + return this.ace; + } + + public validateExperiment_result setAce(org.apache.airavata.model.error.AiravataClientException ace) { + this.ace = ace; + return this; + } + + public void unsetAce() { + this.ace = null; + } + + /** Returns true if field ace is set (has been assigned a value) and false otherwise */ + public boolean isSetAce() { + return this.ace != null; + } + + public void setAceIsSet(boolean value) { + if (!value) { + this.ace = null; + } + } + + public org.apache.airavata.model.error.AiravataSystemException getAse() { + return this.ase; + } + + public validateExperiment_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) { + this.ase = ase; + return this; + } + + public void unsetAse() { + this.ase = null; + } + + /** Returns true if field ase is set (has been assigned a value) and false otherwise */ + public boolean isSetAse() { + return this.ase != null; + } + + public void setAseIsSet(boolean value) { + if (!value) { + this.ase = null; + } + } + + public org.apache.airavata.model.error.AuthorizationException getAe() { + return this.ae; + } + + public validateExperiment_result setAe(org.apache.airavata.model.error.AuthorizationException ae) { + this.ae = ae; + return this; + } + + public void unsetAe() { + this.ae = null; + } + + /** Returns true if field ae is set (has been assigned a value) and false otherwise */ + public boolean isSetAe() { + return this.ae != null; + } + + public void setAeIsSet(boolean value) { + if (!value) { + this.ae = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IRE: + if (value == null) { + unsetIre(); + } else { + setIre((org.apache.airavata.model.error.InvalidRequestException)value); + } + break; + + case ENF: + if (value == null) { + unsetEnf(); + } else { + setEnf((org.apache.airavata.model.error.ExperimentNotFoundException)value); + } + break; + + case ACE: + if (value == null) { + unsetAce(); + } else { + setAce((org.apache.airavata.model.error.AiravataClientException)value); + } + break; + + case ASE: + if (value == null) { + unsetAse(); + } else { + setAse((org.apache.airavata.model.error.AiravataSystemException)value); + } + break; + + case AE: + if (value == null) { + unsetAe(); + } else { + setAe((org.apache.airavata.model.error.AuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case IRE: + return getIre(); + + case ENF: + return getEnf(); + + case ACE: + return getAce(); + + case ASE: + return getAse(); + + case AE: + return getAe(); + + } + 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 SUCCESS: + return isSetSuccess(); + case IRE: + return isSetIre(); + case ENF: + return isSetEnf(); + case ACE: + return isSetAce(); + case ASE: + return isSetAse(); + case AE: + return isSetAe(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof validateExperiment_result) + return this.equals((validateExperiment_result)that); + return false; + } + + public boolean equals(validateExperiment_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_ire = true && this.isSetIre(); + boolean that_present_ire = true && that.isSetIre(); + if (this_present_ire || that_present_ire) { + if (!(this_present_ire && that_present_ire)) + return false; + if (!this.ire.equals(that.ire)) + return false; + } + + boolean this_present_enf = true && this.isSetEnf(); + boolean that_present_enf = true && that.isSetEnf(); + if (this_present_enf || that_present_enf) { + if (!(this_present_enf && that_present_enf)) + return false; + if (!this.enf.equals(that.enf)) + return false; + } + + boolean this_present_ace = true && this.isSetAce(); + boolean that_present_ace = true && that.isSetAce(); + if (this_present_ace || that_present_ace) { + if (!(this_present_ace && that_present_ace)) + return false; + if (!this.ace.equals(that.ace)) + return false; + } + + boolean this_present_ase = true && this.isSetAse(); + boolean that_present_ase = true && that.isSetAse(); + if (this_present_ase || that_present_ase) { + if (!(this_present_ase && that_present_ase)) + return false; + if (!this.ase.equals(that.ase)) + return false; + } + + boolean this_present_ae = true && this.isSetAe(); + boolean that_present_ae = true && that.isSetAe(); + if (this_present_ae || that_present_ae) { + if (!(this_present_ae && that_present_ae)) + return false; + if (!this.ae.equals(that.ae)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_ire = true && (isSetIre()); + list.add(present_ire); + if (present_ire) + list.add(ire); + + boolean present_enf = true && (isSetEnf()); + list.add(present_enf); + if (present_enf) + list.add(enf); + + boolean present_ace = true && (isSetAce()); + list.add(present_ace); + if (present_ace) + list.add(ace); + + boolean present_ase = true && (isSetAse()); + list.add(present_ase); + if (present_ase) + list.add(ase); + + boolean present_ae = true && (isSetAe()); + list.add(present_ae); + if (present_ae) + list.add(ae); + + return list.hashCode(); + } + + @Override + public int compareTo(validateExperiment_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIre()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnf()).compareTo(other.isSetEnf()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnf()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enf, other.enf); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAce()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAse()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAe()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("ire:"); + if (this.ire == null) { + sb.append("null"); + } else { + sb.append(this.ire); + } + first = false; + if (!first) sb.append(", "); + sb.append("enf:"); + if (this.enf == null) { + sb.append("null"); + } else { + sb.append(this.enf); + } + first = false; + if (!first) sb.append(", "); + sb.append("ace:"); + if (this.ace == null) { + sb.append("null"); + } else { + sb.append(this.ace); + } + first = false; + if (!first) sb.append(", "); + sb.append("ase:"); + if (this.ase == null) { + sb.append("null"); + } else { + sb.append(this.ase); + } + first = false; + if (!first) sb.append(", "); + sb.append("ae:"); + if (this.ae == null) { + sb.append("null"); + } else { + sb.append(this.ae); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class validateExperiment_resultStandardSchemeFactory implements SchemeFactory { + public validateExperiment_resultStandardScheme getScheme() { + return new validateExperiment_resultStandardScheme(); + } + } + + private static class validateExperiment_resultStandardScheme extends StandardScheme<validateExperiment_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IRE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ire = new org.apache.airavata.model.error.InvalidRequestException(); + struct.ire.read(iprot); + struct.setIreIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ENF + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException(); + struct.enf.read(iprot); + struct.setEnfIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ACE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ace = new org.apache.airavata.model.error.AiravataClientException(); + struct.ace.read(iprot); + struct.setAceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ASE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ase = new org.apache.airavata.model.error.AiravataSystemException(); + struct.ase.read(iprot); + struct.setAseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // 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, validateExperiment_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.ire != null) { + oprot.writeFieldBegin(IRE_FIELD_DESC); + struct.ire.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.enf != null) { + oprot.writeFieldBegin(ENF_FIELD_DESC); + struct.enf.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ace != null) { + oprot.writeFieldBegin(ACE_FIELD_DESC); + struct.ace.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ase != null) { + oprot.writeFieldBegin(ASE_FIELD_DESC); + struct.ase.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ae != null) { + oprot.writeFieldBegin(AE_FIELD_DESC); + struct.ae.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class validateExperiment_resultTupleSchemeFactory implements SchemeFactory { + public validateExperiment_resultTupleScheme getScheme() { + return new validateExperiment_resultTupleScheme(); + } + } + + private static class validateExperiment_resultTupleScheme extends TupleScheme<validateExperiment_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIre()) { + optionals.set(1); + } + if (struct.isSetEnf()) { + optionals.set(2); + } + if (struct.isSetAce()) { + optionals.set(3); + } + if (struct.isSetAse()) { + optionals.set(4); + } + if (struct.isSetAe()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIre()) { + struct.ire.write(oprot); + } + if (struct.isSetEnf()) { + struct.enf.write(oprot); + } + if (struct.isSetAce()) { + struct.ace.write(oprot); + } + if (struct.isSetAse()) { + struct.ase.write(oprot); + } + if (struct.isSetAe()) { + struct.ae.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ire = new org.apache.airavata.model.error.InvalidRequestException(); + struct.ire.read(iprot); + struct.setIreIsSet(true); + } + if (incoming.get(2)) { + struct.enf = new org.apache.airavata.model.error.ExperimentNotFoundException(); + struct.enf.read(iprot); + struct.setEnfIsSet(true); + } + if (incoming.get(3)) { + struct.ace = new org.apache.airavata.model.error.AiravataClientException(); + struct.ace.read(iprot); + struct.setAceIsSet(true); + } + if (incoming.get(4)) { + struct.ase = new org.apache.airavata.model.error.AiravataSystemException(); + struct.ase.read(iprot); + struct.setAseIsSet(true); + } + if (incoming.get(5)) { + struct.ae = new org.apache.airavata.model.error.AuthorizationException(); + struct.ae.read(iprot); + struct.setAeIsSet(true); + } + } + } + + } + + public static class launchExperiment_args implements org.apache.thrift.TBase<launchExperiment_args, launchExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<launchExperiment_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchExperiment_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 org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new launchExperiment_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new launchExperiment_argsTupleSchemeFactory()); + } + + public org.apache.airavata.model.security.AuthzToken authzToken; // required + public String airavataExperimentId; // required + public String gatewayId; // 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"), + GATEWAY_ID((short)3, "gatewayId"); + + 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; + case 3: // GATEWAY_ID + return GATEWAY_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))); + tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", 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(launchExperiment_args.class, metaDataMap); + } + + public launchExperiment_args() { + } + + public launchExperiment_args( + org.apache.airavata.model.security.AuthzToken authzToken, + String airavataExperimentId, + String gatewayId) + { + this(); + this.authzToken = authzToken; + this.airavataExperimentId = airavataExperimentId; + this.gatewayId = gatewayId; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public launchExperiment_args(launchExperiment_args other) { + if (other.isSetAuthzToken()) { + this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); + } + if (other.isSetAiravataExperimentId()) { + this.airavataExperimentId = other.airavataExperimentId; + } + if (other.isSetGatewayId()) { + this.gatewayId = other.gatewayId; + } + } + + public launchExperiment_args deepCopy() { + return new launchExperiment_args(this); + } + + @Override + public void clear() { + this.authzToken = null; + this.airavataExperimentId = null; + this.gatewayId = null; + } + + public org.apache.airavata.model.security.AuthzToken getAuthzToken() { + return this.authzToken; + } + + public launchExperiment_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 launchExperiment_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 String getGatewayId() { + return this.gatewayId; + } + + public launchExperiment_args setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + return this; + } + + public void unsetGatewayId() { + this.gatewayId = null; + } + + /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ + public boolean isSetGatewayId() { + return this.gatewayId != null; + } + + public void setGatewayIdIsSet(boolean value) { + if (!value) { + this.gatewayId = 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; + + case GATEWAY_ID: + if (value == null) { + unsetGatewayId(); + } else { + setGatewayId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AUTHZ_TOKEN: + return getAuthzToken(); + + case AIRAVATA_EXPERIMENT_ID: + return getAiravataExperimentId(); + + case GATEWAY_ID: + return getGatewayId(); + + } + throw new IllegalStateException(
<TRUNCATED>
