You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/12/17 16:46:16 UTC
[24/46] airavata git commit: removing duplicate copy of data models
http://git-wip-us.apache.org/repos/asf/airavata/blob/b490671e/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/job/JobModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/job/JobModel.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/job/JobModel.java
deleted file mode 100644
index dc1a951..0000000
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/job/JobModel.java
+++ /dev/null
@@ -1,1566 +0,0 @@
-/**
- * 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.9.2)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.job;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-2")
-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_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStatus", org.apache.thrift.protocol.TType.STRUCT, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new JobModelStandardSchemeFactory());
- schemes.put(TupleScheme.class, new JobModelTupleSchemeFactory());
- }
-
- public String jobId; // required
- public String taskId; // required
- public String processId; // required
- public String jobDescription; // required
- public long creationTime; // optional
- public org.apache.airavata.model.status.JobStatus jobStatus; // optional
- public String computeResourceConsumed; // optional
- public String jobName; // optional
- public String workingDir; // optional
- public String stdOut; // optional
- public String stdErr; // optional
- public 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_STATUS((short)6, "jobStatus"),
- 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 Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- 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_STATUS
- return JOB_STATUS;
- 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public 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_STATUS,_Fields.COMPUTE_RESOURCE_CONSUMED,_Fields.JOB_NAME,_Fields.WORKING_DIR,_Fields.STD_OUT,_Fields.STD_ERR,_Fields.EXIT_CODE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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_STATUS, new org.apache.thrift.meta_data.FieldMetaData("jobStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- 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 = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobModel.class, metaDataMap);
- }
-
- public JobModel() {
- }
-
- public JobModel(
- String jobId,
- String taskId,
- String processId,
- 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.isSetJobStatus()) {
- this.jobStatus = new org.apache.airavata.model.status.JobStatus(other.jobStatus);
- }
- 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;
- }
-
- 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.jobStatus = null;
- this.computeResourceConsumed = null;
- this.jobName = null;
- this.workingDir = null;
- this.stdOut = null;
- this.stdErr = null;
- setExitCodeIsSet(false);
- this.exitCode = 0;
- }
-
- public String getJobId() {
- return this.jobId;
- }
-
- public JobModel setJobId(String jobId) {
- this.jobId = jobId;
- return this;
- }
-
- 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;
- }
- }
-
- public String getTaskId() {
- return this.taskId;
- }
-
- public JobModel setTaskId(String taskId) {
- this.taskId = taskId;
- return this;
- }
-
- 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;
- }
- }
-
- public String getProcessId() {
- return this.processId;
- }
-
- public JobModel setProcessId(String processId) {
- this.processId = processId;
- return this;
- }
-
- 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;
- }
- }
-
- public String getJobDescription() {
- return this.jobDescription;
- }
-
- public JobModel setJobDescription(String jobDescription) {
- this.jobDescription = jobDescription;
- return this;
- }
-
- 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 JobModel setCreationTime(long creationTime) {
- this.creationTime = creationTime;
- setCreationTimeIsSet(true);
- return this;
- }
-
- public void unsetCreationTime() {
- __isset_bitfield = 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 EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
- }
-
- public void setCreationTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
- }
-
- public org.apache.airavata.model.status.JobStatus getJobStatus() {
- return this.jobStatus;
- }
-
- public JobModel setJobStatus(org.apache.airavata.model.status.JobStatus jobStatus) {
- this.jobStatus = jobStatus;
- return this;
- }
-
- public void unsetJobStatus() {
- this.jobStatus = null;
- }
-
- /** Returns true if field jobStatus is set (has been assigned a value) and false otherwise */
- public boolean isSetJobStatus() {
- return this.jobStatus != null;
- }
-
- public void setJobStatusIsSet(boolean value) {
- if (!value) {
- this.jobStatus = null;
- }
- }
-
- public String getComputeResourceConsumed() {
- return this.computeResourceConsumed;
- }
-
- public JobModel setComputeResourceConsumed(String computeResourceConsumed) {
- this.computeResourceConsumed = computeResourceConsumed;
- return this;
- }
-
- 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;
- }
- }
-
- public String getJobName() {
- return this.jobName;
- }
-
- public JobModel setJobName(String jobName) {
- this.jobName = jobName;
- return this;
- }
-
- 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;
- }
- }
-
- public String getWorkingDir() {
- return this.workingDir;
- }
-
- public JobModel setWorkingDir(String workingDir) {
- this.workingDir = workingDir;
- return this;
- }
-
- 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;
- }
- }
-
- public String getStdOut() {
- return this.stdOut;
- }
-
- public JobModel setStdOut(String stdOut) {
- this.stdOut = stdOut;
- return this;
- }
-
- 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;
- }
- }
-
- public String getStdErr() {
- return this.stdErr;
- }
-
- public JobModel setStdErr(String stdErr) {
- this.stdErr = stdErr;
- return this;
- }
-
- 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 JobModel setExitCode(int exitCode) {
- this.exitCode = exitCode;
- setExitCodeIsSet(true);
- return this;
- }
-
- public void unsetExitCode() {
- __isset_bitfield = 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 EncodingUtils.testBit(__isset_bitfield, __EXITCODE_ISSET_ID);
- }
-
- public void setExitCodeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXITCODE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case JOB_ID:
- if (value == null) {
- unsetJobId();
- } else {
- setJobId((String)value);
- }
- break;
-
- case TASK_ID:
- if (value == null) {
- unsetTaskId();
- } else {
- setTaskId((String)value);
- }
- break;
-
- case PROCESS_ID:
- if (value == null) {
- unsetProcessId();
- } else {
- setProcessId((String)value);
- }
- break;
-
- case JOB_DESCRIPTION:
- if (value == null) {
- unsetJobDescription();
- } else {
- setJobDescription((String)value);
- }
- break;
-
- case CREATION_TIME:
- if (value == null) {
- unsetCreationTime();
- } else {
- setCreationTime((Long)value);
- }
- break;
-
- case JOB_STATUS:
- if (value == null) {
- unsetJobStatus();
- } else {
- setJobStatus((org.apache.airavata.model.status.JobStatus)value);
- }
- break;
-
- case COMPUTE_RESOURCE_CONSUMED:
- if (value == null) {
- unsetComputeResourceConsumed();
- } else {
- setComputeResourceConsumed((String)value);
- }
- break;
-
- case JOB_NAME:
- if (value == null) {
- unsetJobName();
- } else {
- setJobName((String)value);
- }
- break;
-
- case WORKING_DIR:
- if (value == null) {
- unsetWorkingDir();
- } else {
- setWorkingDir((String)value);
- }
- break;
-
- case STD_OUT:
- if (value == null) {
- unsetStdOut();
- } else {
- setStdOut((String)value);
- }
- break;
-
- case STD_ERR:
- if (value == null) {
- unsetStdErr();
- } else {
- setStdErr((String)value);
- }
- break;
-
- case EXIT_CODE:
- if (value == null) {
- unsetExitCode();
- } else {
- setExitCode((Integer)value);
- }
- break;
-
- }
- }
-
- public 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 Long.valueOf(getCreationTime());
-
- case JOB_STATUS:
- return getJobStatus();
-
- 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 Integer.valueOf(getExitCode());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new 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_STATUS:
- return isSetJobStatus();
- 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 IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof JobModel)
- return this.equals((JobModel)that);
- return false;
- }
-
- public boolean equals(JobModel that) {
- if (that == null)
- return false;
-
- 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_jobStatus = true && this.isSetJobStatus();
- boolean that_present_jobStatus = true && that.isSetJobStatus();
- if (this_present_jobStatus || that_present_jobStatus) {
- if (!(this_present_jobStatus && that_present_jobStatus))
- return false;
- if (!this.jobStatus.equals(that.jobStatus))
- 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() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_jobId = true && (isSetJobId());
- list.add(present_jobId);
- if (present_jobId)
- list.add(jobId);
-
- boolean present_taskId = true && (isSetTaskId());
- list.add(present_taskId);
- if (present_taskId)
- list.add(taskId);
-
- boolean present_processId = true && (isSetProcessId());
- list.add(present_processId);
- if (present_processId)
- list.add(processId);
-
- boolean present_jobDescription = true && (isSetJobDescription());
- list.add(present_jobDescription);
- if (present_jobDescription)
- list.add(jobDescription);
-
- boolean present_creationTime = true && (isSetCreationTime());
- list.add(present_creationTime);
- if (present_creationTime)
- list.add(creationTime);
-
- boolean present_jobStatus = true && (isSetJobStatus());
- list.add(present_jobStatus);
- if (present_jobStatus)
- list.add(jobStatus);
-
- boolean present_computeResourceConsumed = true && (isSetComputeResourceConsumed());
- list.add(present_computeResourceConsumed);
- if (present_computeResourceConsumed)
- list.add(computeResourceConsumed);
-
- boolean present_jobName = true && (isSetJobName());
- list.add(present_jobName);
- if (present_jobName)
- list.add(jobName);
-
- boolean present_workingDir = true && (isSetWorkingDir());
- list.add(present_workingDir);
- if (present_workingDir)
- list.add(workingDir);
-
- boolean present_stdOut = true && (isSetStdOut());
- list.add(present_stdOut);
- if (present_stdOut)
- list.add(stdOut);
-
- boolean present_stdErr = true && (isSetStdErr());
- list.add(present_stdErr);
- if (present_stdErr)
- list.add(stdErr);
-
- boolean present_exitCode = true && (isSetExitCode());
- list.add(present_exitCode);
- if (present_exitCode)
- list.add(exitCode);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(JobModel other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetJobId()).compareTo(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 = Boolean.valueOf(isSetTaskId()).compareTo(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 = Boolean.valueOf(isSetProcessId()).compareTo(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 = Boolean.valueOf(isSetJobDescription()).compareTo(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 = Boolean.valueOf(isSetCreationTime()).compareTo(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 = Boolean.valueOf(isSetJobStatus()).compareTo(other.isSetJobStatus());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobStatus()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStatus, other.jobStatus);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetComputeResourceConsumed()).compareTo(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 = Boolean.valueOf(isSetJobName()).compareTo(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 = Boolean.valueOf(isSetWorkingDir()).compareTo(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 = Boolean.valueOf(isSetStdOut()).compareTo(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 = Boolean.valueOf(isSetStdErr()).compareTo(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 = Boolean.valueOf(isSetExitCode()).compareTo(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;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new 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 (isSetJobStatus()) {
- if (!first) sb.append(", ");
- sb.append("jobStatus:");
- if (this.jobStatus == null) {
- sb.append("null");
- } else {
- sb.append(this.jobStatus);
- }
- 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 (jobId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobId' was not present! Struct: " + toString());
- }
- if (taskId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString());
- }
- if (processId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' was not present! Struct: " + toString());
- }
- if (jobDescription == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobDescription' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- if (jobStatus != null) {
- jobStatus.validate();
- }
- }
-
- 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, 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 SchemeFactory {
- public JobModelStandardScheme getScheme() {
- return new JobModelStandardScheme();
- }
- }
-
- private static class JobModelStandardScheme extends StandardScheme<JobModel> {
-
- 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_STATUS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.jobStatus = new org.apache.airavata.model.status.JobStatus();
- struct.jobStatus.read(iprot);
- struct.setJobStatusIsSet(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();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- 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.jobStatus != null) {
- if (struct.isSetJobStatus()) {
- oprot.writeFieldBegin(JOB_STATUS_FIELD_DESC);
- struct.jobStatus.write(oprot);
- 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 SchemeFactory {
- public JobModelTupleScheme getScheme() {
- return new JobModelTupleScheme();
- }
- }
-
- private static class JobModelTupleScheme extends TupleScheme<JobModel> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, JobModel struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.jobId);
- oprot.writeString(struct.taskId);
- oprot.writeString(struct.processId);
- oprot.writeString(struct.jobDescription);
- BitSet optionals = new BitSet();
- if (struct.isSetCreationTime()) {
- optionals.set(0);
- }
- if (struct.isSetJobStatus()) {
- 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.isSetJobStatus()) {
- struct.jobStatus.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 {
- TTupleProtocol iprot = (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);
- BitSet incoming = iprot.readBitSet(8);
- if (incoming.get(0)) {
- struct.creationTime = iprot.readI64();
- struct.setCreationTimeIsSet(true);
- }
- if (incoming.get(1)) {
- struct.jobStatus = new org.apache.airavata.model.status.JobStatus();
- struct.jobStatus.read(iprot);
- struct.setJobStatusIsSet(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);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/b490671e/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
deleted file mode 100644
index ba8f06e..0000000
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
+++ /dev/null
@@ -1,626 +0,0 @@
-/**
- * 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.9.2)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.messaging.event;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-2")
-public class ExperimentStatusChangeEvent implements org.apache.thrift.TBase<ExperimentStatusChangeEvent, ExperimentStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatusChangeEvent> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatusChangeEvent");
-
- private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExperimentStatusChangeEventStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExperimentStatusChangeEventTupleSchemeFactory());
- }
-
- /**
- *
- * @see org.apache.airavata.model.status.ExperimentState
- */
- public org.apache.airavata.model.status.ExperimentState state; // required
- public String experimentId; // required
- public String gatewayId; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- /**
- *
- * @see org.apache.airavata.model.status.ExperimentState
- */
- STATE((short)1, "state"),
- EXPERIMENT_ID((short)2, "experimentId"),
- GATEWAY_ID((short)3, "gatewayId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // STATE
- return STATE;
- case 2: // EXPERIMENT_ID
- return EXPERIMENT_ID;
- case 3: // GATEWAY_ID
- return GATEWAY_ID;
- 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.status.ExperimentState.class)));
- tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentStatusChangeEvent.class, metaDataMap);
- }
-
- public ExperimentStatusChangeEvent() {
- }
-
- public ExperimentStatusChangeEvent(
- org.apache.airavata.model.status.ExperimentState state,
- String experimentId,
- String gatewayId)
- {
- this();
- this.state = state;
- this.experimentId = experimentId;
- this.gatewayId = gatewayId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ExperimentStatusChangeEvent(ExperimentStatusChangeEvent other) {
- if (other.isSetState()) {
- this.state = other.state;
- }
- if (other.isSetExperimentId()) {
- this.experimentId = other.experimentId;
- }
- if (other.isSetGatewayId()) {
- this.gatewayId = other.gatewayId;
- }
- }
-
- public ExperimentStatusChangeEvent deepCopy() {
- return new ExperimentStatusChangeEvent(this);
- }
-
- @Override
- public void clear() {
- this.state = null;
- this.experimentId = null;
- this.gatewayId = null;
- }
-
- /**
- *
- * @see org.apache.airavata.model.status.ExperimentState
- */
- public org.apache.airavata.model.status.ExperimentState getState() {
- return this.state;
- }
-
- /**
- *
- * @see org.apache.airavata.model.status.ExperimentState
- */
- public ExperimentStatusChangeEvent setState(org.apache.airavata.model.status.ExperimentState state) {
- this.state = state;
- return this;
- }
-
- public void unsetState() {
- this.state = null;
- }
-
- /** Returns true if field state is set (has been assigned a value) and false otherwise */
- public boolean isSetState() {
- return this.state != null;
- }
-
- public void setStateIsSet(boolean value) {
- if (!value) {
- this.state = null;
- }
- }
-
- public String getExperimentId() {
- return this.experimentId;
- }
-
- public ExperimentStatusChangeEvent setExperimentId(String experimentId) {
- this.experimentId = experimentId;
- return this;
- }
-
- public void unsetExperimentId() {
- this.experimentId = null;
- }
-
- /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
- public boolean isSetExperimentId() {
- return this.experimentId != null;
- }
-
- public void setExperimentIdIsSet(boolean value) {
- if (!value) {
- this.experimentId = null;
- }
- }
-
- public String getGatewayId() {
- return this.gatewayId;
- }
-
- public ExperimentStatusChangeEvent setGatewayId(String gatewayId) {
- this.gatewayId = gatewayId;
- return this;
- }
-
- public void unsetGatewayId() {
- this.gatewayId = null;
- }
-
- /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
- public boolean isSetGatewayId() {
- return this.gatewayId != null;
- }
-
- public void setGatewayIdIsSet(boolean value) {
- if (!value) {
- this.gatewayId = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case STATE:
- if (value == null) {
- unsetState();
- } else {
- setState((org.apache.airavata.model.status.ExperimentState)value);
- }
- break;
-
- case EXPERIMENT_ID:
- if (value == null) {
- unsetExperimentId();
- } else {
- setExperimentId((String)value);
- }
- break;
-
- case GATEWAY_ID:
- if (value == null) {
- unsetGatewayId();
- } else {
- setGatewayId((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case STATE:
- return getState();
-
- case EXPERIMENT_ID:
- return getExperimentId();
-
- case GATEWAY_ID:
- return getGatewayId();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case STATE:
- return isSetState();
- case EXPERIMENT_ID:
- return isSetExperimentId();
- case GATEWAY_ID:
- return isSetGatewayId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ExperimentStatusChangeEvent)
- return this.equals((ExperimentStatusChangeEvent)that);
- return false;
- }
-
- public boolean equals(ExperimentStatusChangeEvent that) {
- if (that == null)
- return false;
-
- boolean this_present_state = true && this.isSetState();
- boolean that_present_state = true && that.isSetState();
- if (this_present_state || that_present_state) {
- if (!(this_present_state && that_present_state))
- return false;
- if (!this.state.equals(that.state))
- return false;
- }
-
- boolean this_present_experimentId = true && this.isSetExperimentId();
- boolean that_present_experimentId = true && that.isSetExperimentId();
- if (this_present_experimentId || that_present_experimentId) {
- if (!(this_present_experimentId && that_present_experimentId))
- return false;
- if (!this.experimentId.equals(that.experimentId))
- return false;
- }
-
- boolean this_present_gatewayId = true && this.isSetGatewayId();
- boolean that_present_gatewayId = true && that.isSetGatewayId();
- if (this_present_gatewayId || that_present_gatewayId) {
- if (!(this_present_gatewayId && that_present_gatewayId))
- return false;
- if (!this.gatewayId.equals(that.gatewayId))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
-
- boolean present_experimentId = true && (isSetExperimentId());
- list.add(present_experimentId);
- if (present_experimentId)
- list.add(experimentId);
-
- boolean present_gatewayId = true && (isSetGatewayId());
- list.add(present_gatewayId);
- if (present_gatewayId)
- list.add(gatewayId);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(ExperimentStatusChangeEvent other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetState()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExperimentId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGatewayId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ExperimentStatusChangeEvent(");
- boolean first = true;
-
- sb.append("state:");
- if (this.state == null) {
- sb.append("null");
- } else {
- sb.append(this.state);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("experimentId:");
- if (this.experimentId == null) {
- sb.append("null");
- } else {
- sb.append(this.experimentId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("gatewayId:");
- if (this.gatewayId == null) {
- sb.append("null");
- } else {
- sb.append(this.gatewayId);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (state == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' was not present! Struct: " + toString());
- }
- if (experimentId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
- }
- if (gatewayId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! 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, ClassNotFoundException {
- try {
- 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 ExperimentStatusChangeEventStandardSchemeFactory implements SchemeFactory {
- public ExperimentStatusChangeEventStandardScheme getScheme() {
- return new ExperimentStatusChangeEventStandardScheme();
- }
- }
-
- private static class ExperimentStatusChangeEventStandardScheme extends StandardScheme<ExperimentStatusChangeEvent> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentStatusChangeEvent 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: // STATE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.state = org.apache.airavata.model.status.ExperimentState.findByValue(iprot.readI32());
- struct.setStateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // EXPERIMENT_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.experimentId = iprot.readString();
- struct.setExperimentIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // GATEWAY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.gatewayId = iprot.readString();
- struct.setGatewayIdIsSet(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();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ExperimentStatusChangeEvent struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.state != null) {
- oprot.writeFieldBegin(STATE_FIELD_DESC);
- oprot.writeI32(struct.state.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.experimentId != null) {
- oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
- oprot.writeString(struct.experimentId);
- oprot.writeFieldEnd();
- }
- if (struct.gatewayId != null) {
- oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
- oprot.writeString(struct.gatewayId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ExperimentStatusChangeEventTupleSchemeFactory implements SchemeFactory {
- public ExperimentStatusChangeEventTupleScheme getScheme() {
- return new ExperimentStatusChangeEventTupleScheme();
- }
- }
-
- private static class ExperimentStatusChangeEventTupleScheme extends TupleScheme<ExperimentStatusChangeEvent> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentStatusChangeEvent struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.state.getValue());
- oprot.writeString(struct.experimentId);
- oprot.writeString(struct.gatewayId);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentStatusChangeEvent struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.state = org.apache.airavata.model.status.ExperimentState.findByValue(iprot.readI32());
- struct.setStateIsSet(true);
- struct.experimentId = iprot.readString();
- struct.setExperimentIdIsSet(true);
- struct.gatewayId = iprot.readString();
- struct.setGatewayIdIsSet(true);
- }
- }
-
-}
-