@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); } }
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(); }