in airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java [1826:2055]
public void read(org.apache.thrift.protocol.TProtocol iprot, ComputeResourceDescription 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: // COMPUTE_RESOURCE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.computeResourceId = iprot.readString();
struct.setComputeResourceIdIsSet(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: // HOST_ALIASES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
struct.hostAliases = new java.util.ArrayList<java.lang.String>(_list36.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem37;
for (int _i38 = 0; _i38 < _list36.size; ++_i38)
{
_elem37 = iprot.readString();
struct.hostAliases.add(_elem37);
}
iprot.readListEnd();
}
struct.setHostAliasesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // IP_ADDRESSES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list39 = iprot.readListBegin();
struct.ipAddresses = new java.util.ArrayList<java.lang.String>(_list39.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem40;
for (int _i41 = 0; _i41 < _list39.size; ++_i41)
{
_elem40 = iprot.readString();
struct.ipAddresses.add(_elem40);
}
iprot.readListEnd();
}
struct.setIpAddressesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // RESOURCE_DESCRIPTION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.resourceDescription = iprot.readString();
struct.setResourceDescriptionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // 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 7: // BATCH_QUEUES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
struct.batchQueues = new java.util.ArrayList<BatchQueue>(_list42.size);
@org.apache.thrift.annotation.Nullable BatchQueue _elem43;
for (int _i44 = 0; _i44 < _list42.size; ++_i44)
{
_elem43 = new BatchQueue();
_elem43.read(iprot);
struct.batchQueues.add(_elem43);
}
iprot.readListEnd();
}
struct.setBatchQueuesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // FILE_SYSTEMS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map45 = iprot.readMapBegin();
struct.fileSystems = new java.util.EnumMap<FileSystems,java.lang.String>(FileSystems.class);
@org.apache.thrift.annotation.Nullable FileSystems _key46;
@org.apache.thrift.annotation.Nullable java.lang.String _val47;
for (int _i48 = 0; _i48 < _map45.size; ++_i48)
{
_key46 = org.apache.airavata.model.appcatalog.computeresource.FileSystems.findByValue(iprot.readI32());
_val47 = iprot.readString();
if (_key46 != null)
{
struct.fileSystems.put(_key46, _val47);
}
}
iprot.readMapEnd();
}
struct.setFileSystemsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // JOB_SUBMISSION_INTERFACES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list49 = iprot.readListBegin();
struct.jobSubmissionInterfaces = new java.util.ArrayList<JobSubmissionInterface>(_list49.size);
@org.apache.thrift.annotation.Nullable JobSubmissionInterface _elem50;
for (int _i51 = 0; _i51 < _list49.size; ++_i51)
{
_elem50 = new JobSubmissionInterface();
_elem50.read(iprot);
struct.jobSubmissionInterfaces.add(_elem50);
}
iprot.readListEnd();
}
struct.setJobSubmissionInterfacesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // DATA_MOVEMENT_INTERFACES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
struct.dataMovementInterfaces = new java.util.ArrayList<org.apache.airavata.model.data.movement.DataMovementInterface>(_list52.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.data.movement.DataMovementInterface _elem53;
for (int _i54 = 0; _i54 < _list52.size; ++_i54)
{
_elem53 = new org.apache.airavata.model.data.movement.DataMovementInterface();
_elem53.read(iprot);
struct.dataMovementInterfaces.add(_elem53);
}
iprot.readListEnd();
}
struct.setDataMovementInterfacesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // MAX_MEMORY_PER_NODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.maxMemoryPerNode = iprot.readI32();
struct.setMaxMemoryPerNodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // GATEWAY_USAGE_REPORTING
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.gatewayUsageReporting = iprot.readBool();
struct.setGatewayUsageReportingIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // GATEWAY_USAGE_MODULE_LOAD_COMMAND
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayUsageModuleLoadCommand = iprot.readString();
struct.setGatewayUsageModuleLoadCommandIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // GATEWAY_USAGE_EXECUTABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayUsageExecutable = iprot.readString();
struct.setGatewayUsageExecutableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // CPUS_PER_NODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.cpusPerNode = iprot.readI32();
struct.setCpusPerNodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // DEFAULT_NODE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.defaultNodeCount = iprot.readI32();
struct.setDefaultNodeCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // DEFAULT_CPUCOUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.defaultCPUCount = iprot.readI32();
struct.setDefaultCPUCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 18: // DEFAULT_WALLTIME
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.defaultWalltime = iprot.readI32();
struct.setDefaultWalltimeIsSet(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();
}