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