You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/10/03 22:23:47 UTC
[2/3] airavata git commit: WIP
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
index e7693ac..a7c424e 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -145,6 +145,22 @@ public class GovRegistryService {
public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+ /**
+ * * Sharing Entity with Users and Groups
+ * *
+ *
+ * @param entityId
+ * @param userList
+ * @param perssionType
+ */
+ public boolean shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -219,6 +235,14 @@ public class GovRegistryService {
public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -1167,6 +1191,118 @@ public class GovRegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionTypes failed: unknown result");
}
+ public boolean shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_shareEntityWithUsers(entityId, userList, perssionType);
+ return recv_shareEntityWithUsers();
+ }
+
+ public void send_shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ sendBase("shareEntityWithUsers", args);
+ }
+
+ public boolean recv_shareEntityWithUsers() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ receiveBase(result, "shareEntityWithUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
+ }
+
+ public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_revokeEntitySharingFromUsers(entityId, userList, perssionType);
+ return recv_revokeEntitySharingFromUsers();
+ }
+
+ public void send_revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ sendBase("revokeEntitySharingFromUsers", args);
+ }
+
+ public boolean recv_revokeEntitySharingFromUsers() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ receiveBase(result, "revokeEntitySharingFromUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
+ }
+
+ public boolean shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_shareEntityWithGroups(entityId, groupList, perssionType);
+ return recv_shareEntityWithGroups();
+ }
+
+ public void send_shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ sendBase("shareEntityWithGroups", args);
+ }
+
+ public boolean recv_shareEntityWithGroups() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ receiveBase(result, "shareEntityWithGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
+ }
+
+ public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_revokeEntitySharingFromGroups(entityId, groupList, perssionType);
+ return recv_revokeEntitySharingFromGroups();
+ }
+
+ public void send_revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ sendBase("revokeEntitySharingFromGroups", args);
+ }
+
+ public boolean recv_revokeEntitySharingFromGroups() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ receiveBase(result, "revokeEntitySharingFromGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups 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> {
@@ -2362,6 +2498,158 @@ public class GovRegistryService {
}
}
+ public void shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ shareEntityWithUsers_call method_call = new shareEntityWithUsers_call(entityId, userList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class shareEntityWithUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> userList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public shareEntityWithUsers_call(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, 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.entityId = entityId;
+ this.userList = userList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareEntityWithUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, 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_shareEntityWithUsers();
+ }
+ }
+
+ public void revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ revokeEntitySharingFromUsers_call method_call = new revokeEntitySharingFromUsers_call(entityId, userList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class revokeEntitySharingFromUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> userList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public revokeEntitySharingFromUsers_call(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, 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.entityId = entityId;
+ this.userList = userList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeEntitySharingFromUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, 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_revokeEntitySharingFromUsers();
+ }
+ }
+
+ public void shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ shareEntityWithGroups_call method_call = new shareEntityWithGroups_call(entityId, groupList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class shareEntityWithGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> groupList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public shareEntityWithGroups_call(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, 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.entityId = entityId;
+ this.groupList = groupList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareEntityWithGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, 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_shareEntityWithGroups();
+ }
+ }
+
+ public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ revokeEntitySharingFromGroups_call method_call = new revokeEntitySharingFromGroups_call(entityId, groupList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class revokeEntitySharingFromGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> groupList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public revokeEntitySharingFromGroups_call(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, 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.entityId = entityId;
+ this.groupList = groupList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeEntitySharingFromGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, 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_revokeEntitySharingFromGroups();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -2410,6 +2698,10 @@ public class GovRegistryService {
processMap.put("deletePermissionType", new deletePermissionType());
processMap.put("getPermissionType", new getPermissionType());
processMap.put("getPermissionTypes", new getPermissionTypes());
+ processMap.put("shareEntityWithUsers", new shareEntityWithUsers());
+ processMap.put("revokeEntitySharingFromUsers", new revokeEntitySharingFromUsers());
+ processMap.put("shareEntityWithGroups", new shareEntityWithGroups());
+ processMap.put("revokeEntitySharingFromGroups", new revokeEntitySharingFromGroups());
return processMap;
}
@@ -3265,6 +3557,106 @@ public class GovRegistryService {
}
}
+ public static class shareEntityWithUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shareEntityWithUsers_args> {
+ public shareEntityWithUsers() {
+ super("shareEntityWithUsers");
+ }
+
+ public shareEntityWithUsers_args getEmptyArgsInstance() {
+ return new shareEntityWithUsers_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public shareEntityWithUsers_result getResult(I iface, shareEntityWithUsers_args args) throws org.apache.thrift.TException {
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ try {
+ result.success = iface.shareEntityWithUsers(args.entityId, args.userList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
+ public static class revokeEntitySharingFromUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revokeEntitySharingFromUsers_args> {
+ public revokeEntitySharingFromUsers() {
+ super("revokeEntitySharingFromUsers");
+ }
+
+ public revokeEntitySharingFromUsers_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromUsers_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public revokeEntitySharingFromUsers_result getResult(I iface, revokeEntitySharingFromUsers_args args) throws org.apache.thrift.TException {
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ try {
+ result.success = iface.revokeEntitySharingFromUsers(args.entityId, args.userList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
+ public static class shareEntityWithGroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shareEntityWithGroups_args> {
+ public shareEntityWithGroups() {
+ super("shareEntityWithGroups");
+ }
+
+ public shareEntityWithGroups_args getEmptyArgsInstance() {
+ return new shareEntityWithGroups_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public shareEntityWithGroups_result getResult(I iface, shareEntityWithGroups_args args) throws org.apache.thrift.TException {
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ try {
+ result.success = iface.shareEntityWithGroups(args.entityId, args.groupList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
+ public static class revokeEntitySharingFromGroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revokeEntitySharingFromGroups_args> {
+ public revokeEntitySharingFromGroups() {
+ super("revokeEntitySharingFromGroups");
+ }
+
+ public revokeEntitySharingFromGroups_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromGroups_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public revokeEntitySharingFromGroups_result getResult(I iface, revokeEntitySharingFromGroups_args args) throws org.apache.thrift.TException {
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ try {
+ result.success = iface.revokeEntitySharingFromGroups(args.entityId, args.groupList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -3313,6 +3705,10 @@ public class GovRegistryService {
processMap.put("deletePermissionType", new deletePermissionType());
processMap.put("getPermissionType", new getPermissionType());
processMap.put("getPermissionTypes", new getPermissionTypes());
+ processMap.put("shareEntityWithUsers", new shareEntityWithUsers());
+ processMap.put("revokeEntitySharingFromUsers", new revokeEntitySharingFromUsers());
+ processMap.put("shareEntityWithGroups", new shareEntityWithGroups());
+ processMap.put("revokeEntitySharingFromGroups", new revokeEntitySharingFromGroups());
return processMap;
}
@@ -5321,6 +5717,238 @@ public class GovRegistryService {
}
}
+ public static class shareEntityWithUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, shareEntityWithUsers_args, Boolean> {
+ public shareEntityWithUsers() {
+ super("shareEntityWithUsers");
+ }
+
+ public shareEntityWithUsers_args getEmptyArgsInstance() {
+ return new shareEntityWithUsers_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) {
+ shareEntityWithUsers_result result = new shareEntityWithUsers_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;
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(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, shareEntityWithUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.shareEntityWithUsers(args.entityId, args.userList, args.perssionType,resultHandler);
+ }
+ }
+
+ public static class revokeEntitySharingFromUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revokeEntitySharingFromUsers_args, Boolean> {
+ public revokeEntitySharingFromUsers() {
+ super("revokeEntitySharingFromUsers");
+ }
+
+ public revokeEntitySharingFromUsers_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromUsers_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) {
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_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;
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(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, revokeEntitySharingFromUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.revokeEntitySharingFromUsers(args.entityId, args.userList, args.perssionType,resultHandler);
+ }
+ }
+
+ public static class shareEntityWithGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, shareEntityWithGroups_args, Boolean> {
+ public shareEntityWithGroups() {
+ super("shareEntityWithGroups");
+ }
+
+ public shareEntityWithGroups_args getEmptyArgsInstance() {
+ return new shareEntityWithGroups_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) {
+ shareEntityWithGroups_result result = new shareEntityWithGroups_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;
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(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, shareEntityWithGroups_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.shareEntityWithGroups(args.entityId, args.groupList, args.perssionType,resultHandler);
+ }
+ }
+
+ public static class revokeEntitySharingFromGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revokeEntitySharingFromGroups_args, Boolean> {
+ public revokeEntitySharingFromGroups() {
+ super("revokeEntitySharingFromGroups");
+ }
+
+ public revokeEntitySharingFromGroups_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromGroups_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) {
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_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;
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(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, revokeEntitySharingFromGroups_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.revokeEntitySharingFromGroups(args.entityId, args.groupList, args.perssionType,resultHandler);
+ }
+ }
+
}
public static class createDomain_args implements org.apache.thrift.TBase<createDomain_args, createDomain_args._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_args> {
@@ -33017,71 +33645,3726 @@ public class GovRegistryService {
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.PERMISSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("permissionType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.PERMISSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("permissionType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.PermissionType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePermissionType_args.class, metaDataMap);
+ }
+
+ public updatePermissionType_args() {
+ }
+
+ public updatePermissionType_args(
+ org.apache.airavata.sharing.registry.models.PermissionType permissionType)
+ {
+ this();
+ this.permissionType = permissionType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updatePermissionType_args(updatePermissionType_args other) {
+ if (other.isSetPermissionType()) {
+ this.permissionType = new org.apache.airavata.sharing.registry.models.PermissionType(other.permissionType);
+ }
+ }
+
+ public updatePermissionType_args deepCopy() {
+ return new updatePermissionType_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.permissionType = null;
+ }
+
+ public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType() {
+ return this.permissionType;
+ }
+
+ public updatePermissionType_args setPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) {
+ this.permissionType = permissionType;
+ return this;
+ }
+
+ public void unsetPermissionType() {
+ this.permissionType = null;
+ }
+
+ /** Returns true if field permissionType is set (has been assigned a value) and false otherwise */
+ public boolean isSetPermissionType() {
+ return this.permissionType != null;
+ }
+
+ public void setPermissionTypeIsSet(boolean value) {
+ if (!value) {
+ this.permissionType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PERMISSION_TYPE:
+ if (value == null) {
+ unsetPermissionType();
+ } else {
+ setPermissionType((org.apache.airavata.sharing.registry.models.PermissionType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PERMISSION_TYPE:
+ return getPermissionType();
+
+ }
+ 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 PERMISSION_TYPE:
+ return isSetPermissionType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updatePermissionType_args)
+ return this.equals((updatePermissionType_args)that);
+ return false;
+ }
+
+ public boolean equals(updatePermissionType_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_permissionType = true && this.isSetPermissionType();
+ boolean that_present_permissionType = true && that.isSetPermissionType();
+ if (this_present_permissionType || that_present_permissionType) {
+ if (!(this_present_permissionType && that_present_permissionType))
+ return false;
+ if (!this.permissionType.equals(that.permissionType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_permissionType = true && (isSetPermissionType());
+ list.add(present_permissionType);
+ if (present_permissionType)
+ list.add(permissionType);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(updatePermissionType_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPermissionType()).compareTo(other.isSetPermissionType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPermissionType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionType, other.permissionType);
+ 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("updatePermissionType_args(");
+ boolean first = true;
+
+ sb.append("permissionType:");
+ if (this.permissionType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.permissionType);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (permissionType == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'permissionType' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (permissionType != null) {
+ permissionType.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 updatePermissionType_argsStandardSchemeFactory implements SchemeFactory {
+ public updatePermissionType_argsStandardScheme getScheme() {
+ return new updatePermissionType_argsStandardScheme();
+ }
+ }
+
+ private static class updatePermissionType_argsStandardScheme extends StandardScheme<updatePermissionType_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updatePermissionType_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: // PERMISSION_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.permissionType = new org.apache.airavata.sharing.registry.models.PermissionType();
+ struct.permissionType.read(iprot);
+ struct.setPermissionTypeIsSet(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, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.permissionType != null) {
+ oprot.writeFieldBegin(PERMISSION_TYPE_FIELD_DESC);
+ struct.permissionType.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updatePermissionType_argsTupleSchemeFactory implements SchemeFactory {
+ public updatePermissionType_argsTupleScheme getScheme() {
+ return new updatePermissionType_argsTupleScheme();
+ }
+ }
+
+ private static class updatePermissionType_argsTupleScheme extends TupleScheme<updatePermissionType_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.permissionType.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.permissionType = new org.apache.airavata.sharing.registry.models.PermissionType();
+ struct.permissionType.read(iprot);
+ struct.setPermissionTypeIsSet(true);
+ }
+ }
+
+ }
+
+ public static class updatePermissionType_result implements org.apache.thrift.TBase<updatePermissionType_result, updatePermissionType_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePermissionType_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePermissionType_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 GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", 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 updatePermissionType_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updatePermissionType_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // 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"),
+ GRE((short)1, "gre");
+
+ 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: // GRE
+ return GRE;
+ 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.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", 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(updatePermissionType_result.class, metaDataMap);
+ }
+
+ public updatePermissionType_result() {
+ }
+
+ public updatePermissionType_result(
+ boolean success,
+ org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.gre = gre;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updatePermissionType_result(updatePermissionType_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetGre()) {
+ this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+ }
+ }
+
+ public updatePermissionType_result deepCopy() {
+ return new updatePermissionType_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.gre = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updatePermissionType_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.sharing.registry.models.GovRegistryException getGre() {
+ return this.gre;
+ }
+
+ public updatePermissionType_result setGre(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ this.gre = gre;
+ return this;
+ }
+
+ public void unsetGre() {
+ this.gre = null;
+ }
+
+ /** Returns true if field gre is set (has been assigned a value) and false otherwise */
+ public boolean isSetGre() {
+ return this.gre != null;
+ }
+
+ public void setGreIsSet(boolean value) {
+ if (!value) {
+ this.gre = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case GRE:
+ if (value == null) {
+ unsetGre();
+ } else {
+ setGre((org.apache.airavata.sharing.registry.models.GovRegistryException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return isSuccess();
+
+ case GRE:
+ return getGre();
+
+ }
+ 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 GRE:
+ return isSetGre();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updatePermissionType_result)
+ return this.equals((updatePermissionType_result)that);
+ return false;
+ }
+
+ public boolean equals(updatePermissionType_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_gre = true && this.isSetGre();
+ boolean that_present_gre = true && that.isSetGre();
+ if (this_present_gre || that_present_gre) {
+ if (!(this_present_gre && that_present_gre))
+ return false;
+ if (!this.gre.equals(that.gre))
+ 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_gre = true && (isSetGre());
+ list.add(present_gre);
+ if (present_gre)
+ list.add(gre);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(updatePermissionType_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(isSetGre()).compareTo(other.isSetGre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gre, other.gre);
+ 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("updatePermissionType_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gre:");
+ if (this.gre == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gre);
+ }
+ 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 updatePermissionType_resultStandardSchemeFactory implements SchemeFactory {
+ public updatePermissionType_resultStandardScheme getScheme() {
+ return new updatePermissionType_resultStandardScheme();
+ }
+ }
+
+ private static class updatePermissionType_resultStandardScheme extends StandardScheme<updatePermissionType_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updatePermissionType_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: // GRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException();
+ struct.gre.read(iprot);
+ struct.setGreIsSet(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, updatePermissionType_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.gre != null) {
+ oprot.writeFieldBegin(GRE_FIELD_DESC);
+ struct.gre.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updatePermissionType_resultTupleSchemeFactory implements SchemeFactory {
+ public updatePermissionType_resultTupleScheme getScheme() {
+ return new updatePermissionType_resultTupleScheme();
+ }
+ }
+
+ private static class updatePermissionType_resultTupleScheme extends TupleScheme<updatePermissionType_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetGre()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetGre()) {
+ struct.gre.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException();
+ struct.gre.read(iprot);
+ struct.setGreIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deletePermissionType_args implements org.apache.thrift.TBase<deletePermissionType_args, deletePermissionType_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePermissionType_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePermissionType_args");
+
+ private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deletePermissionType_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deletePermissionType_argsTupleSchemeFactory());
+ }
+
+ public String entityTypeId; // 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 {
+ ENTITY_TYPE_ID((short)1, "entityTypeId");
+
+ 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: // ENTITY_TYPE_ID
+ return ENTITY_TYPE_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.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", 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(deletePermissionType_args.class, metaDataMap);
+ }
+
+ public deletePermissionType_args() {
+ }
+
+ public deletePermissionType_args(
+ String entityTypeId)
+ {
+ this();
+ this.entityTypeId = entityTypeId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deletePermissionType_args(deletePermissionType_args other) {
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ }
+
+ public deletePermissionType_args deepCopy() {
+ return new deletePermissionType_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityTypeId = null;
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public deletePermissionType_args setEntityTypeId(String entityTypeId) {
+ this.entityTypeId = entityTypeId;
+ return this;
+ }
+
+ public void unsetEntityTypeId() {
+ this.entityTypeId = null;
+ }
+
+ /** Returns true if field entityTypeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntityTypeId() {
+ return this.entityTypeId != null;
+ }
+
+ public void setEntityTypeIdIsSet(boolean value) {
+ if (!value) {
+ this.entityTypeId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ }
+ 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 ENTITY_TYPE_ID:
+ return isSetEntityTypeId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deletePermissionType_args)
+ return this.equals((deletePermissionType_args)that);
+ return false;
+ }
+
+ public boolean equals(deletePermissionType_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_entityTypeId = true && this.isSetEntityTypeId();
+ boolean that_present_entityTypeId = true && that.isSetEntityTypeId();
+ if (this_present_entityTypeId || that_present_entityTypeId) {
+ if (!(this_present_entityTypeId && that_present_entityTypeId))
+ return false;
+ if (!this.entityTypeId.equals(that.entityTypeId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_entityTypeId = true && (isSetEntityTypeId());
+ list.add(present_entityTypeId);
+ if (present_entityTypeId)
+ list.add(entityTypeId);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(deletePermissionType_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetEntityTypeId()).compareTo(other.isSetEntityTypeId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEntityTypeId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityTypeId, other.entityTypeId);
+ 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("deletePermissionType_args(");
+ boolean first = true;
+
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (entityTypeId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityTypeId' was not present! Struct: " + toString());
+ }
+ // 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 deletePermissionType_argsStandardSchemeFactory implements SchemeFactory {
+ public deletePermissionType_argsStandardScheme getScheme() {
+ return new deletePermissionType_argsStandardScheme();
+ }
+ }
+
+ private static class deletePermissionType_argsStandardScheme extends StandardScheme<deletePermissionType_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deletePermissionType_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: // ENTITY_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(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, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityTypeId != null) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deletePermissionType_argsTupleSchemeFactory implements SchemeFactory {
+ public deletePermissionType_argsTupleScheme getScheme() {
+ return new deletePermissionType_argsTupleScheme();
+ }
+ }
+
+ private static class deletePermissionType_argsTupleScheme extends TupleScheme<deletePermissionType_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.entityTypeId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ }
+
+ }
+
+ public static class deletePermissionType_result implements org.apache.thrift.TBase<deletePermissionType_result, deletePermissionType_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePermissionType_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePermissionType_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 GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", 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 deletePermissionType_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deletePermissionType_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // 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"),
+ GRE((short)1, "gre");
+
+ 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: // GRE
+ return GRE;
+ 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.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", 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(deletePermissionType_result.class, metaDataMap);
+ }
+
+ public deletePermissionType_result() {
+ }
+
+ public deletePermissionType_result(
+ boolean success,
+ org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.gre = gre;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deletePermissionType_result(deletePermissionType_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetGre()) {
+ this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+ }
+ }
+
+ public deletePermissionType_result deepCopy() {
+ return new deletePermissionType_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.gre = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public deletePermissionType_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.sharing.registry.models.GovRegistryException getGre() {
+ return this.gre;
+ }
+
+ public deletePermissionType_result setGre(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ this.gre = gre;
+ return this;
+ }
+
+ public void unsetGre() {
+ this.gre = null;
+ }
+
+ /** Returns true if field gre is set (has been assigned a value) and false otherwise */
+ public boolean isSetGre() {
+ return this.gre != null;
+ }
+
+ public void setGreIsSet(boolean value) {
+ if (!value) {
+ this.gre = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case GRE:
+ if (value == null) {
+ unsetGre();
+ } else {
+ setGre((org.apache.airavata.sharing.registry.models.GovRegistryException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return isSuccess();
+
+ case GRE:
+ return getGre();
+
+ }
+ 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 GRE:
+ return isSetGre();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deletePermissionType_result)
+ return this.equals((deletePermissionType_result)that);
+ return false;
+ }
+
+ public boolean equals(deletePermissionType_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_gre = true && this.isSetGre();
+ boolean that_present_gre = true && that.isSetGre();
+ if (this_present_gre || that_present_gre) {
+ if (!(this_present_gre && that_present_gre))
+ return false;
+ if (!this.gre.equals(that.gre))
+ 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_gre = true && (isSetGre());
+ list.add(present_gre);
+ if (present_gre)
+ list.add(gre);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(deletePermissionType_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(isSetGre()).compareTo(other.isSetGre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gre, other.gre);
+ 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("deletePermissionType_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gre:");
+ if (this.gre == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gre);
+ }
+ 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 deletePermissionType_resultStandardSchemeFactory implements SchemeFactory {
+ public deletePermissionType_resultStandardScheme getScheme() {
+ return new deletePermissionType_resultStandardScheme();
+ }
+ }
+
+ private static class deletePermissionType_resultStandardScheme extends StandardScheme<deletePermissionType_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deletePermissionType_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
<TRUNCATED>