Merge pull request #255 from vivekshresta/develop

Changes to accommodate UserStorageQuota in StoragePreferences
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/appcatalog/gatewayprofile/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/appcatalog/gatewayprofile/ttypes.py
index 6908a39..1866336 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/appcatalog/gatewayprofile/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/appcatalog/gatewayprofile/ttypes.py
@@ -322,6 +322,7 @@
      - loginUserName
      - fileSystemRootLocation
      - resourceSpecificCredentialStoreToken
+     - userStorageQuota
     """
 
     thrift_spec = (
@@ -330,13 +331,15 @@
         (2, TType.STRING, 'loginUserName', 'UTF8', None, ),  # 2
         (3, TType.STRING, 'fileSystemRootLocation', 'UTF8', None, ),  # 3
         (4, TType.STRING, 'resourceSpecificCredentialStoreToken', 'UTF8', None, ),  # 4
+        (5, TType.I64, 'userStorageQuota', None, None, ),  # 5
     )
 
-    def __init__(self, storageResourceId=None, loginUserName=None, fileSystemRootLocation=None, resourceSpecificCredentialStoreToken=None,):
+    def __init__(self, storageResourceId=None, loginUserName=None, fileSystemRootLocation=None, resourceSpecificCredentialStoreToken=None, userStorageQuota=None,):
         self.storageResourceId = storageResourceId
         self.loginUserName = loginUserName
         self.fileSystemRootLocation = fileSystemRootLocation
         self.resourceSpecificCredentialStoreToken = resourceSpecificCredentialStoreToken
+        self.userStorageQuota = userStorageQuota
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -367,6 +370,11 @@
                     self.resourceSpecificCredentialStoreToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                 else:
                     iprot.skip(ftype)
+            elif fid == 5:
+                if ftype == TType.I64:
+                    self.userStorageQuota = iprot.readI64()
+                else:
+                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -393,6 +401,10 @@
             oprot.writeFieldBegin('resourceSpecificCredentialStoreToken', TType.STRING, 4)
             oprot.writeString(self.resourceSpecificCredentialStoreToken.encode('utf-8') if sys.version_info[0] == 2 else self.resourceSpecificCredentialStoreToken)
             oprot.writeFieldEnd()
+        if self.userStorageQuota is not None:
+            oprot.writeFieldBegin('userStorageQuota', TType.I64, 5)
+            oprot.writeI64(self.userStorageQuota)
+            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
index b8754ed..992736f 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
@@ -32,6 +32,7 @@
   private static final org.apache.thrift.protocol.TField LOGIN_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("loginUserName", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField FILE_SYSTEM_ROOT_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSystemRootLocation", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSpecificCredentialStoreToken", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField USER_STORAGE_QUOTA_FIELD_DESC = new org.apache.thrift.protocol.TField("userStorageQuota", org.apache.thrift.protocol.TType.I64, (short)5);
 
   private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StoragePreferenceStandardSchemeFactory();
   private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StoragePreferenceTupleSchemeFactory();
@@ -40,13 +41,15 @@
   private java.lang.String loginUserName; // optional
   private java.lang.String fileSystemRootLocation; // optional
   private java.lang.String resourceSpecificCredentialStoreToken; // optional
+  private long userStorageQuota; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     STORAGE_RESOURCE_ID((short)1, "storageResourceId"),
     LOGIN_USER_NAME((short)2, "loginUserName"),
     FILE_SYSTEM_ROOT_LOCATION((short)3, "fileSystemRootLocation"),
-    RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN((short)4, "resourceSpecificCredentialStoreToken");
+    RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN((short)4, "resourceSpecificCredentialStoreToken"),
+    USER_STORAGE_QUOTA((short)5, "userStorageQuota");
 
     private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
 
@@ -69,6 +72,8 @@
           return FILE_SYSTEM_ROOT_LOCATION;
         case 4: // RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN
           return RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN;
+        case 5: // USER_STORAGE_QUOTA
+          return USER_STORAGE_QUOTA;
         default:
           return null;
       }
@@ -109,7 +114,9 @@
   }
 
   // isset id assignments
-  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.FILE_SYSTEM_ROOT_LOCATION,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN};
+  private static final int __USERSTORAGEQUOTA_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.FILE_SYSTEM_ROOT_LOCATION,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USER_STORAGE_QUOTA};
   public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -121,6 +128,8 @@
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("resourceSpecificCredentialStoreToken", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.USER_STORAGE_QUOTA, new org.apache.thrift.meta_data.FieldMetaData("userStorageQuota", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StoragePreference.class, metaDataMap);
   }
@@ -139,6 +148,7 @@
    * Performs a deep copy on <i>other</i>.
    */
   public StoragePreference(StoragePreference other) {
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetStorageResourceId()) {
       this.storageResourceId = other.storageResourceId;
     }
@@ -151,6 +161,7 @@
     if (other.isSetResourceSpecificCredentialStoreToken()) {
       this.resourceSpecificCredentialStoreToken = other.resourceSpecificCredentialStoreToken;
     }
+    this.userStorageQuota = other.userStorageQuota;
   }
 
   public StoragePreference deepCopy() {
@@ -163,6 +174,8 @@
     this.loginUserName = null;
     this.fileSystemRootLocation = null;
     this.resourceSpecificCredentialStoreToken = null;
+    setUserStorageQuotaIsSet(false);
+    this.userStorageQuota = 0;
   }
 
   public java.lang.String getStorageResourceId() {
@@ -257,6 +270,28 @@
     }
   }
 
+  public long getUserStorageQuota() {
+    return this.userStorageQuota;
+  }
+
+  public void setUserStorageQuota(long userStorageQuota) {
+    this.userStorageQuota = userStorageQuota;
+    setUserStorageQuotaIsSet(true);
+  }
+
+  public void unsetUserStorageQuota() {
+    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USERSTORAGEQUOTA_ISSET_ID);
+  }
+
+  /** Returns true if field userStorageQuota is set (has been assigned a value) and false otherwise */
+  public boolean isSetUserStorageQuota() {
+    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USERSTORAGEQUOTA_ISSET_ID);
+  }
+
+  public void setUserStorageQuotaIsSet(boolean value) {
+    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USERSTORAGEQUOTA_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, java.lang.Object value) {
     switch (field) {
     case STORAGE_RESOURCE_ID:
@@ -291,6 +326,14 @@
       }
       break;
 
+    case USER_STORAGE_QUOTA:
+      if (value == null) {
+        unsetUserStorageQuota();
+      } else {
+        setUserStorageQuota((java.lang.Long)value);
+      }
+      break;
+
     }
   }
 
@@ -308,6 +351,9 @@
     case RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN:
       return getResourceSpecificCredentialStoreToken();
 
+    case USER_STORAGE_QUOTA:
+      return getUserStorageQuota();
+
     }
     throw new java.lang.IllegalStateException();
   }
@@ -327,6 +373,8 @@
       return isSetFileSystemRootLocation();
     case RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN:
       return isSetResourceSpecificCredentialStoreToken();
+    case USER_STORAGE_QUOTA:
+      return isSetUserStorageQuota();
     }
     throw new java.lang.IllegalStateException();
   }
@@ -382,6 +430,15 @@
         return false;
     }
 
+    boolean this_present_userStorageQuota = true && this.isSetUserStorageQuota();
+    boolean that_present_userStorageQuota = true && that.isSetUserStorageQuota();
+    if (this_present_userStorageQuota || that_present_userStorageQuota) {
+      if (!(this_present_userStorageQuota && that_present_userStorageQuota))
+        return false;
+      if (this.userStorageQuota != that.userStorageQuota)
+        return false;
+    }
+
     return true;
   }
 
@@ -405,6 +462,10 @@
     if (isSetResourceSpecificCredentialStoreToken())
       hashCode = hashCode * 8191 + resourceSpecificCredentialStoreToken.hashCode();
 
+    hashCode = hashCode * 8191 + ((isSetUserStorageQuota()) ? 131071 : 524287);
+    if (isSetUserStorageQuota())
+      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(userStorageQuota);
+
     return hashCode;
   }
 
@@ -456,6 +517,16 @@
         return lastComparison;
       }
     }
+    lastComparison = java.lang.Boolean.valueOf(isSetUserStorageQuota()).compareTo(other.isSetUserStorageQuota());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUserStorageQuota()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userStorageQuota, other.userStorageQuota);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -513,6 +584,12 @@
       }
       first = false;
     }
+    if (isSetUserStorageQuota()) {
+      if (!first) sb.append(", ");
+      sb.append("userStorageQuota:");
+      sb.append(this.userStorageQuota);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -536,6 +613,8 @@
 
   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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);
@@ -592,6 +671,14 @@
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 5: // USER_STORAGE_QUOTA
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.userStorageQuota = iprot.readI64();
+              struct.setUserStorageQuotaIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -631,6 +718,11 @@
           oprot.writeFieldEnd();
         }
       }
+      if (struct.isSetUserStorageQuota()) {
+        oprot.writeFieldBegin(USER_STORAGE_QUOTA_FIELD_DESC);
+        oprot.writeI64(struct.userStorageQuota);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -659,7 +751,10 @@
       if (struct.isSetResourceSpecificCredentialStoreToken()) {
         optionals.set(2);
       }
-      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetUserStorageQuota()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
       if (struct.isSetLoginUserName()) {
         oprot.writeString(struct.loginUserName);
       }
@@ -669,6 +764,9 @@
       if (struct.isSetResourceSpecificCredentialStoreToken()) {
         oprot.writeString(struct.resourceSpecificCredentialStoreToken);
       }
+      if (struct.isSetUserStorageQuota()) {
+        oprot.writeI64(struct.userStorageQuota);
+      }
     }
 
     @Override
@@ -676,7 +774,7 @@
       org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
       struct.storageResourceId = iprot.readString();
       struct.setStorageResourceIdIsSet(true);
-      java.util.BitSet incoming = iprot.readBitSet(3);
+      java.util.BitSet incoming = iprot.readBitSet(4);
       if (incoming.get(0)) {
         struct.loginUserName = iprot.readString();
         struct.setLoginUserNameIsSet(true);
@@ -689,6 +787,10 @@
         struct.resourceSpecificCredentialStoreToken = iprot.readString();
         struct.setResourceSpecificCredentialStoreTokenIsSet(true);
       }
+      if (incoming.get(3)) {
+        struct.userStorageQuota = iprot.readI64();
+        struct.setUserStorageQuotaIsSet(true);
+      }
     }
   }
 
diff --git a/modules/ide-integration/src/main/resources/database_scripts/init/01-databases.sql b/modules/ide-integration/src/main/resources/database_scripts/init/01-databases.sql
index 4ac2531..d4c51ad 100644
--- a/modules/ide-integration/src/main/resources/database_scripts/init/01-databases.sql
+++ b/modules/ide-integration/src/main/resources/database_scripts/init/01-databases.sql
@@ -1560,6 +1560,7 @@
   `GATEWAY_ID` varchar(255) NOT NULL,
   `STORAGE_RESOURCE_ID` varchar(255) NOT NULL,
   `LOGIN_USERNAME` varchar(255) DEFAULT NULL,
+  `USER_STORAGE_QUOTA` bigint(20) DEFAULT 0,
   `FS_ROOT_LOCATION` varchar(255) DEFAULT NULL,
   `RESOURCE_CS_TOKEN` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`GATEWAY_ID`,`STORAGE_RESOURCE_ID`),
@@ -1573,7 +1574,7 @@
 
 LOCK TABLES `STORAGE_PREFERENCE` WRITE;
 /*!40000 ALTER TABLE `STORAGE_PREFERENCE` DISABLE KEYS */;
-INSERT INTO `STORAGE_PREFERENCE` VALUES ('default','airavata.host_77116e91-f042-4d3a-ab9c-3e7b4ebcd5bd','root','/var/www/portals/gateway-user-data','46a99a5a-8b55-4982-bfd7-90fe72b00d46');
+INSERT INTO `STORAGE_PREFERENCE` VALUES ('default','airavata.host_77116e91-f042-4d3a-ab9c-3e7b4ebcd5bd','root', 0,'/var/www/portals/gateway-user-data','46a99a5a-8b55-4982-bfd7-90fe72b00d46');
 /*!40000 ALTER TABLE `STORAGE_PREFERENCE` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git a/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql b/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql
index 0119ceb..d77d507 100644
--- a/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql
+++ b/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql
@@ -14,3 +14,18 @@
 alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION;
 alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_START_TIME;
 alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_END_TIME;
+
+-- AIRAVATA-3343: Add UserStorageQuota entry to StoragePreferences table
+SET @AddUserStorageQuota = (SELECT IF(
+    (SELECT COUNT(*)
+        FROM INFORMATION_SCHEMA.COLUMNS
+        WHERE table_name = 'STORAGE_PREFERENCE'
+        AND column_name = 'USER_STORAGE_QUOTA'
+    ) > 0,
+    "SELECT 1",
+    "ALTER TABLE STORAGE_PREFERENCE ADD USER_STORAGE_QUOTA BIGINT DEFAULT 0"
+));
+
+PREPARE stmt FROM @AddUserStorageQuota;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StoragePreferenceEntity.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StoragePreferenceEntity.java
index 8031b8f..c7c8c16 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StoragePreferenceEntity.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StoragePreferenceEntity.java
@@ -40,6 +40,9 @@
     @Id
     private String storageResourceId;
 
+    @Column(name = "USER_STORAGE_QUOTA")
+    private Long userStorageQuota;
+
     @Column(name = "FS_ROOT_LOCATION")
     private String fileSystemRootLocation;
 
@@ -103,4 +106,12 @@
     public void setGatewayProfileResource(GatewayProfileEntity gatewayProfileResource) {
         this.gatewayProfileResource = gatewayProfileResource;
     }
+
+    public Long getUserStorageQuota() {
+        return userStorageQuota;
+    }
+
+    public void setUserStorageQuota(Long userStorageQuota) {
+        this.userStorageQuota = userStorageQuota;
+    }
 }
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index ab1bcab..3e77f16 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -511,6 +511,7 @@
         GATEWAY_ID VARCHAR(255) NOT NULL,
         STORAGE_RESOURCE_ID VARCHAR(255) NOT NULL,
         LOGIN_USERNAME VARCHAR(255),
+        USER_STORAGE_QUOTA BIGINT DEFAULT 0,
         FS_ROOT_LOCATION VARCHAR(255),
         RESOURCE_CS_TOKEN VARCHAR(255),
         PRIMARY KEY(GATEWAY_ID,STORAGE_RESOURCE_ID),
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 9ee940b..2ac71f6 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -504,6 +504,7 @@
         GATEWAY_ID VARCHAR(255) NOT NULL,
         STORAGE_RESOURCE_ID VARCHAR(255) NOT NULL,
         LOGIN_USERNAME VARCHAR(255),
+        USER_STORAGE_QUOTA BIGINT DEFAULT 0,
         FS_ROOT_LOCATION VARCHAR(255),
         RESOURCE_CS_TOKEN VARCHAR(255),
         PRIMARY KEY(GATEWAY_ID,STORAGE_RESOURCE_ID),
diff --git a/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
index 8092f44..d0dbb6d 100644
--- a/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
@@ -24,3 +24,6 @@
 alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION;
 alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_START_TIME;
 alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_END_TIME;
+
+-- AIRAVATA-3343: Add UserStorageQuota entry to StoragePreferences table
+alter table STORAGE_PREFERENCE add column IF NOT EXISTS USER_STORAGE_QUOTA BIGINT(20);
\ No newline at end of file
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index b5ad3ac..b60a786 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -85,7 +85,8 @@
     1: required string storageResourceId,
     2: optional string loginUserName,
     3: optional string fileSystemRootLocation,
-    4: optional string resourceSpecificCredentialStoreToken
+    4: optional string resourceSpecificCredentialStoreToken,
+    5: optional i64 userStorageQuota
 }
 
 /**