| /** |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * Autogenerated by Thrift Compiler (0.18.1) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.airavata.model.job; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") |
| public class JobModel implements org.apache.thrift.TBase<JobModel, JobModel._Fields>, java.io.Serializable, Cloneable, Comparable<JobModel> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobModel"); |
| |
| private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobId", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2); |
| private static final org.apache.thrift.protocol.TField PROCESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("processId", org.apache.thrift.protocol.TType.STRING, (short)3); |
| private static final org.apache.thrift.protocol.TField JOB_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDescription", org.apache.thrift.protocol.TType.STRING, (short)4); |
| private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)5); |
| private static final org.apache.thrift.protocol.TField JOB_STATUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStatuses", org.apache.thrift.protocol.TType.LIST, (short)6); |
| private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_CONSUMED_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceConsumed", org.apache.thrift.protocol.TType.STRING, (short)7); |
| private static final org.apache.thrift.protocol.TField JOB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobName", org.apache.thrift.protocol.TType.STRING, (short)8); |
| private static final org.apache.thrift.protocol.TField WORKING_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("workingDir", org.apache.thrift.protocol.TType.STRING, (short)9); |
| private static final org.apache.thrift.protocol.TField STD_OUT_FIELD_DESC = new org.apache.thrift.protocol.TField("stdOut", org.apache.thrift.protocol.TType.STRING, (short)10); |
| private static final org.apache.thrift.protocol.TField STD_ERR_FIELD_DESC = new org.apache.thrift.protocol.TField("stdErr", org.apache.thrift.protocol.TType.STRING, (short)11); |
| private static final org.apache.thrift.protocol.TField EXIT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("exitCode", org.apache.thrift.protocol.TType.I32, (short)12); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new JobModelStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new JobModelTupleSchemeFactory(); |
| |
| private @org.apache.thrift.annotation.Nullable java.lang.String jobId; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String taskId; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String processId; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String jobDescription; // required |
| private long creationTime; // optional |
| private @org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.status.JobStatus> jobStatuses; // optional |
| private @org.apache.thrift.annotation.Nullable java.lang.String computeResourceConsumed; // optional |
| private @org.apache.thrift.annotation.Nullable java.lang.String jobName; // optional |
| private @org.apache.thrift.annotation.Nullable java.lang.String workingDir; // optional |
| private @org.apache.thrift.annotation.Nullable java.lang.String stdOut; // optional |
| private @org.apache.thrift.annotation.Nullable java.lang.String stdErr; // optional |
| private int exitCode; // 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 { |
| JOB_ID((short)1, "jobId"), |
| TASK_ID((short)2, "taskId"), |
| PROCESS_ID((short)3, "processId"), |
| JOB_DESCRIPTION((short)4, "jobDescription"), |
| CREATION_TIME((short)5, "creationTime"), |
| JOB_STATUSES((short)6, "jobStatuses"), |
| COMPUTE_RESOURCE_CONSUMED((short)7, "computeResourceConsumed"), |
| JOB_NAME((short)8, "jobName"), |
| WORKING_DIR((short)9, "workingDir"), |
| STD_OUT((short)10, "stdOut"), |
| STD_ERR((short)11, "stdErr"), |
| EXIT_CODE((short)12, "exitCode"); |
| |
| private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); |
| |
| static { |
| for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // JOB_ID |
| return JOB_ID; |
| case 2: // TASK_ID |
| return TASK_ID; |
| case 3: // PROCESS_ID |
| return PROCESS_ID; |
| case 4: // JOB_DESCRIPTION |
| return JOB_DESCRIPTION; |
| case 5: // CREATION_TIME |
| return CREATION_TIME; |
| case 6: // JOB_STATUSES |
| return JOB_STATUSES; |
| case 7: // COMPUTE_RESOURCE_CONSUMED |
| return COMPUTE_RESOURCE_CONSUMED; |
| case 8: // JOB_NAME |
| return JOB_NAME; |
| case 9: // WORKING_DIR |
| return WORKING_DIR; |
| case 10: // STD_OUT |
| return STD_OUT; |
| case 11: // STD_ERR |
| return STD_ERR; |
| case 12: // EXIT_CODE |
| return EXIT_CODE; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public static _Fields findByName(java.lang.String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final java.lang.String _fieldName; |
| |
| _Fields(short thriftId, java.lang.String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| @Override |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| @Override |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final int __CREATIONTIME_ISSET_ID = 0; |
| private static final int __EXITCODE_ISSET_ID = 1; |
| private byte __isset_bitfield = 0; |
| private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.JOB_STATUSES,_Fields.COMPUTE_RESOURCE_CONSUMED,_Fields.JOB_NAME,_Fields.WORKING_DIR,_Fields.STD_OUT,_Fields.STD_ERR,_Fields.EXIT_CODE}; |
| 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); |
| tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobId", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.PROCESS_ID, new org.apache.thrift.meta_data.FieldMetaData("processId", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.JOB_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("jobDescription", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); |
| tmpMap.put(_Fields.JOB_STATUSES, new org.apache.thrift.meta_data.FieldMetaData("jobStatuses", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, |
| new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.status.JobStatus.class)))); |
| tmpMap.put(_Fields.COMPUTE_RESOURCE_CONSUMED, new org.apache.thrift.meta_data.FieldMetaData("computeResourceConsumed", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.JOB_NAME, new org.apache.thrift.meta_data.FieldMetaData("jobName", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.WORKING_DIR, new org.apache.thrift.meta_data.FieldMetaData("workingDir", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.STD_OUT, new org.apache.thrift.meta_data.FieldMetaData("stdOut", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.STD_ERR, new org.apache.thrift.meta_data.FieldMetaData("stdErr", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.EXIT_CODE, new org.apache.thrift.meta_data.FieldMetaData("exitCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobModel.class, metaDataMap); |
| } |
| |
| public JobModel() { |
| } |
| |
| public JobModel( |
| java.lang.String jobId, |
| java.lang.String taskId, |
| java.lang.String processId, |
| java.lang.String jobDescription) |
| { |
| this(); |
| this.jobId = jobId; |
| this.taskId = taskId; |
| this.processId = processId; |
| this.jobDescription = jobDescription; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public JobModel(JobModel other) { |
| __isset_bitfield = other.__isset_bitfield; |
| if (other.isSetJobId()) { |
| this.jobId = other.jobId; |
| } |
| if (other.isSetTaskId()) { |
| this.taskId = other.taskId; |
| } |
| if (other.isSetProcessId()) { |
| this.processId = other.processId; |
| } |
| if (other.isSetJobDescription()) { |
| this.jobDescription = other.jobDescription; |
| } |
| this.creationTime = other.creationTime; |
| if (other.isSetJobStatuses()) { |
| java.util.List<org.apache.airavata.model.status.JobStatus> __this__jobStatuses = new java.util.ArrayList<org.apache.airavata.model.status.JobStatus>(other.jobStatuses.size()); |
| for (org.apache.airavata.model.status.JobStatus other_element : other.jobStatuses) { |
| __this__jobStatuses.add(new org.apache.airavata.model.status.JobStatus(other_element)); |
| } |
| this.jobStatuses = __this__jobStatuses; |
| } |
| if (other.isSetComputeResourceConsumed()) { |
| this.computeResourceConsumed = other.computeResourceConsumed; |
| } |
| if (other.isSetJobName()) { |
| this.jobName = other.jobName; |
| } |
| if (other.isSetWorkingDir()) { |
| this.workingDir = other.workingDir; |
| } |
| if (other.isSetStdOut()) { |
| this.stdOut = other.stdOut; |
| } |
| if (other.isSetStdErr()) { |
| this.stdErr = other.stdErr; |
| } |
| this.exitCode = other.exitCode; |
| } |
| |
| @Override |
| public JobModel deepCopy() { |
| return new JobModel(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.jobId = null; |
| this.taskId = null; |
| this.processId = null; |
| this.jobDescription = null; |
| setCreationTimeIsSet(false); |
| this.creationTime = 0; |
| this.jobStatuses = null; |
| this.computeResourceConsumed = null; |
| this.jobName = null; |
| this.workingDir = null; |
| this.stdOut = null; |
| this.stdErr = null; |
| setExitCodeIsSet(false); |
| this.exitCode = 0; |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getJobId() { |
| return this.jobId; |
| } |
| |
| public void setJobId(@org.apache.thrift.annotation.Nullable java.lang.String jobId) { |
| this.jobId = jobId; |
| } |
| |
| public void unsetJobId() { |
| this.jobId = null; |
| } |
| |
| /** Returns true if field jobId is set (has been assigned a value) and false otherwise */ |
| public boolean isSetJobId() { |
| return this.jobId != null; |
| } |
| |
| public void setJobIdIsSet(boolean value) { |
| if (!value) { |
| this.jobId = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getTaskId() { |
| return this.taskId; |
| } |
| |
| public void setTaskId(@org.apache.thrift.annotation.Nullable java.lang.String taskId) { |
| this.taskId = taskId; |
| } |
| |
| public void unsetTaskId() { |
| this.taskId = null; |
| } |
| |
| /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ |
| public boolean isSetTaskId() { |
| return this.taskId != null; |
| } |
| |
| public void setTaskIdIsSet(boolean value) { |
| if (!value) { |
| this.taskId = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getProcessId() { |
| return this.processId; |
| } |
| |
| public void setProcessId(@org.apache.thrift.annotation.Nullable java.lang.String processId) { |
| this.processId = processId; |
| } |
| |
| public void unsetProcessId() { |
| this.processId = null; |
| } |
| |
| /** Returns true if field processId is set (has been assigned a value) and false otherwise */ |
| public boolean isSetProcessId() { |
| return this.processId != null; |
| } |
| |
| public void setProcessIdIsSet(boolean value) { |
| if (!value) { |
| this.processId = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getJobDescription() { |
| return this.jobDescription; |
| } |
| |
| public void setJobDescription(@org.apache.thrift.annotation.Nullable java.lang.String jobDescription) { |
| this.jobDescription = jobDescription; |
| } |
| |
| public void unsetJobDescription() { |
| this.jobDescription = null; |
| } |
| |
| /** Returns true if field jobDescription is set (has been assigned a value) and false otherwise */ |
| public boolean isSetJobDescription() { |
| return this.jobDescription != null; |
| } |
| |
| public void setJobDescriptionIsSet(boolean value) { |
| if (!value) { |
| this.jobDescription = null; |
| } |
| } |
| |
| public long getCreationTime() { |
| return this.creationTime; |
| } |
| |
| public void setCreationTime(long creationTime) { |
| this.creationTime = creationTime; |
| setCreationTimeIsSet(true); |
| } |
| |
| public void unsetCreationTime() { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID); |
| } |
| |
| /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */ |
| public boolean isSetCreationTime() { |
| return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID); |
| } |
| |
| public void setCreationTimeIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value); |
| } |
| |
| public int getJobStatusesSize() { |
| return (this.jobStatuses == null) ? 0 : this.jobStatuses.size(); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.Iterator<org.apache.airavata.model.status.JobStatus> getJobStatusesIterator() { |
| return (this.jobStatuses == null) ? null : this.jobStatuses.iterator(); |
| } |
| |
| public void addToJobStatuses(org.apache.airavata.model.status.JobStatus elem) { |
| if (this.jobStatuses == null) { |
| this.jobStatuses = new java.util.ArrayList<org.apache.airavata.model.status.JobStatus>(); |
| } |
| this.jobStatuses.add(elem); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.List<org.apache.airavata.model.status.JobStatus> getJobStatuses() { |
| return this.jobStatuses; |
| } |
| |
| public void setJobStatuses(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.status.JobStatus> jobStatuses) { |
| this.jobStatuses = jobStatuses; |
| } |
| |
| public void unsetJobStatuses() { |
| this.jobStatuses = null; |
| } |
| |
| /** Returns true if field jobStatuses is set (has been assigned a value) and false otherwise */ |
| public boolean isSetJobStatuses() { |
| return this.jobStatuses != null; |
| } |
| |
| public void setJobStatusesIsSet(boolean value) { |
| if (!value) { |
| this.jobStatuses = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getComputeResourceConsumed() { |
| return this.computeResourceConsumed; |
| } |
| |
| public void setComputeResourceConsumed(@org.apache.thrift.annotation.Nullable java.lang.String computeResourceConsumed) { |
| this.computeResourceConsumed = computeResourceConsumed; |
| } |
| |
| public void unsetComputeResourceConsumed() { |
| this.computeResourceConsumed = null; |
| } |
| |
| /** Returns true if field computeResourceConsumed is set (has been assigned a value) and false otherwise */ |
| public boolean isSetComputeResourceConsumed() { |
| return this.computeResourceConsumed != null; |
| } |
| |
| public void setComputeResourceConsumedIsSet(boolean value) { |
| if (!value) { |
| this.computeResourceConsumed = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getJobName() { |
| return this.jobName; |
| } |
| |
| public void setJobName(@org.apache.thrift.annotation.Nullable java.lang.String jobName) { |
| this.jobName = jobName; |
| } |
| |
| public void unsetJobName() { |
| this.jobName = null; |
| } |
| |
| /** Returns true if field jobName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetJobName() { |
| return this.jobName != null; |
| } |
| |
| public void setJobNameIsSet(boolean value) { |
| if (!value) { |
| this.jobName = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getWorkingDir() { |
| return this.workingDir; |
| } |
| |
| public void setWorkingDir(@org.apache.thrift.annotation.Nullable java.lang.String workingDir) { |
| this.workingDir = workingDir; |
| } |
| |
| public void unsetWorkingDir() { |
| this.workingDir = null; |
| } |
| |
| /** Returns true if field workingDir is set (has been assigned a value) and false otherwise */ |
| public boolean isSetWorkingDir() { |
| return this.workingDir != null; |
| } |
| |
| public void setWorkingDirIsSet(boolean value) { |
| if (!value) { |
| this.workingDir = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getStdOut() { |
| return this.stdOut; |
| } |
| |
| public void setStdOut(@org.apache.thrift.annotation.Nullable java.lang.String stdOut) { |
| this.stdOut = stdOut; |
| } |
| |
| public void unsetStdOut() { |
| this.stdOut = null; |
| } |
| |
| /** Returns true if field stdOut is set (has been assigned a value) and false otherwise */ |
| public boolean isSetStdOut() { |
| return this.stdOut != null; |
| } |
| |
| public void setStdOutIsSet(boolean value) { |
| if (!value) { |
| this.stdOut = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getStdErr() { |
| return this.stdErr; |
| } |
| |
| public void setStdErr(@org.apache.thrift.annotation.Nullable java.lang.String stdErr) { |
| this.stdErr = stdErr; |
| } |
| |
| public void unsetStdErr() { |
| this.stdErr = null; |
| } |
| |
| /** Returns true if field stdErr is set (has been assigned a value) and false otherwise */ |
| public boolean isSetStdErr() { |
| return this.stdErr != null; |
| } |
| |
| public void setStdErrIsSet(boolean value) { |
| if (!value) { |
| this.stdErr = null; |
| } |
| } |
| |
| public int getExitCode() { |
| return this.exitCode; |
| } |
| |
| public void setExitCode(int exitCode) { |
| this.exitCode = exitCode; |
| setExitCodeIsSet(true); |
| } |
| |
| public void unsetExitCode() { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXITCODE_ISSET_ID); |
| } |
| |
| /** Returns true if field exitCode is set (has been assigned a value) and false otherwise */ |
| public boolean isSetExitCode() { |
| return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXITCODE_ISSET_ID); |
| } |
| |
| public void setExitCodeIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXITCODE_ISSET_ID, value); |
| } |
| |
| @Override |
| public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { |
| switch (field) { |
| case JOB_ID: |
| if (value == null) { |
| unsetJobId(); |
| } else { |
| setJobId((java.lang.String)value); |
| } |
| break; |
| |
| case TASK_ID: |
| if (value == null) { |
| unsetTaskId(); |
| } else { |
| setTaskId((java.lang.String)value); |
| } |
| break; |
| |
| case PROCESS_ID: |
| if (value == null) { |
| unsetProcessId(); |
| } else { |
| setProcessId((java.lang.String)value); |
| } |
| break; |
| |
| case JOB_DESCRIPTION: |
| if (value == null) { |
| unsetJobDescription(); |
| } else { |
| setJobDescription((java.lang.String)value); |
| } |
| break; |
| |
| case CREATION_TIME: |
| if (value == null) { |
| unsetCreationTime(); |
| } else { |
| setCreationTime((java.lang.Long)value); |
| } |
| break; |
| |
| case JOB_STATUSES: |
| if (value == null) { |
| unsetJobStatuses(); |
| } else { |
| setJobStatuses((java.util.List<org.apache.airavata.model.status.JobStatus>)value); |
| } |
| break; |
| |
| case COMPUTE_RESOURCE_CONSUMED: |
| if (value == null) { |
| unsetComputeResourceConsumed(); |
| } else { |
| setComputeResourceConsumed((java.lang.String)value); |
| } |
| break; |
| |
| case JOB_NAME: |
| if (value == null) { |
| unsetJobName(); |
| } else { |
| setJobName((java.lang.String)value); |
| } |
| break; |
| |
| case WORKING_DIR: |
| if (value == null) { |
| unsetWorkingDir(); |
| } else { |
| setWorkingDir((java.lang.String)value); |
| } |
| break; |
| |
| case STD_OUT: |
| if (value == null) { |
| unsetStdOut(); |
| } else { |
| setStdOut((java.lang.String)value); |
| } |
| break; |
| |
| case STD_ERR: |
| if (value == null) { |
| unsetStdErr(); |
| } else { |
| setStdErr((java.lang.String)value); |
| } |
| break; |
| |
| case EXIT_CODE: |
| if (value == null) { |
| unsetExitCode(); |
| } else { |
| setExitCode((java.lang.Integer)value); |
| } |
| break; |
| |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| @Override |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case JOB_ID: |
| return getJobId(); |
| |
| case TASK_ID: |
| return getTaskId(); |
| |
| case PROCESS_ID: |
| return getProcessId(); |
| |
| case JOB_DESCRIPTION: |
| return getJobDescription(); |
| |
| case CREATION_TIME: |
| return getCreationTime(); |
| |
| case JOB_STATUSES: |
| return getJobStatuses(); |
| |
| case COMPUTE_RESOURCE_CONSUMED: |
| return getComputeResourceConsumed(); |
| |
| case JOB_NAME: |
| return getJobName(); |
| |
| case WORKING_DIR: |
| return getWorkingDir(); |
| |
| case STD_OUT: |
| return getStdOut(); |
| |
| case STD_ERR: |
| return getStdErr(); |
| |
| case EXIT_CODE: |
| return getExitCode(); |
| |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| @Override |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case JOB_ID: |
| return isSetJobId(); |
| case TASK_ID: |
| return isSetTaskId(); |
| case PROCESS_ID: |
| return isSetProcessId(); |
| case JOB_DESCRIPTION: |
| return isSetJobDescription(); |
| case CREATION_TIME: |
| return isSetCreationTime(); |
| case JOB_STATUSES: |
| return isSetJobStatuses(); |
| case COMPUTE_RESOURCE_CONSUMED: |
| return isSetComputeResourceConsumed(); |
| case JOB_NAME: |
| return isSetJobName(); |
| case WORKING_DIR: |
| return isSetWorkingDir(); |
| case STD_OUT: |
| return isSetStdOut(); |
| case STD_ERR: |
| return isSetStdErr(); |
| case EXIT_CODE: |
| return isSetExitCode(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that instanceof JobModel) |
| return this.equals((JobModel)that); |
| return false; |
| } |
| |
| public boolean equals(JobModel that) { |
| if (that == null) |
| return false; |
| if (this == that) |
| return true; |
| |
| boolean this_present_jobId = true && this.isSetJobId(); |
| boolean that_present_jobId = true && that.isSetJobId(); |
| if (this_present_jobId || that_present_jobId) { |
| if (!(this_present_jobId && that_present_jobId)) |
| return false; |
| if (!this.jobId.equals(that.jobId)) |
| return false; |
| } |
| |
| boolean this_present_taskId = true && this.isSetTaskId(); |
| boolean that_present_taskId = true && that.isSetTaskId(); |
| if (this_present_taskId || that_present_taskId) { |
| if (!(this_present_taskId && that_present_taskId)) |
| return false; |
| if (!this.taskId.equals(that.taskId)) |
| return false; |
| } |
| |
| boolean this_present_processId = true && this.isSetProcessId(); |
| boolean that_present_processId = true && that.isSetProcessId(); |
| if (this_present_processId || that_present_processId) { |
| if (!(this_present_processId && that_present_processId)) |
| return false; |
| if (!this.processId.equals(that.processId)) |
| return false; |
| } |
| |
| boolean this_present_jobDescription = true && this.isSetJobDescription(); |
| boolean that_present_jobDescription = true && that.isSetJobDescription(); |
| if (this_present_jobDescription || that_present_jobDescription) { |
| if (!(this_present_jobDescription && that_present_jobDescription)) |
| return false; |
| if (!this.jobDescription.equals(that.jobDescription)) |
| return false; |
| } |
| |
| boolean this_present_creationTime = true && this.isSetCreationTime(); |
| boolean that_present_creationTime = true && that.isSetCreationTime(); |
| if (this_present_creationTime || that_present_creationTime) { |
| if (!(this_present_creationTime && that_present_creationTime)) |
| return false; |
| if (this.creationTime != that.creationTime) |
| return false; |
| } |
| |
| boolean this_present_jobStatuses = true && this.isSetJobStatuses(); |
| boolean that_present_jobStatuses = true && that.isSetJobStatuses(); |
| if (this_present_jobStatuses || that_present_jobStatuses) { |
| if (!(this_present_jobStatuses && that_present_jobStatuses)) |
| return false; |
| if (!this.jobStatuses.equals(that.jobStatuses)) |
| return false; |
| } |
| |
| boolean this_present_computeResourceConsumed = true && this.isSetComputeResourceConsumed(); |
| boolean that_present_computeResourceConsumed = true && that.isSetComputeResourceConsumed(); |
| if (this_present_computeResourceConsumed || that_present_computeResourceConsumed) { |
| if (!(this_present_computeResourceConsumed && that_present_computeResourceConsumed)) |
| return false; |
| if (!this.computeResourceConsumed.equals(that.computeResourceConsumed)) |
| return false; |
| } |
| |
| boolean this_present_jobName = true && this.isSetJobName(); |
| boolean that_present_jobName = true && that.isSetJobName(); |
| if (this_present_jobName || that_present_jobName) { |
| if (!(this_present_jobName && that_present_jobName)) |
| return false; |
| if (!this.jobName.equals(that.jobName)) |
| return false; |
| } |
| |
| boolean this_present_workingDir = true && this.isSetWorkingDir(); |
| boolean that_present_workingDir = true && that.isSetWorkingDir(); |
| if (this_present_workingDir || that_present_workingDir) { |
| if (!(this_present_workingDir && that_present_workingDir)) |
| return false; |
| if (!this.workingDir.equals(that.workingDir)) |
| return false; |
| } |
| |
| boolean this_present_stdOut = true && this.isSetStdOut(); |
| boolean that_present_stdOut = true && that.isSetStdOut(); |
| if (this_present_stdOut || that_present_stdOut) { |
| if (!(this_present_stdOut && that_present_stdOut)) |
| return false; |
| if (!this.stdOut.equals(that.stdOut)) |
| return false; |
| } |
| |
| boolean this_present_stdErr = true && this.isSetStdErr(); |
| boolean that_present_stdErr = true && that.isSetStdErr(); |
| if (this_present_stdErr || that_present_stdErr) { |
| if (!(this_present_stdErr && that_present_stdErr)) |
| return false; |
| if (!this.stdErr.equals(that.stdErr)) |
| return false; |
| } |
| |
| boolean this_present_exitCode = true && this.isSetExitCode(); |
| boolean that_present_exitCode = true && that.isSetExitCode(); |
| if (this_present_exitCode || that_present_exitCode) { |
| if (!(this_present_exitCode && that_present_exitCode)) |
| return false; |
| if (this.exitCode != that.exitCode) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetJobId()) ? 131071 : 524287); |
| if (isSetJobId()) |
| hashCode = hashCode * 8191 + jobId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetTaskId()) ? 131071 : 524287); |
| if (isSetTaskId()) |
| hashCode = hashCode * 8191 + taskId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetProcessId()) ? 131071 : 524287); |
| if (isSetProcessId()) |
| hashCode = hashCode * 8191 + processId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetJobDescription()) ? 131071 : 524287); |
| if (isSetJobDescription()) |
| hashCode = hashCode * 8191 + jobDescription.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287); |
| if (isSetCreationTime()) |
| hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime); |
| |
| hashCode = hashCode * 8191 + ((isSetJobStatuses()) ? 131071 : 524287); |
| if (isSetJobStatuses()) |
| hashCode = hashCode * 8191 + jobStatuses.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetComputeResourceConsumed()) ? 131071 : 524287); |
| if (isSetComputeResourceConsumed()) |
| hashCode = hashCode * 8191 + computeResourceConsumed.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetJobName()) ? 131071 : 524287); |
| if (isSetJobName()) |
| hashCode = hashCode * 8191 + jobName.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetWorkingDir()) ? 131071 : 524287); |
| if (isSetWorkingDir()) |
| hashCode = hashCode * 8191 + workingDir.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetStdOut()) ? 131071 : 524287); |
| if (isSetStdOut()) |
| hashCode = hashCode * 8191 + stdOut.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetStdErr()) ? 131071 : 524287); |
| if (isSetStdErr()) |
| hashCode = hashCode * 8191 + stdErr.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetExitCode()) ? 131071 : 524287); |
| if (isSetExitCode()) |
| hashCode = hashCode * 8191 + exitCode; |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(JobModel other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.compare(isSetJobId(), other.isSetJobId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetJobId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobId, other.jobId); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetTaskId(), other.isSetTaskId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetTaskId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetProcessId(), other.isSetProcessId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetProcessId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processId, other.processId); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetJobDescription(), other.isSetJobDescription()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetJobDescription()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobDescription, other.jobDescription); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetCreationTime(), other.isSetCreationTime()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetCreationTime()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetJobStatuses(), other.isSetJobStatuses()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetJobStatuses()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStatuses, other.jobStatuses); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetComputeResourceConsumed(), other.isSetComputeResourceConsumed()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetComputeResourceConsumed()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceConsumed, other.computeResourceConsumed); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetJobName(), other.isSetJobName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetJobName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobName, other.jobName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetWorkingDir(), other.isSetWorkingDir()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetWorkingDir()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workingDir, other.workingDir); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetStdOut(), other.isSetStdOut()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetStdOut()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stdOut, other.stdOut); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetStdErr(), other.isSetStdErr()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetStdErr()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stdErr, other.stdErr); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetExitCode(), other.isSetExitCode()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetExitCode()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exitCode, other.exitCode); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| @Override |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| scheme(oprot).write(oprot, this); |
| } |
| |
| @Override |
| public java.lang.String toString() { |
| java.lang.StringBuilder sb = new java.lang.StringBuilder("JobModel("); |
| boolean first = true; |
| |
| sb.append("jobId:"); |
| if (this.jobId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.jobId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("taskId:"); |
| if (this.taskId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.taskId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("processId:"); |
| if (this.processId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.processId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("jobDescription:"); |
| if (this.jobDescription == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.jobDescription); |
| } |
| first = false; |
| if (isSetCreationTime()) { |
| if (!first) sb.append(", "); |
| sb.append("creationTime:"); |
| sb.append(this.creationTime); |
| first = false; |
| } |
| if (isSetJobStatuses()) { |
| if (!first) sb.append(", "); |
| sb.append("jobStatuses:"); |
| if (this.jobStatuses == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.jobStatuses); |
| } |
| first = false; |
| } |
| if (isSetComputeResourceConsumed()) { |
| if (!first) sb.append(", "); |
| sb.append("computeResourceConsumed:"); |
| if (this.computeResourceConsumed == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.computeResourceConsumed); |
| } |
| first = false; |
| } |
| if (isSetJobName()) { |
| if (!first) sb.append(", "); |
| sb.append("jobName:"); |
| if (this.jobName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.jobName); |
| } |
| first = false; |
| } |
| if (isSetWorkingDir()) { |
| if (!first) sb.append(", "); |
| sb.append("workingDir:"); |
| if (this.workingDir == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.workingDir); |
| } |
| first = false; |
| } |
| if (isSetStdOut()) { |
| if (!first) sb.append(", "); |
| sb.append("stdOut:"); |
| if (this.stdOut == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.stdOut); |
| } |
| first = false; |
| } |
| if (isSetStdErr()) { |
| if (!first) sb.append(", "); |
| sb.append("stdErr:"); |
| if (this.stdErr == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.stdErr); |
| } |
| first = false; |
| } |
| if (isSetExitCode()) { |
| if (!first) sb.append(", "); |
| sb.append("exitCode:"); |
| sb.append(this.exitCode); |
| first = false; |
| } |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (!isSetJobId()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobId' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetTaskId()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetProcessId()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetJobDescription()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobDescription' is unset! Struct:" + toString()); |
| } |
| |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| 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); |
| } |
| } |
| |
| private static class JobModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public JobModelStandardScheme getScheme() { |
| return new JobModelStandardScheme(); |
| } |
| } |
| |
| private static class JobModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<JobModel> { |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot, JobModel 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: // JOB_ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.jobId = iprot.readString(); |
| struct.setJobIdIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // TASK_ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.taskId = iprot.readString(); |
| struct.setTaskIdIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // PROCESS_ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.processId = iprot.readString(); |
| struct.setProcessIdIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // JOB_DESCRIPTION |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.jobDescription = iprot.readString(); |
| struct.setJobDescriptionIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 5: // CREATION_TIME |
| if (schemeField.type == org.apache.thrift.protocol.TType.I64) { |
| struct.creationTime = iprot.readI64(); |
| struct.setCreationTimeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 6: // JOB_STATUSES |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); |
| struct.jobStatuses = new java.util.ArrayList<org.apache.airavata.model.status.JobStatus>(_list0.size); |
| @org.apache.thrift.annotation.Nullable org.apache.airavata.model.status.JobStatus _elem1; |
| for (int _i2 = 0; _i2 < _list0.size; ++_i2) |
| { |
| _elem1 = new org.apache.airavata.model.status.JobStatus(); |
| _elem1.read(iprot); |
| struct.jobStatuses.add(_elem1); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setJobStatusesIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 7: // COMPUTE_RESOURCE_CONSUMED |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.computeResourceConsumed = iprot.readString(); |
| struct.setComputeResourceConsumedIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 8: // JOB_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.jobName = iprot.readString(); |
| struct.setJobNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 9: // WORKING_DIR |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.workingDir = iprot.readString(); |
| struct.setWorkingDirIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 10: // STD_OUT |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.stdOut = iprot.readString(); |
| struct.setStdOutIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 11: // STD_ERR |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.stdErr = iprot.readString(); |
| struct.setStdErrIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 12: // EXIT_CODE |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.exitCode = iprot.readI32(); |
| struct.setExitCodeIsSet(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(); |
| } |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol oprot, JobModel struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.jobId != null) { |
| oprot.writeFieldBegin(JOB_ID_FIELD_DESC); |
| oprot.writeString(struct.jobId); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.taskId != null) { |
| oprot.writeFieldBegin(TASK_ID_FIELD_DESC); |
| oprot.writeString(struct.taskId); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.processId != null) { |
| oprot.writeFieldBegin(PROCESS_ID_FIELD_DESC); |
| oprot.writeString(struct.processId); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.jobDescription != null) { |
| oprot.writeFieldBegin(JOB_DESCRIPTION_FIELD_DESC); |
| oprot.writeString(struct.jobDescription); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetCreationTime()) { |
| oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC); |
| oprot.writeI64(struct.creationTime); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.jobStatuses != null) { |
| if (struct.isSetJobStatuses()) { |
| oprot.writeFieldBegin(JOB_STATUSES_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.jobStatuses.size())); |
| for (org.apache.airavata.model.status.JobStatus _iter3 : struct.jobStatuses) |
| { |
| _iter3.write(oprot); |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.computeResourceConsumed != null) { |
| if (struct.isSetComputeResourceConsumed()) { |
| oprot.writeFieldBegin(COMPUTE_RESOURCE_CONSUMED_FIELD_DESC); |
| oprot.writeString(struct.computeResourceConsumed); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.jobName != null) { |
| if (struct.isSetJobName()) { |
| oprot.writeFieldBegin(JOB_NAME_FIELD_DESC); |
| oprot.writeString(struct.jobName); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.workingDir != null) { |
| if (struct.isSetWorkingDir()) { |
| oprot.writeFieldBegin(WORKING_DIR_FIELD_DESC); |
| oprot.writeString(struct.workingDir); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.stdOut != null) { |
| if (struct.isSetStdOut()) { |
| oprot.writeFieldBegin(STD_OUT_FIELD_DESC); |
| oprot.writeString(struct.stdOut); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.stdErr != null) { |
| if (struct.isSetStdErr()) { |
| oprot.writeFieldBegin(STD_ERR_FIELD_DESC); |
| oprot.writeString(struct.stdErr); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetExitCode()) { |
| oprot.writeFieldBegin(EXIT_CODE_FIELD_DESC); |
| oprot.writeI32(struct.exitCode); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class JobModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public JobModelTupleScheme getScheme() { |
| return new JobModelTupleScheme(); |
| } |
| } |
| |
| private static class JobModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<JobModel> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, JobModel struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| oprot.writeString(struct.jobId); |
| oprot.writeString(struct.taskId); |
| oprot.writeString(struct.processId); |
| oprot.writeString(struct.jobDescription); |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetCreationTime()) { |
| optionals.set(0); |
| } |
| if (struct.isSetJobStatuses()) { |
| optionals.set(1); |
| } |
| if (struct.isSetComputeResourceConsumed()) { |
| optionals.set(2); |
| } |
| if (struct.isSetJobName()) { |
| optionals.set(3); |
| } |
| if (struct.isSetWorkingDir()) { |
| optionals.set(4); |
| } |
| if (struct.isSetStdOut()) { |
| optionals.set(5); |
| } |
| if (struct.isSetStdErr()) { |
| optionals.set(6); |
| } |
| if (struct.isSetExitCode()) { |
| optionals.set(7); |
| } |
| oprot.writeBitSet(optionals, 8); |
| if (struct.isSetCreationTime()) { |
| oprot.writeI64(struct.creationTime); |
| } |
| if (struct.isSetJobStatuses()) { |
| { |
| oprot.writeI32(struct.jobStatuses.size()); |
| for (org.apache.airavata.model.status.JobStatus _iter4 : struct.jobStatuses) |
| { |
| _iter4.write(oprot); |
| } |
| } |
| } |
| if (struct.isSetComputeResourceConsumed()) { |
| oprot.writeString(struct.computeResourceConsumed); |
| } |
| if (struct.isSetJobName()) { |
| oprot.writeString(struct.jobName); |
| } |
| if (struct.isSetWorkingDir()) { |
| oprot.writeString(struct.workingDir); |
| } |
| if (struct.isSetStdOut()) { |
| oprot.writeString(struct.stdOut); |
| } |
| if (struct.isSetStdErr()) { |
| oprot.writeString(struct.stdErr); |
| } |
| if (struct.isSetExitCode()) { |
| oprot.writeI32(struct.exitCode); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, JobModel struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| struct.jobId = iprot.readString(); |
| struct.setJobIdIsSet(true); |
| struct.taskId = iprot.readString(); |
| struct.setTaskIdIsSet(true); |
| struct.processId = iprot.readString(); |
| struct.setProcessIdIsSet(true); |
| struct.jobDescription = iprot.readString(); |
| struct.setJobDescriptionIsSet(true); |
| java.util.BitSet incoming = iprot.readBitSet(8); |
| if (incoming.get(0)) { |
| struct.creationTime = iprot.readI64(); |
| struct.setCreationTimeIsSet(true); |
| } |
| if (incoming.get(1)) { |
| { |
| org.apache.thrift.protocol.TList _list5 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); |
| struct.jobStatuses = new java.util.ArrayList<org.apache.airavata.model.status.JobStatus>(_list5.size); |
| @org.apache.thrift.annotation.Nullable org.apache.airavata.model.status.JobStatus _elem6; |
| for (int _i7 = 0; _i7 < _list5.size; ++_i7) |
| { |
| _elem6 = new org.apache.airavata.model.status.JobStatus(); |
| _elem6.read(iprot); |
| struct.jobStatuses.add(_elem6); |
| } |
| } |
| struct.setJobStatusesIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.computeResourceConsumed = iprot.readString(); |
| struct.setComputeResourceConsumedIsSet(true); |
| } |
| if (incoming.get(3)) { |
| struct.jobName = iprot.readString(); |
| struct.setJobNameIsSet(true); |
| } |
| if (incoming.get(4)) { |
| struct.workingDir = iprot.readString(); |
| struct.setWorkingDirIsSet(true); |
| } |
| if (incoming.get(5)) { |
| struct.stdOut = iprot.readString(); |
| struct.setStdOutIsSet(true); |
| } |
| if (incoming.get(6)) { |
| struct.stdErr = iprot.readString(); |
| struct.setStdErrIsSet(true); |
| } |
| if (incoming.get(7)) { |
| struct.exitCode = iprot.readI32(); |
| struct.setExitCodeIsSet(true); |
| } |
| } |
| } |
| |
| private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { |
| return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); |
| } |
| } |
| |