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/04 20:56:58 UTC

[2/3] airavata git commit: implementing user has access API method

http://git-wip-us.apache.org/repos/asf/airavata/blob/3c73df27/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 030f538..067450b 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
@@ -161,6 +161,8 @@ public class GovRegistryService {
 
     public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
 
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
   }
 
   public interface AsyncIface {
@@ -243,6 +245,8 @@ public class GovRegistryService {
 
     public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void userHasAccess(String domainId, String userId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
   }
 
   public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -1303,6 +1307,35 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result");
     }
 
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+    {
+      send_userHasAccess(domainId, userId, entityId, permissionTypeId);
+      return recv_userHasAccess();
+    }
+
+    public void send_userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    {
+      userHasAccess_args args = new userHasAccess_args();
+      args.setDomainId(domainId);
+      args.setUserId(userId);
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("userHasAccess", args);
+    }
+
+    public boolean recv_userHasAccess() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+    {
+      userHasAccess_result result = new userHasAccess_result();
+      receiveBase(result, "userHasAccess");
+      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, "userHasAccess 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> {
@@ -2650,6 +2683,47 @@ public class GovRegistryService {
       }
     }
 
+    public void userHasAccess(String domainId, String userId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      userHasAccess_call method_call = new userHasAccess_call(domainId, userId, entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class userHasAccess_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
+      private String userId;
+      private String entityId;
+      private String permissionTypeId;
+      public userHasAccess_call(String domainId, String userId, 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.domainId = domainId;
+        this.userId = userId;
+        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("userHasAccess", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        userHasAccess_args args = new userHasAccess_args();
+        args.setDomainId(domainId);
+        args.setUserId(userId);
+        args.setEntityId(entityId);
+        args.setPermissionTypeId(permissionTypeId);
+        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_userHasAccess();
+      }
+    }
+
   }
 
   public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -2702,6 +2776,7 @@ public class GovRegistryService {
       processMap.put("revokeEntitySharingFromUsers", new revokeEntitySharingFromUsers());
       processMap.put("shareEntityWithGroups", new shareEntityWithGroups());
       processMap.put("revokeEntitySharingFromGroups", new revokeEntitySharingFromGroups());
+      processMap.put("userHasAccess", new userHasAccess());
       return processMap;
     }
 
@@ -3657,6 +3732,31 @@ public class GovRegistryService {
       }
     }
 
+    public static class userHasAccess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, userHasAccess_args> {
+      public userHasAccess() {
+        super("userHasAccess");
+      }
+
+      public userHasAccess_args getEmptyArgsInstance() {
+        return new userHasAccess_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public userHasAccess_result getResult(I iface, userHasAccess_args args) throws org.apache.thrift.TException {
+        userHasAccess_result result = new userHasAccess_result();
+        try {
+          result.success = iface.userHasAccess(args.domainId, args.userId, args.entityId, args.permissionTypeId);
+          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> {
@@ -3709,6 +3809,7 @@ public class GovRegistryService {
       processMap.put("revokeEntitySharingFromUsers", new revokeEntitySharingFromUsers());
       processMap.put("shareEntityWithGroups", new shareEntityWithGroups());
       processMap.put("revokeEntitySharingFromGroups", new revokeEntitySharingFromGroups());
+      processMap.put("userHasAccess", new userHasAccess());
       return processMap;
     }
 
@@ -5949,386 +6050,82 @@ public class GovRegistryService {
       }
     }
 
-  }
-
-  public static class createDomain_args implements org.apache.thrift.TBase<createDomain_args, createDomain_args._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDomain_args");
-
-    private static final org.apache.thrift.protocol.TField DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("domain", 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 createDomain_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new createDomain_argsTupleSchemeFactory());
-    }
-
-    public org.apache.airavata.sharing.registry.models.Domain domain; // 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 {
-      DOMAIN((short)1, "domain");
-
-      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: // DOMAIN
-            return DOMAIN;
-          default:
-            return null;
-        }
+    public static class userHasAccess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, userHasAccess_args, Boolean> {
+      public userHasAccess() {
+        super("userHasAccess");
       }
 
-      /**
-       * 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;
+      public userHasAccess_args getEmptyArgsInstance() {
+        return new userHasAccess_args();
       }
 
-      /**
-       * 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.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.Domain.class)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDomain_args.class, metaDataMap);
-    }
-
-    public createDomain_args() {
-    }
-
-    public createDomain_args(
-      org.apache.airavata.sharing.registry.models.Domain domain)
-    {
-      this();
-      this.domain = domain;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public createDomain_args(createDomain_args other) {
-      if (other.isSetDomain()) {
-        this.domain = new org.apache.airavata.sharing.registry.models.Domain(other.domain);
-      }
-    }
-
-    public createDomain_args deepCopy() {
-      return new createDomain_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.domain = null;
-    }
-
-    public org.apache.airavata.sharing.registry.models.Domain getDomain() {
-      return this.domain;
-    }
-
-    public createDomain_args setDomain(org.apache.airavata.sharing.registry.models.Domain domain) {
-      this.domain = domain;
-      return this;
-    }
-
-    public void unsetDomain() {
-      this.domain = null;
-    }
-
-    /** Returns true if field domain is set (has been assigned a value) and false otherwise */
-    public boolean isSetDomain() {
-      return this.domain != null;
-    }
-
-    public void setDomainIsSet(boolean value) {
-      if (!value) {
-        this.domain = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case DOMAIN:
-        if (value == null) {
-          unsetDomain();
-        } else {
-          setDomain((org.apache.airavata.sharing.registry.models.Domain)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case DOMAIN:
-        return getDomain();
-
-      }
-      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 DOMAIN:
-        return isSetDomain();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof createDomain_args)
-        return this.equals((createDomain_args)that);
-      return false;
-    }
-
-    public boolean equals(createDomain_args that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_domain = true && this.isSetDomain();
-      boolean that_present_domain = true && that.isSetDomain();
-      if (this_present_domain || that_present_domain) {
-        if (!(this_present_domain && that_present_domain))
-          return false;
-        if (!this.domain.equals(that.domain))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      List<Object> list = new ArrayList<Object>();
-
-      boolean present_domain = true && (isSetDomain());
-      list.add(present_domain);
-      if (present_domain)
-        list.add(domain);
-
-      return list.hashCode();
-    }
-
-    @Override
-    public int compareTo(createDomain_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetDomain()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
-        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("createDomain_args(");
-      boolean first = true;
-
-      sb.append("domain:");
-      if (this.domain == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.domain);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-      if (domain == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domain' was not present! Struct: " + toString());
-      }
-      // check for sub-struct validity
-      if (domain != null) {
-        domain.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 createDomain_argsStandardSchemeFactory implements SchemeFactory {
-      public createDomain_argsStandardScheme getScheme() {
-        return new createDomain_argsStandardScheme();
-      }
-    }
-
-    private static class createDomain_argsStandardScheme extends StandardScheme<createDomain_args> {
-
-      public void read(org.apache.thrift.protocol.TProtocol iprot, createDomain_args struct) throws org.apache.thrift.TException {
-        org.apache.thrift.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            userHasAccess_result result = new userHasAccess_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();
           }
-          switch (schemeField.id) {
-            case 1: // DOMAIN
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
-                struct.domain.read(iprot);
-                struct.setDomainIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            userHasAccess_result result = new userHasAccess_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();
           }
-          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, createDomain_args struct) throws org.apache.thrift.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.domain != null) {
-          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
-          struct.domain.write(oprot);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
+      protected boolean isOneway() {
+        return false;
       }
 
-    }
-
-    private static class createDomain_argsTupleSchemeFactory implements SchemeFactory {
-      public createDomain_argsTupleScheme getScheme() {
-        return new createDomain_argsTupleScheme();
-      }
-    }
-
-    private static class createDomain_argsTupleScheme extends TupleScheme<createDomain_args> {
-
-      @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, createDomain_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.domain.write(oprot);
-      }
-
-      @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, createDomain_args struct) throws org.apache.thrift.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
-        struct.domain.read(iprot);
-        struct.setDomainIsSet(true);
+      public void start(I iface, userHasAccess_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.userHasAccess(args.domainId, args.userId, args.entityId, args.permissionTypeId,resultHandler);
       }
     }
 
   }
 
-  public static class createDomain_result implements org.apache.thrift.TBase<createDomain_result, createDomain_result._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDomain_result");
+  public static class createDomain_args implements org.apache.thrift.TBase<createDomain_args, createDomain_args._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDomain_args");
 
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-    private static final org.apache.thrift.protocol.TField GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("domain", 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 createDomain_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new createDomain_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new createDomain_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new createDomain_argsTupleSchemeFactory());
     }
 
-    public String success; // required
-    public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // required
+    public org.apache.airavata.sharing.registry.models.Domain domain; // 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");
+      DOMAIN((short)1, "domain");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -6343,10 +6140,372 @@ public class GovRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          case 1: // GRE
-            return GRE;
+          case 1: // DOMAIN
+            return DOMAIN;
+          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.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.Domain.class)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDomain_args.class, metaDataMap);
+    }
+
+    public createDomain_args() {
+    }
+
+    public createDomain_args(
+      org.apache.airavata.sharing.registry.models.Domain domain)
+    {
+      this();
+      this.domain = domain;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public createDomain_args(createDomain_args other) {
+      if (other.isSetDomain()) {
+        this.domain = new org.apache.airavata.sharing.registry.models.Domain(other.domain);
+      }
+    }
+
+    public createDomain_args deepCopy() {
+      return new createDomain_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.domain = null;
+    }
+
+    public org.apache.airavata.sharing.registry.models.Domain getDomain() {
+      return this.domain;
+    }
+
+    public createDomain_args setDomain(org.apache.airavata.sharing.registry.models.Domain domain) {
+      this.domain = domain;
+      return this;
+    }
+
+    public void unsetDomain() {
+      this.domain = null;
+    }
+
+    /** Returns true if field domain is set (has been assigned a value) and false otherwise */
+    public boolean isSetDomain() {
+      return this.domain != null;
+    }
+
+    public void setDomainIsSet(boolean value) {
+      if (!value) {
+        this.domain = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case DOMAIN:
+        if (value == null) {
+          unsetDomain();
+        } else {
+          setDomain((org.apache.airavata.sharing.registry.models.Domain)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case DOMAIN:
+        return getDomain();
+
+      }
+      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 DOMAIN:
+        return isSetDomain();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof createDomain_args)
+        return this.equals((createDomain_args)that);
+      return false;
+    }
+
+    public boolean equals(createDomain_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_domain = true && this.isSetDomain();
+      boolean that_present_domain = true && that.isSetDomain();
+      if (this_present_domain || that_present_domain) {
+        if (!(this_present_domain && that_present_domain))
+          return false;
+        if (!this.domain.equals(that.domain))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_domain = true && (isSetDomain());
+      list.add(present_domain);
+      if (present_domain)
+        list.add(domain);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(createDomain_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetDomain()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
+        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("createDomain_args(");
+      boolean first = true;
+
+      sb.append("domain:");
+      if (this.domain == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.domain);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (domain == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domain' was not present! Struct: " + toString());
+      }
+      // check for sub-struct validity
+      if (domain != null) {
+        domain.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 createDomain_argsStandardSchemeFactory implements SchemeFactory {
+      public createDomain_argsStandardScheme getScheme() {
+        return new createDomain_argsStandardScheme();
+      }
+    }
+
+    private static class createDomain_argsStandardScheme extends StandardScheme<createDomain_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, createDomain_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: // DOMAIN
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
+                struct.domain.read(iprot);
+                struct.setDomainIsSet(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, createDomain_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.domain != null) {
+          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
+          struct.domain.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class createDomain_argsTupleSchemeFactory implements SchemeFactory {
+      public createDomain_argsTupleScheme getScheme() {
+        return new createDomain_argsTupleScheme();
+      }
+    }
+
+    private static class createDomain_argsTupleScheme extends TupleScheme<createDomain_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, createDomain_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        struct.domain.write(oprot);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, createDomain_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
+        struct.domain.read(iprot);
+        struct.setDomainIsSet(true);
+      }
+    }
+
+  }
+
+  public static class createDomain_result implements org.apache.thrift.TBase<createDomain_result, createDomain_result._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDomain_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+    private static final org.apache.thrift.protocol.TField 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 createDomain_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new createDomain_resultTupleSchemeFactory());
+    }
+
+    public String 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;
         }
@@ -36436,23 +36595,1118 @@ public class GovRegistryService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("getPermissionTypes_args(");
+      StringBuilder sb = new StringBuilder("getPermissionTypes_args(");
+      boolean first = true;
+
+      sb.append("domain:");
+      if (this.domain == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.domain);
+      }
+      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 (domain == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domain' 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 getPermissionTypes_argsStandardSchemeFactory implements SchemeFactory {
+      public getPermissionTypes_argsStandardScheme getScheme() {
+        return new getPermissionTypes_argsStandardScheme();
+      }
+    }
+
+    private static class getPermissionTypes_argsStandardScheme extends StandardScheme<getPermissionTypes_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionTypes_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: // DOMAIN
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.domain = iprot.readString();
+                struct.setDomainIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // 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 3: // 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, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.domain != null) {
+          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
+          oprot.writeString(struct.domain);
+          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 getPermissionTypes_argsTupleSchemeFactory implements SchemeFactory {
+      public getPermissionTypes_argsTupleScheme getScheme() {
+        return new getPermissionTypes_argsTupleScheme();
+      }
+    }
+
+    private static class getPermissionTypes_argsTupleScheme extends TupleScheme<getPermissionTypes_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.domain);
+        oprot.writeI32(struct.offset);
+        oprot.writeI32(struct.limit);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.domain = iprot.readString();
+        struct.setDomainIsSet(true);
+        struct.offset = iprot.readI32();
+        struct.setOffsetIsSet(true);
+        struct.limit = iprot.readI32();
+        struct.setLimitIsSet(true);
+      }
+    }
+
+  }
+
+  public static class getPermissionTypes_result implements org.apache.thrift.TBase<getPermissionTypes_result, getPermissionTypes_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPermissionTypes_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionTypes_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 getPermissionTypes_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getPermissionTypes_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> 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.PermissionType.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(getPermissionTypes_result.class, metaDataMap);
+    }
+
+    public getPermissionTypes_result() {
+    }
+
+    public getPermissionTypes_result(
+      List<org.apache.airavata.sharing.registry.models.PermissionType> 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 getPermissionTypes_result(getPermissionTypes_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.sharing.registry.models.PermissionType> __this__success = new ArrayList<org.apache.airavata.sharing.registry.models.PermissionType>(other.success.size());
+        for (org.apache.airavata.sharing.registry.models.PermissionType other_element : other.success) {
+          __this__success.add(new org.apache.airavata.sharing.registry.models.PermissionType(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetGre()) {
+        this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+      }
+    }
+
+    public getPermissionTypes_result deepCopy() {
+      return new getPermissionTypes_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.PermissionType> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.sharing.registry.models.PermissionType elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<org.apache.airavata.sharing.registry.models.PermissionType>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> getSuccess() {
+      return this.success;
+    }
+
+    public getPermissionTypes_result setSuccess(List<org.apache.airavata.sharing.registry.models.PermissionType> 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 getPermissionTypes_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.PermissionType>)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 getPermissionTypes_result)
+        return this.equals((getPermissionTypes_result)that);
+      return false;
+    }
+
+    public boolean equals(getPermissionTypes_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(getPermissionTypes_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("getPermissionTypes_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 getPermissionTypes_resultStandardSchemeFactory implements SchemeFactory {
+      public getPermissionTypes_resultStandardScheme getScheme() {
+        return new getPermissionTypes_resultStandardScheme();
+      }
+    }
+
+    private static class getPermissionTypes_resultStandardScheme extends StandardScheme<getPermissionTypes_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionTypes_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 _list76 = iprot.readListBegin();
+                  struct.success = new ArrayList<org.apache.airavata.sharing.registry.models.PermissionType>(_list76.size);
+                  org.apache.airavata.sharing.registry.models.PermissionType _elem77;
+                  for (int _i78 = 0; _i78 < _list76.size; ++_i78)
+                  {
+                    _elem77 = new org.apache.airavata.sharing.registry.models.PermissionType();
+                    _elem77.read(iprot);
+                    struct.success.add(_elem77);
+                  }
+                  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, getPermissionTypes_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.PermissionType _iter79 : struct.success)
+            {
+              _iter79.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 getPermissionTypes_resultTupleSchemeFactory implements SchemeFactory {
+      public getPermissionTypes_resultTupleScheme getScheme() {
+        return new getPermissionTypes_resultTupleScheme();
+      }
+    }
+
+    private static class getPermissionTypes_resultTupleScheme extends TupleScheme<getPermissionTypes_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionTypes_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.PermissionType _iter80 : struct.success)
+            {
+              _iter80.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetGre()) {
+          struct.gre.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionTypes_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 _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<org.apache.airavata.sharing.registry.models.PermissionType>(_list81.size);
+            org.apache.airavata.sharing.registry.models.PermissionType _elem82;
+            for (int _i83 = 0; _i83 < _list81.size; ++_i83)
+            {
+              _elem82 = new org.apache.airavata.sharing.registry.models.PermissionType();
+              _elem82.read(iprot);
+              struct.success.add(_elem82);
+            }
+          }
+          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 shareEntityWithUsers_args implements org.apache.thrift.TBase<shareEntityWithUsers_args, shareEntityWithUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<shareEntityWithUsers_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shareEntityWithUsers_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 USER_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("userList", org.apache.thrift.protocol.TType.LIST, (short)2);
+    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new shareEntityWithUsers_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new shareEntityWithUsers_argsTupleSchemeFactory());
+    }
+
+    public String entityId; // required
+    public List<String> userList; // required
+    public String perssionTypeId; // 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"),
+      USER_LIST((short)2, "userList"),
+      PERSSION_TYPE_ID((short)3, "perssionTypeId");
+
+      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: // USER_LIST
+            return USER_LIST;
+          case 3: // PERSSION_TYPE_ID
+            return PERSSION_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.USER_LIST, new org.apache.thrift.meta_data.FieldMetaData("userList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+      tmpMap.put(_Fields.PERSSION_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("perssionTypeId", 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(shareEntityWithUsers_args.class, metaDataMap);
+    }
+
+    public shareEntityWithUsers_args() {
+    }
+
+    public shareEntityWithUsers_args(
+      String entityId,
+      List<String> userList,
+      String perssionTypeId)
+    {
+      this();
+      this.entityId = entityId;
+      this.userList = userList;
+      this.perssionTypeId = perssionTypeId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public shareEntityWithUsers_args(shareEntityWithUsers_args other) {
+      if (other.isSetEntityId()) {
+        this.entityId = other.entityId;
+      }
+      if (other.isSetUserList()) {
+        List<String> __this__userList = new ArrayList<String>(other.userList);
+        this.userList = __this__userList;
+      }
+      if (other.isSetPerssionTypeId()) {
+        this.perssionTypeId = other.perssionTypeId;
+      }
+    }
+
+    public shareEntityWithUsers_args deepCopy() {
+      return new shareEntityWithUsers_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.entityId = null;
+      this.userList = null;
+      this.perssionTypeId = null;
+    }
+
+    public String getEntityId() {
+      return this.entityId;
+    }
+
+    public shareEntityWithUsers_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 int getUserListSize() {
+      return (this.userList == null) ? 0 : this.userList.size();
+    }
+
+    public java.util.Iterator<String> getUserListIterator() {
+      return (this.userList == null) ? null : this.userList.iterator();
+    }
+
+    public void addToUserList(String elem) {
+      if (this.userList == null) {
+        this.userList = new ArrayList<String>();
+      }
+      this.userList.add(elem);
+    }
+
+    public List<String> getUserList() {
+      return this.userList;
+    }
+
+    public shareEntityWithUsers_args setUserList(List<String> userList) {
+      this.userList = userList;
+      return this;
+    }
+
+    public void unsetUserList() {
+      this.userList = null;
+    }
+
+    /** Returns true if field userList is set (has been assigned a value) and false otherwise */
+    public boolean isSetUserList() {
+      return this.userList != null;
+    }
+
+    public void setUserListIsSet(boolean value) {
+      if (!value) {
+        this.userList = null;
+      }
+    }
+
+    public String getPerssionTypeId() {
+      return this.perssionTypeId;
+    }
+
+    public shareEntityWithUsers_args setPerssionTypeId(String perssionTypeId) {
+      this.perssionTypeId = perssionTypeId;
+      return this;
+    }
+
+    public void unsetPerssionTypeId() {
+      this.perssionTypeId = null;
+    }
+
+    /** Returns true if field perssionTypeId is set (has been assigned a value) and false otherwise */
+    public boolean isSetPerssionTypeId() {
+      return this.perssionTypeId != null;
+    }
+
+    public void setPerssionTypeIdIsSet(boolean value) {
+      if (!value) {
+        this.perssionTypeId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case ENTITY_ID:
+        if (value == null) {
+          unsetEntityId();
+        } else {
+          setEntityId((String)value);
+        }
+        break;
+
+      case USER_LIST:
+        if (value == null) {
+          unsetUserList();
+        } else {
+          setUserList((List<String>)value);
+        }
+        break;
+
+      case PERSSION_TYPE_ID:
+        if (value == null) {
+          unsetPerssionTypeId();
+        } else {
+          setPerssionTypeId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case ENTITY_ID:
+        return getEntityId();
+
+      case USER_LIST:
+        return getUserList();
+
+      case PERSSION_TYPE_ID:
+        return getPerssionTypeId();
+
+      }
+      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 USER_LIST:
+        return isSetUserList();
+      case PERSSION_TYPE_ID:
+        return isSetPerssionTypeId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof shareEntityWithUsers_args)
+        return this.equals((shareEntityWithUsers_args)that);
+      return false;
+    }
+
+    public boolean equals(shareEntityWithUsers_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_userList = true && this.isSetUserList();
+      boolean that_present_userList = true && that.isSetUserList();
+      if (this_present_userList || that_present_userList) {
+        if (!(this_present_userList && that_present_userList))
+          return false;
+        if (!this.userList.equals(that.userList))
+          return false;
+      }
+
+      boolean this_present_perssionTypeId = true && this.isSetPerssionTypeId();
+      boolean that_present_perssionTypeId = true && that.isSetPerssionTypeId();
+      if (this_present_perssionTypeId || that_present_perssionTypeId) {
+        if (!(this_present_perssionTypeId && that_present_perssionTypeId))
+          return false;
+        if (!this.perssionTypeId.equals(that.perssionTypeId))
+          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_userList = true && (isSetUserList());
+      list.add(present_userList);
+      if (present_userList)
+        list.add(userList);
+
+      boolean present_perssionTypeId = true && (isSetPerssionTypeId());
+      list.add(present_perssionTypeId);
+      if (present_perssionTypeId)
+        list.add(perssionTypeId);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(shareEntityWithUsers_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(isSetUserList()).compareTo(other.isSetUserList());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetUserList()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userList, other.userList);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetPerssionTypeId()).compareTo(other.isSetPerssionTypeId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPerssionTypeId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.perssionTypeId, other.perssionTypeId);
+        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("shareEntityWithUsers_args(");
       boolean first = true;
 
-      sb.append("domain:");
-      if (this.domain == null) {
+      sb.append("entityId:");
+      if (this.entityId == null) {
         sb.append("null");
       } else {
-        sb.append(this.domain);
+        sb.append(this.entityId);
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("offset:");
-      sb.append(this.offset);
+      sb.append("userList:");
+      if (this.userList == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.userList);
+      }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("limit:");
-      sb.append(this.limit);
+      sb.append("perssionTypeId:");
+      if (this.perssionTypeId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.perssionTypeId);
+      }
       first = false;
       sb.append(")");
       return sb.toString();
@@ -36460,11 +37714,15 @@ public class GovRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (domain == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domain' was not present! Struct: " + toString());
+      if (entityId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityId' was not present! Struct: " + toString());
+      }
+      if (userList == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'userList' was not present! Struct: " + toString());
+      }
+      if (perssionTypeId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'perssionTypeId' 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
     }
 
@@ -36478,23 +37736,21 @@ public class GovRegistryService {
 
     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 getPermissionTypes_argsStandardSchemeFactory implements SchemeFactory {
-      public getPermissionTypes_argsStandardScheme getScheme() {
-        return new getPermissionTypes_argsStandardScheme();
+    private static class shareEntityWithUsers_argsStandardSchemeFactory implements SchemeFactory {
+      public shareEntityWithUsers_argsStandardScheme getScheme() {
+        return new shareEntityWithUsers_argsStandardScheme();
       }
     }
 
-    private static class getPermissionTypes_argsStandardScheme extends StandardScheme<getPermissionTypes_args> {
+    private static class shareEntityWithUsers_argsStandardScheme extends StandardScheme<shareEntityWithUsers_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, shareEntityWithUsers_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -36504,26 +37760,36 @@ public class GovRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // DOMAIN
+            case 1: // ENTITY_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.domain = iprot.readString();
-                struct.setDomainIsSet(true);
+                struct.entityId = iprot.readString();
+                struct.setEntityIdIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // OFFSET
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.offset = iprot.readI32();
-                struct.setOffsetIsSet(true);
+            case 2: // USER_LIST
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list84 = iprot.readListBegin();
+                  struct.userList = new ArrayList<String>(_list84.size);
+                  String _elem85;
+                  for (int _i86 = 0; _i86 < _list84.size; ++_i86)
+                  {
+                    _elem85 = iprot.readString();
+                    struct.userList.add(_elem85);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setUserListIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 3: // LIMIT
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.limit = iprot.readI32();
-                struct.setLimitIsSet(true);
+            case 3: // PERSSION_TYPE_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.perssionTypeId = iprot.readString();
+                struct.setPerssionTypeIdIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -36536,79 +37802,99 @@ public class GovRegistryService {
         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, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, shareEntityWithUsers_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.domain != null) {
-          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
-          oprot.writeString(struct.domain);
+        if (struct.entityId != null) {
+          oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+          oprot.writeString(struct.entityId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.userList != null) {
+          oprot.writeFieldBegin(USER_LIST_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.userList.size()));
+            for (String _iter87 : struct.userList)
+            {
+              oprot.writeString(_iter87);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.perssionTypeId != null) {
+          oprot.writeFieldBegin(PERSSION_TYPE_ID_FIELD_DESC);
+          oprot.writeString(struct.perssionTypeId);
           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 getPermissionTypes_argsTupleSchemeFactory implements SchemeFactory {
-      public getPermissionTypes_argsTupleScheme getScheme() {
-        return new getPermissionTypes_argsTupleScheme();
+    private static class shareEntityWithUsers_argsTupleSchemeFactory implements SchemeFactory {
+      public shareEntityWithUsers_argsTupleScheme getScheme() {
+        return new shareEntityWithUsers_argsTupleScheme();
       }
     }
 
-    private static class getPermissionTypes_argsTupleScheme extends TupleScheme<getPermissionTypes_args> {
+    private static class shareEntityWithUsers_argsTupleScheme extends TupleScheme<shareEntityWithUsers_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, shareEntityWithUsers_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        oprot.writeString(struct.domain);
-        oprot.writeI32(struct.offset);
-        oprot.writeI32(struct.limit);
+        oprot.writeString(struct.entityId);
+        {
+          oprot.writeI32(struct.userList.size());
+          for (String _iter88 : struct.userList)
+          {
+            oprot.writeString(_iter88);
+          }
+        }
+        oprot.writeString(struct.perssionTypeId);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionTypes_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, shareEntityWithUsers_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.domain = iprot.readString();
-        struct.setDomainIsSet(true);
-        struct.offset = iprot.readI32();
-        struct.setOffsetIsSet(true);
-        struct.limit = iprot.readI32();
-        struct.setLimitIsSet(true);
+        struct.entityId = iprot.readString();
+        struct.setEntityIdIsSet(true);
+        {
+          org.apache.thrift.protocol.TList _list89 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.userList = new ArrayList<String>(_list89.size);
+          String _elem90;
+          for (int _i91 = 0; _i91 < _list89.size; ++_i91)
+          {
+            _elem90 = iprot.readString();
+            struct.userList.add(_elem90);
+          }
+        }
+        struct.setUserListIsSet(true);
+        struct.perssionTypeId = iprot.readString();
+        struct.setPerssionTypeIdIsSet(true);
       }
     }
 
   }
 
-  public static class getPermissionTypes_result implements org.apache.thrift.TBase<getPermissionTypes_result, getPermissionTypes_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPermissionTypes_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionTypes_result");
+  public static class shareEntityWithUsers_result implements org.apache.thrift.TBase<shareEntityWithUsers_result, shareEntityWithUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<shareEntityWithUsers_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrif

<TRUNCATED>