You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/10/07 20:52:37 UTC
[10/31] airavata git commit: correcting the registry code,
testing not yet complete
http://git-wip-us.apache.org/repos/asf/airavata/blob/8469effc/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java b/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
index ecd0a0b..d649aeb 100644
--- a/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
+++ b/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
@@ -50,7 +50,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-10-01")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
public class RegistryService {
public interface Iface {
@@ -2231,6 +2231,39 @@ public class RegistryService {
/**
*
+ * Fetch all User Compute Resource Preferences of a registered user resource profile.
+ *
+ * @param userId
+ *
+ * @param gatewayID
+ * The identifier for the gateway profile to be requested
+ *
+ * @return computeResourcePreference
+ * Returns the ComputeResourcePreference object.
+ *
+ *
+ * @param userId
+ * @param gatewayID
+ */
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getAllUserComputeResourcePreferences(String userId, String gatewayID) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException;
+
+ /**
+ * Fetch all User Storage Resource Preferences of a registered user resource profile.
+ *
+ * @param gatewayID
+ * The identifier for the gateway profile to be requested
+ *
+ * @return StoragePreference
+ * Returns the StoragePreference object.
+ *
+ *
+ * @param userId
+ * @param gatewayID
+ */
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getAllUserStoragePreferences(String userId, String gatewayID) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException;
+
+ /**
+ *
* Fetch all user resource Profiles registered
*
* @return userResourceProfile
@@ -2627,6 +2660,10 @@ public class RegistryService {
public void getUserStoragePreference(String userId, String gatewayID, String userStorageResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getAllUserComputeResourcePreferences(String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getAllUserStoragePreferences(String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void getAllUserResourceProfiles(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void updateUserComputeResourcePreference(String userId, String gatewayID, String userComputeResourceId, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference userComputeResourcePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -6018,6 +6055,60 @@ public class RegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserStoragePreference failed: unknown result");
}
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getAllUserComputeResourcePreferences(String userId, String gatewayID) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException
+ {
+ send_getAllUserComputeResourcePreferences(userId, gatewayID);
+ return recv_getAllUserComputeResourcePreferences();
+ }
+
+ public void send_getAllUserComputeResourcePreferences(String userId, String gatewayID) throws org.apache.thrift.TException
+ {
+ getAllUserComputeResourcePreferences_args args = new getAllUserComputeResourcePreferences_args();
+ args.setUserId(userId);
+ args.setGatewayID(gatewayID);
+ sendBase("getAllUserComputeResourcePreferences", args);
+ }
+
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> recv_getAllUserComputeResourcePreferences() throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException
+ {
+ getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
+ receiveBase(result, "getAllUserComputeResourcePreferences");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.rse != null) {
+ throw result.rse;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserComputeResourcePreferences failed: unknown result");
+ }
+
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getAllUserStoragePreferences(String userId, String gatewayID) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException
+ {
+ send_getAllUserStoragePreferences(userId, gatewayID);
+ return recv_getAllUserStoragePreferences();
+ }
+
+ public void send_getAllUserStoragePreferences(String userId, String gatewayID) throws org.apache.thrift.TException
+ {
+ getAllUserStoragePreferences_args args = new getAllUserStoragePreferences_args();
+ args.setUserId(userId);
+ args.setGatewayID(gatewayID);
+ sendBase("getAllUserStoragePreferences", args);
+ }
+
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> recv_getAllUserStoragePreferences() throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException
+ {
+ getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
+ receiveBase(result, "getAllUserStoragePreferences");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.rse != null) {
+ throw result.rse;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserStoragePreferences failed: unknown result");
+ }
+
public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getAllUserResourceProfiles() throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException
{
send_getAllUserResourceProfiles();
@@ -10774,6 +10865,76 @@ public class RegistryService {
}
}
+ public void getAllUserComputeResourcePreferences(String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getAllUserComputeResourcePreferences_call method_call = new getAllUserComputeResourcePreferences_call(userId, gatewayID, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAllUserComputeResourcePreferences_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ private String gatewayID;
+ public getAllUserComputeResourcePreferences_call(String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userId = userId;
+ this.gatewayID = gatewayID;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUserComputeResourcePreferences", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAllUserComputeResourcePreferences_args args = new getAllUserComputeResourcePreferences_args();
+ args.setUserId(userId);
+ args.setGatewayID(gatewayID);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResult() throws org.apache.airavata.registry.api.exception.RegistryServiceException, 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_getAllUserComputeResourcePreferences();
+ }
+ }
+
+ public void getAllUserStoragePreferences(String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getAllUserStoragePreferences_call method_call = new getAllUserStoragePreferences_call(userId, gatewayID, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAllUserStoragePreferences_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ private String gatewayID;
+ public getAllUserStoragePreferences_call(String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userId = userId;
+ this.gatewayID = gatewayID;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUserStoragePreferences", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAllUserStoragePreferences_args args = new getAllUserStoragePreferences_args();
+ args.setUserId(userId);
+ args.setGatewayID(gatewayID);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResult() throws org.apache.airavata.registry.api.exception.RegistryServiceException, 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_getAllUserStoragePreferences();
+ }
+ }
+
public void getAllUserResourceProfiles(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllUserResourceProfiles_call method_call = new getAllUserResourceProfiles_call(resultHandler, this, ___protocolFactory, ___transport);
@@ -11489,6 +11650,8 @@ public class RegistryService {
processMap.put("addUserStoragePreference", new addUserStoragePreference());
processMap.put("getUserComputeResourcePreference", new getUserComputeResourcePreference());
processMap.put("getUserStoragePreference", new getUserStoragePreference());
+ processMap.put("getAllUserComputeResourcePreferences", new getAllUserComputeResourcePreferences());
+ processMap.put("getAllUserStoragePreferences", new getAllUserStoragePreferences());
processMap.put("getAllUserResourceProfiles", new getAllUserResourceProfiles());
processMap.put("updateUserComputeResourcePreference", new updateUserComputeResourcePreference());
processMap.put("updateUserStoragePreference", new updateUserStoragePreference());
@@ -14556,6 +14719,54 @@ public class RegistryService {
}
}
+ public static class getAllUserComputeResourcePreferences<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserComputeResourcePreferences_args> {
+ public getAllUserComputeResourcePreferences() {
+ super("getAllUserComputeResourcePreferences");
+ }
+
+ public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
+ return new getAllUserComputeResourcePreferences_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAllUserComputeResourcePreferences_result getResult(I iface, getAllUserComputeResourcePreferences_args args) throws org.apache.thrift.TException {
+ getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
+ try {
+ result.success = iface.getAllUserComputeResourcePreferences(args.userId, args.gatewayID);
+ } catch (org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ result.rse = rse;
+ }
+ return result;
+ }
+ }
+
+ public static class getAllUserStoragePreferences<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserStoragePreferences_args> {
+ public getAllUserStoragePreferences() {
+ super("getAllUserStoragePreferences");
+ }
+
+ public getAllUserStoragePreferences_args getEmptyArgsInstance() {
+ return new getAllUserStoragePreferences_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAllUserStoragePreferences_result getResult(I iface, getAllUserStoragePreferences_args args) throws org.apache.thrift.TException {
+ getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
+ try {
+ result.success = iface.getAllUserStoragePreferences(args.userId, args.gatewayID);
+ } catch (org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ result.rse = rse;
+ }
+ return result;
+ }
+ }
+
public static class getAllUserResourceProfiles<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserResourceProfiles_args> {
public getAllUserResourceProfiles() {
super("getAllUserResourceProfiles");
@@ -15107,6 +15318,8 @@ public class RegistryService {
processMap.put("addUserStoragePreference", new addUserStoragePreference());
processMap.put("getUserComputeResourcePreference", new getUserComputeResourcePreference());
processMap.put("getUserStoragePreference", new getUserStoragePreference());
+ processMap.put("getAllUserComputeResourcePreferences", new getAllUserComputeResourcePreferences());
+ processMap.put("getAllUserStoragePreferences", new getAllUserStoragePreferences());
processMap.put("getAllUserResourceProfiles", new getAllUserResourceProfiles());
processMap.put("updateUserComputeResourcePreference", new updateUserComputeResourcePreference());
processMap.put("updateUserStoragePreference", new updateUserStoragePreference());
@@ -22295,20 +22508,20 @@ public class RegistryService {
}
}
- public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
- public getAllUserResourceProfiles() {
- super("getAllUserResourceProfiles");
+ public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
+ public getAllUserComputeResourcePreferences() {
+ super("getAllUserComputeResourcePreferences");
}
- public getAllUserResourceProfiles_args getEmptyArgsInstance() {
- return new getAllUserResourceProfiles_args();
+ public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
+ return new getAllUserComputeResourcePreferences_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() {
- public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
- getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
+ getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22321,7 +22534,7 @@ public class RegistryService {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
+ getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -22347,27 +22560,26 @@ public class RegistryService {
return false;
}
- public void start(I iface, getAllUserResourceProfiles_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> resultHandler) throws TException {
- iface.getAllUserResourceProfiles(resultHandler);
+ public void start(I iface, getAllUserComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws TException {
+ iface.getAllUserComputeResourcePreferences(args.userId, args.gatewayID,resultHandler);
}
}
- public static class updateUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserComputeResourcePreference_args, Boolean> {
- public updateUserComputeResourcePreference() {
- super("updateUserComputeResourcePreference");
+ public static class getAllUserStoragePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserStoragePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> {
+ public getAllUserStoragePreferences() {
+ super("getAllUserStoragePreferences");
}
- public updateUserComputeResourcePreference_args getEmptyArgsInstance() {
- return new updateUserComputeResourcePreference_args();
+ public getAllUserStoragePreferences_args getEmptyArgsInstance() {
+ return new getAllUserStoragePreferences_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> o) {
+ getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22379,7 +22591,7 @@ public class RegistryService {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
+ getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -22405,27 +22617,26 @@ public class RegistryService {
return false;
}
- public void start(I iface, updateUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateUserComputeResourcePreference(args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
+ public void start(I iface, getAllUserStoragePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> resultHandler) throws TException {
+ iface.getAllUserStoragePreferences(args.userId, args.gatewayID,resultHandler);
}
}
- public static class updateUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserStoragePreference_args, Boolean> {
- public updateUserStoragePreference() {
- super("updateUserStoragePreference");
+ public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
+ public getAllUserResourceProfiles() {
+ super("getAllUserResourceProfiles");
}
- public updateUserStoragePreference_args getEmptyArgsInstance() {
- return new updateUserStoragePreference_args();
+ public getAllUserResourceProfiles_args getEmptyArgsInstance() {
+ return new getAllUserResourceProfiles_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateUserStoragePreference_result result = new updateUserStoragePreference_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
+ getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22437,7 +22648,7 @@ public class RegistryService {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateUserStoragePreference_result result = new updateUserStoragePreference_result();
+ getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -22463,25 +22674,25 @@ public class RegistryService {
return false;
}
- public void start(I iface, updateUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateUserStoragePreference(args.userId, args.gatewayID, args.userStorageId, args.userStoragePreference,resultHandler);
+ public void start(I iface, getAllUserResourceProfiles_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> resultHandler) throws TException {
+ iface.getAllUserResourceProfiles(resultHandler);
}
}
- public static class deleteUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserComputeResourcePreference_args, Boolean> {
- public deleteUserComputeResourcePreference() {
- super("deleteUserComputeResourcePreference");
+ public static class updateUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserComputeResourcePreference_args, Boolean> {
+ public updateUserComputeResourcePreference() {
+ super("updateUserComputeResourcePreference");
}
- public deleteUserComputeResourcePreference_args getEmptyArgsInstance() {
- return new deleteUserComputeResourcePreference_args();
+ public updateUserComputeResourcePreference_args getEmptyArgsInstance() {
+ return new updateUserComputeResourcePreference_args();
}
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) {
- deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+ updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -22495,7 +22706,7 @@ public class RegistryService {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+ updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -22521,25 +22732,25 @@ public class RegistryService {
return false;
}
- public void start(I iface, deleteUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteUserComputeResourcePreference(args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+ public void start(I iface, updateUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateUserComputeResourcePreference(args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
}
}
- public static class deleteUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserStoragePreference_args, Boolean> {
- public deleteUserStoragePreference() {
- super("deleteUserStoragePreference");
+ public static class updateUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserStoragePreference_args, Boolean> {
+ public updateUserStoragePreference() {
+ super("updateUserStoragePreference");
}
- public deleteUserStoragePreference_args getEmptyArgsInstance() {
- return new deleteUserStoragePreference_args();
+ public updateUserStoragePreference_args getEmptyArgsInstance() {
+ return new updateUserStoragePreference_args();
}
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) {
- deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+ updateUserStoragePreference_result result = new updateUserStoragePreference_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -22553,7 +22764,7 @@ public class RegistryService {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+ updateUserStoragePreference_result result = new updateUserStoragePreference_result();
if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -22579,26 +22790,27 @@ public class RegistryService {
return false;
}
- public void start(I iface, deleteUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteUserStoragePreference(args.userId, args.gatewayID, args.userStorageId,resultHandler);
+ public void start(I iface, updateUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateUserStoragePreference(args.userId, args.gatewayID, args.userStorageId, args.userStoragePreference,resultHandler);
}
}
- public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
- public getAllWorkflows() {
- super("getAllWorkflows");
+ public static class deleteUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserComputeResourcePreference_args, Boolean> {
+ public deleteUserComputeResourcePreference() {
+ super("deleteUserComputeResourcePreference");
}
- public getAllWorkflows_args getEmptyArgsInstance() {
- return new getAllWorkflows_args();
+ public deleteUserComputeResourcePreference_args getEmptyArgsInstance() {
+ return new deleteUserComputeResourcePreference_args();
}
- public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> 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) {
- getAllWorkflows_result result = new getAllWorkflows_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22610,7 +22822,122 @@ public class RegistryService {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllWorkflows_result result = new getAllWorkflows_result();
+ deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+ if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
+ result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
+ result.setRseIsSet(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();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteUserComputeResourcePreference(args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+ }
+ }
+
+ public static class deleteUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserStoragePreference_args, Boolean> {
+ public deleteUserStoragePreference() {
+ super("deleteUserStoragePreference");
+ }
+
+ public deleteUserStoragePreference_args getEmptyArgsInstance() {
+ return new deleteUserStoragePreference_args();
+ }
+
+ 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) {
+ deleteUserStoragePreference_result result = new deleteUserStoragePreference_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;
+ deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+ if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
+ result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
+ result.setRseIsSet(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();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteUserStoragePreference(args.userId, args.gatewayID, args.userStorageId,resultHandler);
+ }
+ }
+
+ public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
+ public getAllWorkflows() {
+ super("getAllWorkflows");
+ }
+
+ public getAllWorkflows_args getEmptyArgsInstance() {
+ return new getAllWorkflows_args();
+ }
+
+ 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) {
+ getAllWorkflows_result result = new getAllWorkflows_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;
+ getAllWorkflows_result result = new getAllWorkflows_result();
if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -125099,96 +125426,2190 @@ public class RegistryService {
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.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile.class))));
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile.class))));
+ tmpMap.put(_Fields.RSE, new org.apache.thrift.meta_data.FieldMetaData("rse", 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(getAllGatewayResourceProfiles_result.class, metaDataMap);
+ }
+
+ public getAllGatewayResourceProfiles_result() {
+ }
+
+ public getAllGatewayResourceProfiles_result(
+ List<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> success,
+ org.apache.airavata.registry.api.exception.RegistryServiceException rse)
+ {
+ this();
+ this.success = success;
+ this.rse = rse;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAllGatewayResourceProfiles_result(getAllGatewayResourceProfiles_result other) {
+ if (other.isSetSuccess()) {
+ List<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> __this__success = new ArrayList<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>(other.success.size());
+ for (org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile other_element : other.success) {
+ __this__success.add(new org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetRse()) {
+ this.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException(other.rse);
+ }
+ }
+
+ public getAllGatewayResourceProfiles_result deepCopy() {
+ return new getAllGatewayResourceProfiles_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.rse = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> getSuccess() {
+ return this.success;
+ }
+
+ public getAllGatewayResourceProfiles_result setSuccess(List<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public org.apache.airavata.registry.api.exception.RegistryServiceException getRse() {
+ return this.rse;
+ }
+
+ public getAllGatewayResourceProfiles_result setRse(org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ this.rse = rse;
+ return this;
+ }
+
+ public void unsetRse() {
+ this.rse = null;
+ }
+
+ /** Returns true if field rse is set (has been assigned a value) and false otherwise */
+ public boolean isSetRse() {
+ return this.rse != null;
+ }
+
+ public void setRseIsSet(boolean value) {
+ if (!value) {
+ this.rse = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>)value);
+ }
+ break;
+
+ case RSE:
+ if (value == null) {
+ unsetRse();
+ } else {
+ setRse((org.apache.airavata.registry.api.exception.RegistryServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case RSE:
+ return getRse();
+
+ }
+ 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 RSE:
+ return isSetRse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAllGatewayResourceProfiles_result)
+ return this.equals((getAllGatewayResourceProfiles_result)that);
+ return false;
+ }
+
+ public boolean equals(getAllGatewayResourceProfiles_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_rse = true && this.isSetRse();
+ boolean that_present_rse = true && that.isSetRse();
+ if (this_present_rse || that_present_rse) {
+ if (!(this_present_rse && that_present_rse))
+ return false;
+ if (!this.rse.equals(that.rse))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_rse = true && (isSetRse());
+ list.add(present_rse);
+ if (present_rse)
+ list.add(rse);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getAllGatewayResourceProfiles_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(isSetRse()).compareTo(other.isSetRse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rse, other.rse);
+ 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("getAllGatewayResourceProfiles_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("rse:");
+ if (this.rse == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rse);
+ }
+ 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 getAllGatewayResourceProfiles_resultStandardSchemeFactory implements SchemeFactory {
+ public getAllGatewayResourceProfiles_resultStandardScheme getScheme() {
+ return new getAllGatewayResourceProfiles_resultStandardScheme();
+ }
+ }
+
+ private static class getAllGatewayResourceProfiles_resultStandardScheme extends StandardScheme<getAllGatewayResourceProfiles_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewayResourceProfiles_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list258 = iprot.readListBegin();
+ struct.success = new ArrayList<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>(_list258.size);
+ org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile _elem259;
+ for (int _i260 = 0; _i260 < _list258.size; ++_i260)
+ {
+ _elem259 = new org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile();
+ _elem259.read(iprot);
+ struct.success.add(_elem259);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // RSE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException();
+ struct.rse.read(iprot);
+ struct.setRseIsSet(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, getAllGatewayResourceProfiles_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+ for (org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile _iter261 : struct.success)
+ {
+ _iter261.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.rse != null) {
+ oprot.writeFieldBegin(RSE_FIELD_DESC);
+ struct.rse.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAllGatewayResourceProfiles_resultTupleSchemeFactory implements SchemeFactory {
+ public getAllGatewayResourceProfiles_resultTupleScheme getScheme() {
+ return new getAllGatewayResourceProfiles_resultTupleScheme();
+ }
+ }
+
+ private static class getAllGatewayResourceProfiles_resultTupleScheme extends TupleScheme<getAllGatewayResourceProfiles_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewayResourceProfiles_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRse()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile _iter262 : struct.success)
+ {
+ _iter262.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetRse()) {
+ struct.rse.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewayResourceProfiles_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>(_list263.size);
+ org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile _elem264;
+ for (int _i265 = 0; _i265 < _list263.size; ++_i265)
+ {
+ _elem264 = new org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile();
+ _elem264.read(iprot);
+ struct.success.add(_elem264);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException();
+ struct.rse.read(iprot);
+ struct.setRseIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateGatewayComputeResourcePreference_args implements org.apache.thrift.TBase<updateGatewayComputeResourcePreference_args, updateGatewayComputeResourcePreference_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateGatewayComputeResourcePreference_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGatewayComputeResourcePreference_args");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_PREFERENCE_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourcePreference", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateGatewayComputeResourcePreference_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateGatewayComputeResourcePreference_argsTupleSchemeFactory());
+ }
+
+ public String gatewayID; // required
+ public String computeResourceId; // required
+ public org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference; // 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 {
+ GATEWAY_ID((short)1, "gatewayID"),
+ COMPUTE_RESOURCE_ID((short)2, "computeResourceId"),
+ COMPUTE_RESOURCE_PREFERENCE((short)3, "computeResourcePreference");
+
+ 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: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 2: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
+ case 3: // COMPUTE_RESOURCE_PREFERENCE
+ return COMPUTE_RESOURCE_PREFERENCE;
+ 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.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)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_PREFERENCE, new org.apache.thrift.meta_data.FieldMetaData("computeResourcePreference", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGatewayComputeResourcePreference_args.class, metaDataMap);
+ }
+
+ public updateGatewayComputeResourcePreference_args() {
+ }
+
+ public updateGatewayComputeResourcePreference_args(
+ String gatewayID,
+ String computeResourceId,
+ org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference)
+ {
+ this();
+ this.gatewayID = gatewayID;
+ this.computeResourceId = computeResourceId;
+ this.computeResourcePreference = computeResourcePreference;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateGatewayComputeResourcePreference_args(updateGatewayComputeResourcePreference_args other) {
+ if (other.isSetGatewayID()) {
+ this.gatewayID = other.gatewayID;
+ }
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
+ }
+ if (other.isSetComputeResourcePreference()) {
+ this.computeResourcePreference = new org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference(other.computeResourcePreference);
+ }
+ }
+
+ public updateGatewayComputeResourcePreference_args deepCopy() {
+ return new updateGatewayComputeResourcePreference_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.gatewayID = null;
+ this.computeResourceId = null;
+ this.computeResourcePreference = null;
+ }
+
+ public String getGatewayID() {
+ return this.gatewayID;
+ }
+
+ public updateGatewayComputeResourcePreference_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 String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public updateGatewayComputeResourcePreference_args setComputeResourceId(String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ return this;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
+ }
+ }
+
+ public org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference getComputeResourcePreference() {
+ return this.computeResourcePreference;
+ }
+
+ public updateGatewayComputeResourcePreference_args setComputeResourcePreference(org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference) {
+ this.computeResourcePreference = computeResourcePreference;
+ return this;
+ }
+
+ public void unsetComputeResourcePreference() {
+ this.computeResourcePreference = null;
+ }
+
+ /** Returns true if field computeResourcePreference is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourcePreference() {
+ return this.computeResourcePreference != null;
+ }
+
+ public void setComputeResourcePreferenceIsSet(boolean value) {
+ if (!value) {
+ this.computeResourcePreference = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GATEWAY_ID:
+ if (value == null) {
+ unsetGatewayID();
+ } else {
+ setGatewayID((String)value);
+ }
+ break;
+
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((String)value);
+ }
+ break;
+
+ case COMPUTE_RESOURCE_PREFERENCE:
+ if (value == null) {
+ unsetComputeResourcePreference();
+ } else {
+ setComputeResourcePreference((org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GATEWAY_ID:
+ return getGatewayID();
+
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
+
+ case COMPUTE_RESOURCE_PREFERENCE:
+ return getComputeResourcePreference();
+
+ }
+ 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 GATEWAY_ID:
+ return isSetGatewayID();
+ case COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
+ case COMPUTE_RESOURCE_PREFERENCE:
+ return isSetComputeResourcePreference();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateGatewayComputeResourcePreference_args)
+ return this.equals((updateGatewayComputeResourcePreference_args)that);
+ return false;
+ }
+
+ public boolean equals(updateGatewayComputeResourcePreference_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_gatewayID = true && this.isSetGatewayID();
+ boolean that_present_gatewayID = true && that.isSetGatewayID();
+ if (this_present_gatewayID || that_present_gatewayID) {
+ if (!(this_present_gatewayID && that_present_gatewayID))
+ return false;
+ if (!this.gatewayID.equals(that.gatewayID))
+ return false;
+ }
+
+ boolean this_present_computeResourceId = true && this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true && that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId && that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
+ return false;
+ }
+
+ boolean this_present_computeResourcePreference = true && this.isSetComputeResourcePreference();
+ boolean that_present_computeResourcePreference = true && that.isSetComputeResourcePreference();
+ if (this_present_computeResourcePreference || that_present_computeResourcePreference) {
+ if (!(this_present_computeResourcePreference && that_present_computeResourcePreference))
+ return false;
+ if (!this.computeResourcePreference.equals(that.computeResourcePreference))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_gatewayID = true && (isSetGatewayID());
+ list.add(present_gatewayID);
+ if (present_gatewayID)
+ list.add(gatewayID);
+
+ boolean present_computeResourceId = true && (isSetComputeResourceId());
+ list.add(present_computeResourceId);
+ if (present_computeResourceId)
+ list.add(computeResourceId);
+
+ boolean present_computeResourcePreference = true && (isSetComputeResourcePreference());
+ list.add(present_computeResourcePreference);
+ if (present_computeResourcePreference)
+ list.add(computeResourcePreference);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(updateGatewayComputeResourcePreference_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGatewayID()).compareTo(other.isSetGatewayID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGatewayID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayID, other.gatewayID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId, other.computeResourceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputeResourcePreference()).compareTo(other.isSetComputeResourcePreference());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourcePreference()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourcePreference, other.computeResourcePreference);
+ 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("updateGatewayComputeResourcePreference_args(");
+ boolean first = true;
+
+ sb.append("gatewayID:");
+ if (this.gatewayID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gatewayID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("computeResourcePreference:");
+ if (this.computeResourcePreference == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourcePreference);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (gatewayID == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayID' was not present! Struct: " + toString());
+ }
+ if (computeResourceId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'computeResourceId' was not present! Struct: " + toString());
+ }
+ if (computeResourcePreference == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'computeResourcePreference' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (computeResourcePreference != null) {
+ computeResourcePreference.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 updateGatewayComputeResourcePreference_argsStandardSchemeFactory implements SchemeFactory {
+ public updateGatewayComputeResourcePreference_argsStandardScheme getScheme() {
+ return new updateGatewayComputeResourcePreference_argsStandardScheme();
+ }
+ }
+
+ private static class updateGatewayComputeResourcePreference_argsStandardScheme extends StandardScheme<updateGatewayComputeResourcePreference_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateGatewayComputeResourcePreference_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: // GATEWAY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.gatewayID = iprot.readString();
+ struct.setGatewayIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // COMPUTE_RESOURCE_PREFERENCE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.computeResourcePreference = new org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference();
+ struct.computeResourcePreference.read(iprot);
+ struct.setComputeResourcePreferenceIsSet(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, updateGatewayComputeResourcePreference_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.gatewayID != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.computeResourcePreference != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_PREFERENCE_FIELD_DESC);
+ struct.computeResourcePreference.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateGatewayComputeResourcePreference_argsTupleSchemeFactory implements SchemeFactory {
+ public updateGatewayComputeResourcePreference_argsTupleScheme getScheme() {
+ return new updateGatewayComputeResourcePreference_argsTupleScheme();
+ }
+ }
+
+ private static class updateGatewayComputeResourcePreference_argsTupleScheme extends TupleScheme<updateGatewayComputeResourcePreference_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateGatewayComputeResourcePreference_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.gatewayID);
+ oprot.writeString(struct.computeResourceId);
+ struct.computeResourcePreference.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateGatewayComputeResourcePreference_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.gatewayID = iprot.readString();
+ struct.setGatewayIDIsSet(true);
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ struct.computeResourcePreference = new org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference();
+ struct.computeResourcePreference.read(iprot);
+ struct.setComputeResourcePreferenceIsSet(true);
+ }
+ }
+
+ }
+
+ public static class updateGatewayComputeResourcePreference_result implements org.apache.thrift.TBase<updateGatewayComputeResourcePreference_result, updateGatewayComputeResourcePreference_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateGatewayComputeResourcePreference_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGatewayComputeResourcePreference_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final org.apache.thrift.protocol.TField RSE_FIELD_DESC = new org.apache.thrift.protocol.TField("rse", 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 updateGatewayComputeResourcePreference_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateGatewayComputeResourcePreference_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public org.apache.airavata.registry.api.exception.RegistryServiceException rse; // 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"),
+ RSE((short)1, "rse");
+
+ 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: // RSE
+ return RSE;
+ 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
+ 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.RSE, new org.apache.thrift.meta_data.FieldMetaData("rse", 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(updateGatewayComputeResourcePreference_result.class, metaDataMap);
+ }
+
+ public updateGatewayComputeResourcePreference_result() {
+ }
+
+ public updateGatewayComputeResourcePreference_result(
+ boolean success,
+ org.apache.airavata.registry.api.exception.RegistryServiceException rse)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.rse = rse;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateGatewayComputeResourcePreference_result(updateGatewayComputeResourcePreference_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetRse()) {
+ this.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException(other.rse);
+ }
+ }
+
+ public updateGatewayComputeResourcePreference_result deepCopy() {
+ return new updateGatewayComputeResourcePreference_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.rse = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updateGatewayComputeResourcePreference_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.registry.api.exception.RegistryServiceException getRse() {
+ return this.rse;
+ }
+
+ public updateGatewayComputeResourcePreference_result setRse(org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ this.rse = rse;
+ return this;
+ }
+
+ public void unsetRse() {
+ this.rse = null;
+ }
+
+ /** Returns true if field rse is set (has been assigned a value) and false otherwise */
+ public boolean isSetRse() {
+ return this.rse != null;
+ }
+
+ public void setRseIsSet(boolean value) {
+ if (!value) {
+ this.rse = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case RSE:
+ if (value == null) {
+ unsetRse();
+ } else {
+ setRse((org.apache.airavata.registry.api.exception.RegistryServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return isSuccess();
+
+ case RSE:
+ return getRse();
+
+ }
+ 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 RSE:
+ return isSetRse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateGatewayComputeResourcePreference_result)
+ return this.equals((updateGatewayComputeResourcePreference_result)that);
+ return false;
+ }
+
+ public boolean equals(updateGatewayComputeResourcePreference_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_rse = true && this.isSetRse();
+ boolean that_present_rse = true && that.isSetRse();
+ if (this_present_rse || that_present_rse) {
+ if (!(this_present_rse && that_present_rse))
+ return false;
+ if (!this.rse.equals(that.rse))
+ 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_rse = true && (isSetRse());
+ list.add(present_rse);
+ if (present_rse)
+ list.add(rse);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(updateGatewayComputeRe
<TRUNCATED>