http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git 
a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
 
b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
index 1e0e1b9..9b47bc3 100644
--- 
a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ 
b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -34,7 +34,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-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = 
"2016-10-06")
 public class GovRegistryService {
 
   public interface Iface {
@@ -129,6 +129,10 @@ public class GovRegistryService {
 
     public List<org.apache.airavata.sharing.registry.models.Entity> 
searchEntities(String userId, String entityTypeId, 
Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> 
filters, int offset, int limit) throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException;
 
+    public List<org.apache.airavata.sharing.registry.models.User> 
getListOfSharedUsers(String entityId, String permissionTypeId) throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> 
getListOfSharedGroups(String entityId, String permissionTypeId) throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException;
+
     /**
      *  * Permission Operations
      * *
@@ -228,6 +232,10 @@ public class GovRegistryService {
 
     public void searchEntities(String userId, String entityTypeId, 
Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> 
filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback 
resultHandler) throws org.apache.thrift.TException;
 
+    public void getListOfSharedUsers(String entityId, String permissionTypeId, 
org.apache.thrift.async.AsyncMethodCallback resultHandler) throws 
org.apache.thrift.TException;
+
+    public void getListOfSharedGroups(String entityId, String 
permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) 
throws org.apache.thrift.TException;
+
     public void 
createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType 
permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) 
throws org.apache.thrift.TException;
 
     public void 
updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType 
permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) 
throws org.apache.thrift.TException;
@@ -1064,6 +1072,60 @@ public class GovRegistryService {
       throw new 
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT,
 "searchEntities failed: unknown result");
     }
 
+    public List<org.apache.airavata.sharing.registry.models.User> 
getListOfSharedUsers(String entityId, String permissionTypeId) throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException
+    {
+      send_getListOfSharedUsers(entityId, permissionTypeId);
+      return recv_getListOfSharedUsers();
+    }
+
+    public void send_getListOfSharedUsers(String entityId, String 
permissionTypeId) throws org.apache.thrift.TException
+    {
+      getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getListOfSharedUsers", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> 
recv_getListOfSharedUsers() throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException
+    {
+      getListOfSharedUsers_result result = new getListOfSharedUsers_result();
+      receiveBase(result, "getListOfSharedUsers");
+      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,
 "getListOfSharedUsers failed: unknown result");
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> 
getListOfSharedGroups(String entityId, String permissionTypeId) throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException
+    {
+      send_getListOfSharedGroups(entityId, permissionTypeId);
+      return recv_getListOfSharedGroups();
+    }
+
+    public void send_getListOfSharedGroups(String entityId, String 
permissionTypeId) throws org.apache.thrift.TException
+    {
+      getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getListOfSharedGroups", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> 
recv_getListOfSharedGroups() throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException
+    {
+      getListOfSharedGroups_result result = new getListOfSharedGroups_result();
+      receiveBase(result, "getListOfSharedGroups");
+      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,
 "getListOfSharedGroups failed: unknown result");
+    }
+
     public String 
createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType 
permissionType) throws 
org.apache.airavata.sharing.registry.models.GovRegistryException, 
org.apache.thrift.TException
     {
       send_createPermissionType(permissionType);
@@ -2368,6 +2430,76 @@ public class GovRegistryService {
       }
     }
 
+    public void getListOfSharedUsers(String entityId, String permissionTypeId, 
org.apache.thrift.async.AsyncMethodCallback resultHandler) throws 
org.apache.thrift.TException {
+      checkReady();
+      getListOfSharedUsers_call method_call = new 
getListOfSharedUsers_call(entityId, permissionTypeId, resultHandler, this, 
___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getListOfSharedUsers_call extends 
org.apache.thrift.async.TAsyncMethodCall {
+      private String entityId;
+      private String permissionTypeId;
+      public getListOfSharedUsers_call(String entityId, String 
permissionTypeId, 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.permissionTypeId = permissionTypeId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws 
org.apache.thrift.TException {
+        prot.writeMessageBegin(new 
org.apache.thrift.protocol.TMessage("getListOfSharedUsers", 
org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+        args.setEntityId(entityId);
+        args.setPermissionTypeId(permissionTypeId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.sharing.registry.models.User> 
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_getListOfSharedUsers();
+      }
+    }
+
+    public void getListOfSharedGroups(String entityId, String 
permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) 
throws org.apache.thrift.TException {
+      checkReady();
+      getListOfSharedGroups_call method_call = new 
getListOfSharedGroups_call(entityId, permissionTypeId, resultHandler, this, 
___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getListOfSharedGroups_call extends 
org.apache.thrift.async.TAsyncMethodCall {
+      private String entityId;
+      private String permissionTypeId;
+      public getListOfSharedGroups_call(String entityId, String 
permissionTypeId, 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.permissionTypeId = permissionTypeId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws 
org.apache.thrift.TException {
+        prot.writeMessageBegin(new 
org.apache.thrift.protocol.TMessage("getListOfSharedGroups", 
org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+        args.setEntityId(entityId);
+        args.setPermissionTypeId(permissionTypeId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.sharing.registry.models.UserGroup> 
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_getListOfSharedGroups();
+      }
+    }
+
     public void 
createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType 
permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) 
throws org.apache.thrift.TException {
       checkReady();
       createPermissionType_call method_call = new 
createPermissionType_call(permissionType, resultHandler, this, 
___protocolFactory, ___transport);
@@ -2776,6 +2908,8 @@ public class GovRegistryService {
       processMap.put("deleteEntity", new deleteEntity());
       processMap.put("getEntity", new getEntity());
       processMap.put("searchEntities", new searchEntities());
+      processMap.put("getListOfSharedUsers", new getListOfSharedUsers());
+      processMap.put("getListOfSharedGroups", new getListOfSharedGroups());
       processMap.put("createPermissionType", new createPermissionType());
       processMap.put("updatePermissionType", new updatePermissionType());
       processMap.put("deletePermissionType", new deletePermissionType());
@@ -3519,6 +3653,54 @@ public class GovRegistryService {
       }
     }
 
+    public static class getListOfSharedUsers<I extends Iface> extends 
org.apache.thrift.ProcessFunction<I, getListOfSharedUsers_args> {
+      public getListOfSharedUsers() {
+        super("getListOfSharedUsers");
+      }
+
+      public getListOfSharedUsers_args getEmptyArgsInstance() {
+        return new getListOfSharedUsers_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getListOfSharedUsers_result getResult(I iface, 
getListOfSharedUsers_args args) throws org.apache.thrift.TException {
+        getListOfSharedUsers_result result = new getListOfSharedUsers_result();
+        try {
+          result.success = iface.getListOfSharedUsers(args.entityId, 
args.permissionTypeId);
+        } catch 
(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+          result.gre = gre;
+        }
+        return result;
+      }
+    }
+
+    public static class getListOfSharedGroups<I extends Iface> extends 
org.apache.thrift.ProcessFunction<I, getListOfSharedGroups_args> {
+      public getListOfSharedGroups() {
+        super("getListOfSharedGroups");
+      }
+
+      public getListOfSharedGroups_args getEmptyArgsInstance() {
+        return new getListOfSharedGroups_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getListOfSharedGroups_result getResult(I iface, 
getListOfSharedGroups_args args) throws org.apache.thrift.TException {
+        getListOfSharedGroups_result result = new 
getListOfSharedGroups_result();
+        try {
+          result.success = iface.getListOfSharedGroups(args.entityId, 
args.permissionTypeId);
+        } catch 
(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+          result.gre = gre;
+        }
+        return result;
+      }
+    }
+
     public static class createPermissionType<I extends Iface> extends 
org.apache.thrift.ProcessFunction<I, createPermissionType_args> {
       public createPermissionType() {
         super("createPermissionType");
@@ -3809,6 +3991,8 @@ public class GovRegistryService {
       processMap.put("deleteEntity", new deleteEntity());
       processMap.put("getEntity", new getEntity());
       processMap.put("searchEntities", new searchEntities());
+      processMap.put("getListOfSharedUsers", new getListOfSharedUsers());
+      processMap.put("getListOfSharedGroups", new getListOfSharedGroups());
       processMap.put("createPermissionType", new createPermissionType());
       processMap.put("updatePermissionType", new updatePermissionType());
       processMap.put("deletePermissionType", new deletePermissionType());
@@ -5540,20 +5724,20 @@ public class GovRegistryService {
       }
     }
 
-    public static class createPermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, createPermissionType_args, String> {
-      public createPermissionType() {
-        super("createPermissionType");
+    public static class getListOfSharedUsers<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, getListOfSharedUsers_args, 
List<org.apache.airavata.sharing.registry.models.User>> {
+      public getListOfSharedUsers() {
+        super("getListOfSharedUsers");
       }
 
-      public createPermissionType_args getEmptyArgsInstance() {
-        return new createPermissionType_args();
+      public getListOfSharedUsers_args getEmptyArgsInstance() {
+        return new getListOfSharedUsers_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final 
AsyncFrameBuffer fb, final int seqid) {
+      public 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.User>> 
getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            createPermissionType_result result = new 
createPermissionType_result();
+        return new 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.User>>() { 
+          public void 
onComplete(List<org.apache.airavata.sharing.registry.models.User> o) {
+            getListOfSharedUsers_result result = new 
getListOfSharedUsers_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, 
org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -5566,7 +5750,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            createPermissionType_result result = new 
createPermissionType_result();
+            getListOfSharedUsers_result result = new 
getListOfSharedUsers_result();
             if (e instanceof 
org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = 
(org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5592,27 +5776,26 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, createPermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws 
TException {
-        iface.createPermissionType(args.permissionType,resultHandler);
+      public void start(I iface, getListOfSharedUsers_args args, 
org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.User>>
 resultHandler) throws TException {
+        iface.getListOfSharedUsers(args.entityId, 
args.permissionTypeId,resultHandler);
       }
     }
 
-    public static class updatePermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, updatePermissionType_args, Boolean> {
-      public updatePermissionType() {
-        super("updatePermissionType");
+    public static class getListOfSharedGroups<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, getListOfSharedGroups_args, 
List<org.apache.airavata.sharing.registry.models.UserGroup>> {
+      public getListOfSharedGroups() {
+        super("getListOfSharedGroups");
       }
 
-      public updatePermissionType_args getEmptyArgsInstance() {
-        return new updatePermissionType_args();
+      public getListOfSharedGroups_args getEmptyArgsInstance() {
+        return new getListOfSharedGroups_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final 
AsyncFrameBuffer fb, final int seqid) {
+      public 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.UserGroup>>
 getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updatePermissionType_result result = new 
updatePermissionType_result();
+        return new 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.UserGroup>>()
 { 
+          public void 
onComplete(List<org.apache.airavata.sharing.registry.models.UserGroup> o) {
+            getListOfSharedGroups_result result = new 
getListOfSharedGroups_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, 
org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -5624,7 +5807,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updatePermissionType_result result = new 
updatePermissionType_result();
+            getListOfSharedGroups_result result = new 
getListOfSharedGroups_result();
             if (e instanceof 
org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = 
(org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5650,25 +5833,82 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, updatePermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws 
TException {
-        iface.updatePermissionType(args.permissionType,resultHandler);
+      public void start(I iface, getListOfSharedGroups_args args, 
org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.UserGroup>>
 resultHandler) throws TException {
+        iface.getListOfSharedGroups(args.entityId, 
args.permissionTypeId,resultHandler);
       }
     }
 
-    public static class deletePermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, deletePermissionType_args, Boolean> {
-      public deletePermissionType() {
-        super("deletePermissionType");
+    public static class createPermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, createPermissionType_args, String> {
+      public createPermissionType() {
+        super("createPermissionType");
       }
 
-      public deletePermissionType_args getEmptyArgsInstance() {
-        return new deletePermissionType_args();
+      public createPermissionType_args getEmptyArgsInstance() {
+        return new createPermissionType_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final 
AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            createPermissionType_result result = new 
createPermissionType_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;
+            createPermissionType_result result = new 
createPermissionType_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, createPermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws 
TException {
+        iface.createPermissionType(args.permissionType,resultHandler);
+      }
+    }
+
+    public static class updatePermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, updatePermissionType_args, Boolean> {
+      public updatePermissionType() {
+        super("updatePermissionType");
+      }
+
+      public updatePermissionType_args getEmptyArgsInstance() {
+        return new updatePermissionType_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) {
-            deletePermissionType_result result = new 
deletePermissionType_result();
+            updatePermissionType_result result = new 
updatePermissionType_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -5682,7 +5922,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deletePermissionType_result result = new 
deletePermissionType_result();
+            updatePermissionType_result result = new 
updatePermissionType_result();
             if (e instanceof 
org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = 
(org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5708,26 +5948,27 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, deletePermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws 
TException {
-        iface.deletePermissionType(args.entityTypeId,resultHandler);
+      public void start(I iface, updatePermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws 
TException {
+        iface.updatePermissionType(args.permissionType,resultHandler);
       }
     }
 
-    public static class getPermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, getPermissionType_args, 
org.apache.airavata.sharing.registry.models.PermissionType> {
-      public getPermissionType() {
-        super("getPermissionType");
+    public static class deletePermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, deletePermissionType_args, Boolean> {
+      public deletePermissionType() {
+        super("deletePermissionType");
       }
 
-      public getPermissionType_args getEmptyArgsInstance() {
-        return new getPermissionType_args();
+      public deletePermissionType_args getEmptyArgsInstance() {
+        return new deletePermissionType_args();
       }
 
-      public 
AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType> 
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<org.apache.airavata.sharing.registry.models.PermissionType>()
 { 
-          public void 
onComplete(org.apache.airavata.sharing.registry.models.PermissionType o) {
-            getPermissionType_result result = new getPermissionType_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deletePermissionType_result result = new 
deletePermissionType_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, 
org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -5739,7 +5980,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getPermissionType_result result = new getPermissionType_result();
+            deletePermissionType_result result = new 
deletePermissionType_result();
             if (e instanceof 
org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = 
(org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5765,25 +6006,25 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, getPermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType>
 resultHandler) throws TException {
-        iface.getPermissionType(args.permissionTypeId,resultHandler);
+      public void start(I iface, deletePermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws 
TException {
+        iface.deletePermissionType(args.entityTypeId,resultHandler);
       }
     }
 
-    public static class getPermissionTypes<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, getPermissionTypes_args, 
List<org.apache.airavata.sharing.registry.models.PermissionType>> {
-      public getPermissionTypes() {
-        super("getPermissionTypes");
+    public static class getPermissionType<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, getPermissionType_args, 
org.apache.airavata.sharing.registry.models.PermissionType> {
+      public getPermissionType() {
+        super("getPermissionType");
       }
 
-      public getPermissionTypes_args getEmptyArgsInstance() {
-        return new getPermissionTypes_args();
+      public getPermissionType_args getEmptyArgsInstance() {
+        return new getPermissionType_args();
       }
 
-      public 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>>
 getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public 
AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType> 
getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>>()
 { 
-          public void 
onComplete(List<org.apache.airavata.sharing.registry.models.PermissionType> o) {
-            getPermissionTypes_result result = new getPermissionTypes_result();
+        return new 
AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType>()
 { 
+          public void 
onComplete(org.apache.airavata.sharing.registry.models.PermissionType o) {
+            getPermissionType_result result = new getPermissionType_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, 
org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -5796,7 +6037,64 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getPermissionTypes_result result = new getPermissionTypes_result();
+            getPermissionType_result result = new getPermissionType_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, getPermissionType_args args, 
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType>
 resultHandler) throws TException {
+        iface.getPermissionType(args.permissionTypeId,resultHandler);
+      }
+    }
+
+    public static class getPermissionTypes<I extends AsyncIface> extends 
org.apache.thrift.AsyncProcessFunction<I, getPermissionTypes_args, 
List<org.apache.airavata.sharing.registry.models.PermissionType>> {
+      public getPermissionTypes() {
+        super("getPermissionTypes");
+      }
+
+      public getPermissionTypes_args getEmptyArgsInstance() {
+        return new getPermissionTypes_args();
+      }
+
+      public 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>>
 getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new 
AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>>()
 { 
+          public void 
onComplete(List<org.apache.airavata.sharing.registry.models.PermissionType> o) {
+            getPermissionTypes_result result = new getPermissionTypes_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;
+            getPermissionTypes_result result = new getPermissionTypes_result();
             if (e instanceof 
org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = 
(org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -32148,57 +32446,2101 @@ public class GovRegistryService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("searchEntities_args(");
+      StringBuilder sb = new StringBuilder("searchEntities_args(");
+      boolean first = true;
+
+      sb.append("userId:");
+      if (this.userId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.userId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("entityTypeId:");
+      if (this.entityTypeId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.entityTypeId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("filters:");
+      if (this.filters == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.filters);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("offset:");
+      sb.append(this.offset);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("limit:");
+      sb.append(this.limit);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (userId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'userId' was not present! Struct: " + toString());
+      }
+      if (entityTypeId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'entityTypeId' was not present! Struct: " + toString());
+      }
+      if (filters == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'filters' was not present! Struct: " + toString());
+      }
+      // alas, we cannot check 'offset' because it's a primitive and you chose 
the non-beans generator.
+      // alas, we cannot check 'limit' because it's a primitive and you chose 
the non-beans generator.
+      // 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 searchEntities_argsStandardSchemeFactory implements 
SchemeFactory {
+      public searchEntities_argsStandardScheme getScheme() {
+        return new searchEntities_argsStandardScheme();
+      }
+    }
+
+    private static class searchEntities_argsStandardScheme extends 
StandardScheme<searchEntities_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, 
searchEntities_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: // USER_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) 
{
+                struct.userId = iprot.readString();
+                struct.setUserIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+              }
+              break;
+            case 2: // 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;
+            case 3: // FILTERS
+              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+                {
+                  org.apache.thrift.protocol.TMap _map58 = 
iprot.readMapBegin();
+                  struct.filters = new 
HashMap<org.apache.airavata.sharing.registry.models.EntitySearchFields,String>(2*_map58.size);
+                  
org.apache.airavata.sharing.registry.models.EntitySearchFields _key59;
+                  String _val60;
+                  for (int _i61 = 0; _i61 < _map58.size; ++_i61)
+                  {
+                    _key59 = 
org.apache.airavata.sharing.registry.models.EntitySearchFields.findByValue(iprot.readI32());
+                    _val60 = iprot.readString();
+                    struct.filters.put(_key59, _val60);
+                  }
+                  iprot.readMapEnd();
+                }
+                struct.setFiltersIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+              }
+              break;
+            case 4: // OFFSET
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.offset = iprot.readI32();
+                struct.setOffsetIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+              }
+              break;
+            case 5: // LIMIT
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.limit = iprot.readI32();
+                struct.setLimitIsSet(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
+        if (!struct.isSetOffset()) {
+          throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'offset' was not found in serialized data! Struct: " + toString());
+        }
+        if (!struct.isSetLimit()) {
+          throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'limit' was not found in serialized data! Struct: " + toString());
+        }
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, 
searchEntities_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.userId != null) {
+          oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+          oprot.writeString(struct.userId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.entityTypeId != null) {
+          oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+          oprot.writeString(struct.entityTypeId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.filters != null) {
+          oprot.writeFieldBegin(FILTERS_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, 
org.apache.thrift.protocol.TType.STRING, struct.filters.size()));
+            for 
(Map.Entry<org.apache.airavata.sharing.registry.models.EntitySearchFields, 
String> _iter62 : struct.filters.entrySet())
+            {
+              oprot.writeI32(_iter62.getKey().getValue());
+              oprot.writeString(_iter62.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(OFFSET_FIELD_DESC);
+        oprot.writeI32(struct.offset);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(LIMIT_FIELD_DESC);
+        oprot.writeI32(struct.limit);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class searchEntities_argsTupleSchemeFactory implements 
SchemeFactory {
+      public searchEntities_argsTupleScheme getScheme() {
+        return new searchEntities_argsTupleScheme();
+      }
+    }
+
+    private static class searchEntities_argsTupleScheme extends 
TupleScheme<searchEntities_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, 
searchEntities_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.userId);
+        oprot.writeString(struct.entityTypeId);
+        {
+          oprot.writeI32(struct.filters.size());
+          for 
(Map.Entry<org.apache.airavata.sharing.registry.models.EntitySearchFields, 
String> _iter63 : struct.filters.entrySet())
+          {
+            oprot.writeI32(_iter63.getKey().getValue());
+            oprot.writeString(_iter63.getValue());
+          }
+        }
+        oprot.writeI32(struct.offset);
+        oprot.writeI32(struct.limit);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, 
searchEntities_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.userId = iprot.readString();
+        struct.setUserIdIsSet(true);
+        struct.entityTypeId = iprot.readString();
+        struct.setEntityTypeIdIsSet(true);
+        {
+          org.apache.thrift.protocol.TMap _map64 = new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, 
org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.filters = new 
HashMap<org.apache.airavata.sharing.registry.models.EntitySearchFields,String>(2*_map64.size);
+          org.apache.airavata.sharing.registry.models.EntitySearchFields 
_key65;
+          String _val66;
+          for (int _i67 = 0; _i67 < _map64.size; ++_i67)
+          {
+            _key65 = 
org.apache.airavata.sharing.registry.models.EntitySearchFields.findByValue(iprot.readI32());
+            _val66 = iprot.readString();
+            struct.filters.put(_key65, _val66);
+          }
+        }
+        struct.setFiltersIsSet(true);
+        struct.offset = iprot.readI32();
+        struct.setOffsetIsSet(true);
+        struct.limit = iprot.readI32();
+        struct.setLimitIsSet(true);
+      }
+    }
+
+  }
+
+  public static class searchEntities_result implements 
org.apache.thrift.TBase<searchEntities_result, searchEntities_result._Fields>, 
java.io.Serializable, Cloneable, Comparable<searchEntities_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new 
org.apache.thrift.protocol.TStruct("searchEntities_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC 
= new org.apache.thrift.protocol.TField("success", 
org.apache.thrift.protocol.TType.LIST, (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 
searchEntities_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new 
searchEntities_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.Entity> 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
+    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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new 
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
 org.apache.airavata.sharing.registry.models.Entity.class))));
+      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(searchEntities_result.class,
 metaDataMap);
+    }
+
+    public searchEntities_result() {
+    }
+
+    public searchEntities_result(
+      List<org.apache.airavata.sharing.registry.models.Entity> success,
+      org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+    {
+      this();
+      this.success = success;
+      this.gre = gre;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public searchEntities_result(searchEntities_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.sharing.registry.models.Entity> 
__this__success = new 
ArrayList<org.apache.airavata.sharing.registry.models.Entity>(other.success.size());
+        for (org.apache.airavata.sharing.registry.models.Entity other_element 
: other.success) {
+          __this__success.add(new 
org.apache.airavata.sharing.registry.models.Entity(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetGre()) {
+        this.gre = new 
org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+      }
+    }
+
+    public searchEntities_result deepCopy() {
+      return new searchEntities_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.gre = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public 
java.util.Iterator<org.apache.airavata.sharing.registry.models.Entity> 
getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void 
addToSuccess(org.apache.airavata.sharing.registry.models.Entity elem) {
+      if (this.success == null) {
+        this.success = new 
ArrayList<org.apache.airavata.sharing.registry.models.Entity>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.Entity> 
getSuccess() {
+      return this.success;
+    }
+
+    public searchEntities_result 
setSuccess(List<org.apache.airavata.sharing.registry.models.Entity> 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.sharing.registry.models.GovRegistryException 
getGre() {
+      return this.gre;
+    }
+
+    public searchEntities_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((List<org.apache.airavata.sharing.registry.models.Entity>)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 getSuccess();
+
+      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 searchEntities_result)
+        return this.equals((searchEntities_result)that);
+      return false;
+    }
+
+    public boolean equals(searchEntities_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_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 && (isSetSuccess());
+      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(searchEntities_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("searchEntities_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("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 {
+        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 searchEntities_resultStandardSchemeFactory implements 
SchemeFactory {
+      public searchEntities_resultStandardScheme getScheme() {
+        return new searchEntities_resultStandardScheme();
+      }
+    }
+
+    private static class searchEntities_resultStandardScheme extends 
StandardScheme<searchEntities_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, 
searchEntities_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 _list68 = 
iprot.readListBegin();
+                  struct.success = new 
ArrayList<org.apache.airavata.sharing.registry.models.Entity>(_list68.size);
+                  org.apache.airavata.sharing.registry.models.Entity _elem69;
+                  for (int _i70 = 0; _i70 < _list68.size; ++_i70)
+                  {
+                    _elem69 = new 
org.apache.airavata.sharing.registry.models.Entity();
+                    _elem69.read(iprot);
+                    struct.success.add(_elem69);
+                  }
+                  iprot.readListEnd();
+                }
+                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, 
searchEntities_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.sharing.registry.models.Entity _iter71 : 
struct.success)
+            {
+              _iter71.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.gre != null) {
+          oprot.writeFieldBegin(GRE_FIELD_DESC);
+          struct.gre.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class searchEntities_resultTupleSchemeFactory implements 
SchemeFactory {
+      public searchEntities_resultTupleScheme getScheme() {
+        return new searchEntities_resultTupleScheme();
+      }
+    }
+
+    private static class searchEntities_resultTupleScheme extends 
TupleScheme<searchEntities_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, 
searchEntities_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.writeI32(struct.success.size());
+            for (org.apache.airavata.sharing.registry.models.Entity _iter72 : 
struct.success)
+            {
+              _iter72.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetGre()) {
+          struct.gre.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, 
searchEntities_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 _list73 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
+            struct.success = new 
ArrayList<org.apache.airavata.sharing.registry.models.Entity>(_list73.size);
+            org.apache.airavata.sharing.registry.models.Entity _elem74;
+            for (int _i75 = 0; _i75 < _list73.size; ++_i75)
+            {
+              _elem74 = new 
org.apache.airavata.sharing.registry.models.Entity();
+              _elem74.read(iprot);
+              struct.success.add(_elem74);
+            }
+          }
+          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 getListOfSharedUsers_args implements 
org.apache.thrift.TBase<getListOfSharedUsers_args, 
getListOfSharedUsers_args._Fields>, java.io.Serializable, Cloneable, 
Comparable<getListOfSharedUsers_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new 
org.apache.thrift.protocol.TStruct("getListOfSharedUsers_args");
+
+    private static final org.apache.thrift.protocol.TField 
ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", 
org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField 
PERMISSION_TYPE_ID_FIELD_DESC = new 
org.apache.thrift.protocol.TField("permissionTypeId", 
org.apache.thrift.protocol.TType.STRING, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes 
= new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new 
getListOfSharedUsers_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new 
getListOfSharedUsers_argsTupleSchemeFactory());
+    }
+
+    public String entityId; // required
+    public String permissionTypeId; // 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_ID((short)1, "entityId"),
+      PERMISSION_TYPE_ID((short)2, "permissionTypeId");
+
+      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_ID
+            return ENTITY_ID;
+          case 2: // PERMISSION_TYPE_ID
+            return PERMISSION_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_ID, new 
org.apache.thrift.meta_data.FieldMetaData("entityId", 
org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.PERMISSION_TYPE_ID, new 
org.apache.thrift.meta_data.FieldMetaData("permissionTypeId", 
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(getListOfSharedUsers_args.class,
 metaDataMap);
+    }
+
+    public getListOfSharedUsers_args() {
+    }
+
+    public getListOfSharedUsers_args(
+      String entityId,
+      String permissionTypeId)
+    {
+      this();
+      this.entityId = entityId;
+      this.permissionTypeId = permissionTypeId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getListOfSharedUsers_args(getListOfSharedUsers_args other) {
+      if (other.isSetEntityId()) {
+        this.entityId = other.entityId;
+      }
+      if (other.isSetPermissionTypeId()) {
+        this.permissionTypeId = other.permissionTypeId;
+      }
+    }
+
+    public getListOfSharedUsers_args deepCopy() {
+      return new getListOfSharedUsers_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.entityId = null;
+      this.permissionTypeId = null;
+    }
+
+    public String getEntityId() {
+      return this.entityId;
+    }
+
+    public getListOfSharedUsers_args setEntityId(String entityId) {
+      this.entityId = entityId;
+      return this;
+    }
+
+    public void unsetEntityId() {
+      this.entityId = null;
+    }
+
+    /** Returns true if field entityId is set (has been assigned a value) and 
false otherwise */
+    public boolean isSetEntityId() {
+      return this.entityId != null;
+    }
+
+    public void setEntityIdIsSet(boolean value) {
+      if (!value) {
+        this.entityId = null;
+      }
+    }
+
+    public String getPermissionTypeId() {
+      return this.permissionTypeId;
+    }
+
+    public getListOfSharedUsers_args setPermissionTypeId(String 
permissionTypeId) {
+      this.permissionTypeId = permissionTypeId;
+      return this;
+    }
+
+    public void unsetPermissionTypeId() {
+      this.permissionTypeId = null;
+    }
+
+    /** Returns true if field permissionTypeId is set (has been assigned a 
value) and false otherwise */
+    public boolean isSetPermissionTypeId() {
+      return this.permissionTypeId != null;
+    }
+
+    public void setPermissionTypeIdIsSet(boolean value) {
+      if (!value) {
+        this.permissionTypeId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case ENTITY_ID:
+        if (value == null) {
+          unsetEntityId();
+        } else {
+          setEntityId((String)value);
+        }
+        break;
+
+      case PERMISSION_TYPE_ID:
+        if (value == null) {
+          unsetPermissionTypeId();
+        } else {
+          setPermissionTypeId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case ENTITY_ID:
+        return getEntityId();
+
+      case PERMISSION_TYPE_ID:
+        return getPermissionTypeId();
+
+      }
+      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_ID:
+        return isSetEntityId();
+      case PERMISSION_TYPE_ID:
+        return isSetPermissionTypeId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getListOfSharedUsers_args)
+        return this.equals((getListOfSharedUsers_args)that);
+      return false;
+    }
+
+    public boolean equals(getListOfSharedUsers_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_entityId = true && this.isSetEntityId();
+      boolean that_present_entityId = true && that.isSetEntityId();
+      if (this_present_entityId || that_present_entityId) {
+        if (!(this_present_entityId && that_present_entityId))
+          return false;
+        if (!this.entityId.equals(that.entityId))
+          return false;
+      }
+
+      boolean this_present_permissionTypeId = true && 
this.isSetPermissionTypeId();
+      boolean that_present_permissionTypeId = true && 
that.isSetPermissionTypeId();
+      if (this_present_permissionTypeId || that_present_permissionTypeId) {
+        if (!(this_present_permissionTypeId && that_present_permissionTypeId))
+          return false;
+        if (!this.permissionTypeId.equals(that.permissionTypeId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_entityId = true && (isSetEntityId());
+      list.add(present_entityId);
+      if (present_entityId)
+        list.add(entityId);
+
+      boolean present_permissionTypeId = true && (isSetPermissionTypeId());
+      list.add(present_permissionTypeId);
+      if (present_permissionTypeId)
+        list.add(permissionTypeId);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(getListOfSharedUsers_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = 
Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetEntityId()) {
+        lastComparison = 
org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = 
Boolean.valueOf(isSetPermissionTypeId()).compareTo(other.isSetPermissionTypeId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPermissionTypeId()) {
+        lastComparison = 
org.apache.thrift.TBaseHelper.compareTo(this.permissionTypeId, 
other.permissionTypeId);
+        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("getListOfSharedUsers_args(");
+      boolean first = true;
+
+      sb.append("entityId:");
+      if (this.entityId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.entityId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("permissionTypeId:");
+      if (this.permissionTypeId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.permissionTypeId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (entityId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'entityId' was not present! Struct: " + toString());
+      }
+      if (permissionTypeId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'permissionTypeId' 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 getListOfSharedUsers_argsStandardSchemeFactory 
implements SchemeFactory {
+      public getListOfSharedUsers_argsStandardScheme getScheme() {
+        return new getListOfSharedUsers_argsStandardScheme();
+      }
+    }
+
+    private static class getListOfSharedUsers_argsStandardScheme extends 
StandardScheme<getListOfSharedUsers_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, 
getListOfSharedUsers_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_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) 
{
+                struct.entityId = iprot.readString();
+                struct.setEntityIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+              }
+              break;
+            case 2: // PERMISSION_TYPE_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) 
{
+                struct.permissionTypeId = iprot.readString();
+                struct.setPermissionTypeIdIsSet(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, 
getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.entityId != null) {
+          oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+          oprot.writeString(struct.entityId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.permissionTypeId != null) {
+          oprot.writeFieldBegin(PERMISSION_TYPE_ID_FIELD_DESC);
+          oprot.writeString(struct.permissionTypeId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getListOfSharedUsers_argsTupleSchemeFactory 
implements SchemeFactory {
+      public getListOfSharedUsers_argsTupleScheme getScheme() {
+        return new getListOfSharedUsers_argsTupleScheme();
+      }
+    }
+
+    private static class getListOfSharedUsers_argsTupleScheme extends 
TupleScheme<getListOfSharedUsers_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, 
getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.entityId);
+        oprot.writeString(struct.permissionTypeId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, 
getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.entityId = iprot.readString();
+        struct.setEntityIdIsSet(true);
+        struct.permissionTypeId = iprot.readString();
+        struct.setPermissionTypeIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class getListOfSharedUsers_result implements 
org.apache.thrift.TBase<getListOfSharedUsers_result, 
getListOfSharedUsers_result._Fields>, java.io.Serializable, Cloneable, 
Comparable<getListOfSharedUsers_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new 
org.apache.thrift.protocol.TStruct("getListOfSharedUsers_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC 
= new org.apache.thrift.protocol.TField("success", 
org.apache.thrift.protocol.TType.LIST, (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 
getListOfSharedUsers_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new 
getListOfSharedUsers_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> 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
+    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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new 
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
 org.apache.airavata.sharing.registry.models.User.class))));
+      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(getListOfSharedUsers_result.class,
 metaDataMap);
+    }
+
+    public getListOfSharedUsers_result() {
+    }
+
+    public getListOfSharedUsers_result(
+      List<org.apache.airavata.sharing.registry.models.User> success,
+      org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+    {
+      this();
+      this.success = success;
+      this.gre = gre;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getListOfSharedUsers_result(getListOfSharedUsers_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.sharing.registry.models.User> __this__success 
= new 
ArrayList<org.apache.airavata.sharing.registry.models.User>(other.success.size());
+        for (org.apache.airavata.sharing.registry.models.User other_element : 
other.success) {
+          __this__success.add(new 
org.apache.airavata.sharing.registry.models.User(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetGre()) {
+        this.gre = new 
org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+      }
+    }
+
+    public getListOfSharedUsers_result deepCopy() {
+      return new getListOfSharedUsers_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.gre = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public 
java.util.Iterator<org.apache.airavata.sharing.registry.models.User> 
getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.sharing.registry.models.User 
elem) {
+      if (this.success == null) {
+        this.success = new 
ArrayList<org.apache.airavata.sharing.registry.models.User>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> getSuccess() 
{
+      return this.success;
+    }
+
+    public getListOfSharedUsers_result 
setSuccess(List<org.apache.airavata.sharing.registry.models.User> 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.sharing.registry.models.GovRegistryException 
getGre() {
+      return this.gre;
+    }
+
+    public getListOfSharedUsers_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((List<org.apache.airavata.sharing.registry.models.User>)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 getSuccess();
+
+      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 getListOfSharedUsers_result)
+        return this.equals((getListOfSharedUsers_result)that);
+      return false;
+    }
+
+    public boolean equals(getListOfSharedUsers_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) {
+      

<TRUNCATED>

Reply via email to