@Override
 public void read(org.apache.thrift.protocol.TProtocol prot, StorageResourceDescription struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.storageResourceId = iprot.readString();
   struct.setStorageResourceIdIsSet(true);
   struct.hostName = iprot.readString();
   struct.setHostNameIsSet(true);
   BitSet incoming = iprot.readBitSet(3);
   if (incoming.get(0)) {
     struct.storageResourceDescription = iprot.readString();
     struct.setStorageResourceDescriptionIsSet(true);
   }
   if (incoming.get(1)) {
     struct.enabled = iprot.readBool();
     struct.setEnabledIsSet(true);
   }
   if (incoming.get(2)) {
     {
       org.apache.thrift.protocol.TList _list5 =
           new org.apache.thrift.protocol.TList(
               org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
       struct.dataMovementInterfaces =
           new ArrayList<org.apache.airavata.model.data.movement.DataMovementInterface>(
               _list5.size);
       org.apache.airavata.model.data.movement.DataMovementInterface _elem6;
       for (int _i7 = 0; _i7 < _list5.size; ++_i7) {
         _elem6 = new org.apache.airavata.model.data.movement.DataMovementInterface();
         _elem6.read(iprot);
         struct.dataMovementInterfaces.add(_elem6);
       }
     }
     struct.setDataMovementInterfacesIsSet(true);
   }
 }
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, StorageResourceDescription struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeString(struct.storageResourceId);
   oprot.writeString(struct.hostName);
   BitSet optionals = new BitSet();
   if (struct.isSetStorageResourceDescription()) {
     optionals.set(0);
   }
   if (struct.isSetEnabled()) {
     optionals.set(1);
   }
   if (struct.isSetDataMovementInterfaces()) {
     optionals.set(2);
   }
   oprot.writeBitSet(optionals, 3);
   if (struct.isSetStorageResourceDescription()) {
     oprot.writeString(struct.storageResourceDescription);
   }
   if (struct.isSetEnabled()) {
     oprot.writeBool(struct.enabled);
   }
   if (struct.isSetDataMovementInterfaces()) {
     {
       oprot.writeI32(struct.dataMovementInterfaces.size());
       for (org.apache.airavata.model.data.movement.DataMovementInterface _iter4 :
           struct.dataMovementInterfaces) {
         _iter4.write(oprot);
       }
     }
   }
 }
    public void write(org.apache.thrift.protocol.TProtocol oprot, StorageResourceDescription struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.storageResourceId != null) {
        oprot.writeFieldBegin(STORAGE_RESOURCE_ID_FIELD_DESC);
        oprot.writeString(struct.storageResourceId);
        oprot.writeFieldEnd();
      }
      if (struct.hostName != null) {
        oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
        oprot.writeString(struct.hostName);
        oprot.writeFieldEnd();
      }
      if (struct.storageResourceDescription != null) {
        if (struct.isSetStorageResourceDescription()) {
          oprot.writeFieldBegin(STORAGE_RESOURCE_DESCRIPTION_FIELD_DESC);
          oprot.writeString(struct.storageResourceDescription);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetEnabled()) {
        oprot.writeFieldBegin(ENABLED_FIELD_DESC);
        oprot.writeBool(struct.enabled);
        oprot.writeFieldEnd();
      }
      if (struct.dataMovementInterfaces != null) {
        if (struct.isSetDataMovementInterfaces()) {
          oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACES_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRUCT, struct.dataMovementInterfaces.size()));
            for (org.apache.airavata.model.data.movement.DataMovementInterface _iter3 :
                struct.dataMovementInterfaces) {
              _iter3.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
 public void read(org.apache.thrift.protocol.TProtocol iprot, StorageResourceDescription 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: // STORAGE_RESOURCE_ID
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.storageResourceId = iprot.readString();
           struct.setStorageResourceIdIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // HOST_NAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.hostName = iprot.readString();
           struct.setHostNameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // STORAGE_RESOURCE_DESCRIPTION
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.storageResourceDescription = iprot.readString();
           struct.setStorageResourceDescriptionIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // ENABLED
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.enabled = iprot.readBool();
           struct.setEnabledIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // DATA_MOVEMENT_INTERFACES
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
             struct.dataMovementInterfaces =
                 new ArrayList<org.apache.airavata.model.data.movement.DataMovementInterface>(
                     _list0.size);
             org.apache.airavata.model.data.movement.DataMovementInterface _elem1;
             for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
               _elem1 = new org.apache.airavata.model.data.movement.DataMovementInterface();
               _elem1.read(iprot);
               struct.dataMovementInterfaces.add(_elem1);
             }
             iprot.readListEnd();
           }
           struct.setDataMovementInterfacesIsSet(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();
   struct.validate();
 }