blob: a0301c7657827642e415a0d6b26f97be13fd4596 [file] [log] [blame]
/**
* 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.workflow;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)")
public class WorkflowHandler implements org.apache.thrift.TBase<WorkflowHandler, WorkflowHandler._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowHandler> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowHandler");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("inputs", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("outputs", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField STATUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("statuses", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField UPDATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedAt", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkflowHandlerStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkflowHandlerTupleSchemeFactory();
private @org.apache.thrift.annotation.Nullable java.lang.String id; // required
private @org.apache.thrift.annotation.Nullable HandlerType type; // required
private @org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> inputs; // optional
private @org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> outputs; // optional
private @org.apache.thrift.annotation.Nullable java.util.List<HandlerStatus> statuses; // optional
private @org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.commons.ErrorModel> errors; // optional
private long createdAt; // optional
private long updatedAt; // 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 {
ID((short)1, "id"),
/**
*
* @see HandlerType
*/
TYPE((short)2, "type"),
INPUTS((short)3, "inputs"),
OUTPUTS((short)4, "outputs"),
STATUSES((short)5, "statuses"),
ERRORS((short)6, "errors"),
CREATED_AT((short)7, "createdAt"),
UPDATED_AT((short)8, "updatedAt");
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: // ID
return ID;
case 2: // TYPE
return TYPE;
case 3: // INPUTS
return INPUTS;
case 4: // OUTPUTS
return OUTPUTS;
case 5: // STATUSES
return STATUSES;
case 6: // ERRORS
return ERRORS;
case 7: // CREATED_AT
return CREATED_AT;
case 8: // UPDATED_AT
return UPDATED_AT;
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 __CREATEDAT_ISSET_ID = 0;
private static final int __UPDATEDAT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.INPUTS,_Fields.OUTPUTS,_Fields.STATUSES,_Fields.ERRORS,_Fields.CREATED_AT,_Fields.UPDATED_AT};
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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, HandlerType.class)));
tmpMap.put(_Fields.INPUTS, new org.apache.thrift.meta_data.FieldMetaData("inputs", 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.application.io.InputDataObjectType.class))));
tmpMap.put(_Fields.OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("outputs", 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.application.io.OutputDataObjectType.class))));
tmpMap.put(_Fields.STATUSES, new org.apache.thrift.meta_data.FieldMetaData("statuses", 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, HandlerStatus.class))));
tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", 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.commons.ErrorModel.class))));
tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.UPDATED_AT, new org.apache.thrift.meta_data.FieldMetaData("updatedAt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowHandler.class, metaDataMap);
}
public WorkflowHandler() {
}
public WorkflowHandler(
java.lang.String id,
HandlerType type)
{
this();
this.id = id;
this.type = type;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public WorkflowHandler(WorkflowHandler other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetId()) {
this.id = other.id;
}
if (other.isSetType()) {
this.type = other.type;
}
if (other.isSetInputs()) {
java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> __this__inputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(other.inputs.size());
for (org.apache.airavata.model.application.io.InputDataObjectType other_element : other.inputs) {
__this__inputs.add(new org.apache.airavata.model.application.io.InputDataObjectType(other_element));
}
this.inputs = __this__inputs;
}
if (other.isSetOutputs()) {
java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> __this__outputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(other.outputs.size());
for (org.apache.airavata.model.application.io.OutputDataObjectType other_element : other.outputs) {
__this__outputs.add(new org.apache.airavata.model.application.io.OutputDataObjectType(other_element));
}
this.outputs = __this__outputs;
}
if (other.isSetStatuses()) {
java.util.List<HandlerStatus> __this__statuses = new java.util.ArrayList<HandlerStatus>(other.statuses.size());
for (HandlerStatus other_element : other.statuses) {
__this__statuses.add(new HandlerStatus(other_element));
}
this.statuses = __this__statuses;
}
if (other.isSetErrors()) {
java.util.List<org.apache.airavata.model.commons.ErrorModel> __this__errors = new java.util.ArrayList<org.apache.airavata.model.commons.ErrorModel>(other.errors.size());
for (org.apache.airavata.model.commons.ErrorModel other_element : other.errors) {
__this__errors.add(new org.apache.airavata.model.commons.ErrorModel(other_element));
}
this.errors = __this__errors;
}
this.createdAt = other.createdAt;
this.updatedAt = other.updatedAt;
}
@Override
public WorkflowHandler deepCopy() {
return new WorkflowHandler(this);
}
@Override
public void clear() {
this.id = null;
this.type = null;
this.inputs = null;
this.outputs = null;
this.statuses = null;
this.errors = null;
setCreatedAtIsSet(false);
this.createdAt = 0;
setUpdatedAtIsSet(false);
this.updatedAt = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getId() {
return this.id;
}
public void setId(@org.apache.thrift.annotation.Nullable java.lang.String id) {
this.id = id;
}
public void unsetId() {
this.id = null;
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return this.id != null;
}
public void setIdIsSet(boolean value) {
if (!value) {
this.id = null;
}
}
/**
*
* @see HandlerType
*/
@org.apache.thrift.annotation.Nullable
public HandlerType getType() {
return this.type;
}
/**
*
* @see HandlerType
*/
public void setType(@org.apache.thrift.annotation.Nullable HandlerType type) {
this.type = type;
}
public void unsetType() {
this.type = null;
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return this.type != null;
}
public void setTypeIsSet(boolean value) {
if (!value) {
this.type = null;
}
}
public int getInputsSize() {
return (this.inputs == null) ? 0 : this.inputs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.airavata.model.application.io.InputDataObjectType> getInputsIterator() {
return (this.inputs == null) ? null : this.inputs.iterator();
}
public void addToInputs(org.apache.airavata.model.application.io.InputDataObjectType elem) {
if (this.inputs == null) {
this.inputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>();
}
this.inputs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> getInputs() {
return this.inputs;
}
public void setInputs(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> inputs) {
this.inputs = inputs;
}
public void unsetInputs() {
this.inputs = null;
}
/** Returns true if field inputs is set (has been assigned a value) and false otherwise */
public boolean isSetInputs() {
return this.inputs != null;
}
public void setInputsIsSet(boolean value) {
if (!value) {
this.inputs = null;
}
}
public int getOutputsSize() {
return (this.outputs == null) ? 0 : this.outputs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.airavata.model.application.io.OutputDataObjectType> getOutputsIterator() {
return (this.outputs == null) ? null : this.outputs.iterator();
}
public void addToOutputs(org.apache.airavata.model.application.io.OutputDataObjectType elem) {
if (this.outputs == null) {
this.outputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>();
}
this.outputs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> getOutputs() {
return this.outputs;
}
public void setOutputs(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> outputs) {
this.outputs = outputs;
}
public void unsetOutputs() {
this.outputs = null;
}
/** Returns true if field outputs is set (has been assigned a value) and false otherwise */
public boolean isSetOutputs() {
return this.outputs != null;
}
public void setOutputsIsSet(boolean value) {
if (!value) {
this.outputs = null;
}
}
public int getStatusesSize() {
return (this.statuses == null) ? 0 : this.statuses.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<HandlerStatus> getStatusesIterator() {
return (this.statuses == null) ? null : this.statuses.iterator();
}
public void addToStatuses(HandlerStatus elem) {
if (this.statuses == null) {
this.statuses = new java.util.ArrayList<HandlerStatus>();
}
this.statuses.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<HandlerStatus> getStatuses() {
return this.statuses;
}
public void setStatuses(@org.apache.thrift.annotation.Nullable java.util.List<HandlerStatus> statuses) {
this.statuses = statuses;
}
public void unsetStatuses() {
this.statuses = null;
}
/** Returns true if field statuses is set (has been assigned a value) and false otherwise */
public boolean isSetStatuses() {
return this.statuses != null;
}
public void setStatusesIsSet(boolean value) {
if (!value) {
this.statuses = null;
}
}
public int getErrorsSize() {
return (this.errors == null) ? 0 : this.errors.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.airavata.model.commons.ErrorModel> getErrorsIterator() {
return (this.errors == null) ? null : this.errors.iterator();
}
public void addToErrors(org.apache.airavata.model.commons.ErrorModel elem) {
if (this.errors == null) {
this.errors = new java.util.ArrayList<org.apache.airavata.model.commons.ErrorModel>();
}
this.errors.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.airavata.model.commons.ErrorModel> getErrors() {
return this.errors;
}
public void setErrors(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.airavata.model.commons.ErrorModel> errors) {
this.errors = errors;
}
public void unsetErrors() {
this.errors = null;
}
/** Returns true if field errors is set (has been assigned a value) and false otherwise */
public boolean isSetErrors() {
return this.errors != null;
}
public void setErrorsIsSet(boolean value) {
if (!value) {
this.errors = null;
}
}
public long getCreatedAt() {
return this.createdAt;
}
public void setCreatedAt(long createdAt) {
this.createdAt = createdAt;
setCreatedAtIsSet(true);
}
public void unsetCreatedAt() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATEDAT_ISSET_ID);
}
/** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
public boolean isSetCreatedAt() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATEDAT_ISSET_ID);
}
public void setCreatedAtIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATEDAT_ISSET_ID, value);
}
public long getUpdatedAt() {
return this.updatedAt;
}
public void setUpdatedAt(long updatedAt) {
this.updatedAt = updatedAt;
setUpdatedAtIsSet(true);
}
public void unsetUpdatedAt() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEDAT_ISSET_ID);
}
/** Returns true if field updatedAt is set (has been assigned a value) and false otherwise */
public boolean isSetUpdatedAt() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEDAT_ISSET_ID);
}
public void setUpdatedAtIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEDAT_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
setId((java.lang.String)value);
}
break;
case TYPE:
if (value == null) {
unsetType();
} else {
setType((HandlerType)value);
}
break;
case INPUTS:
if (value == null) {
unsetInputs();
} else {
setInputs((java.util.List<org.apache.airavata.model.application.io.InputDataObjectType>)value);
}
break;
case OUTPUTS:
if (value == null) {
unsetOutputs();
} else {
setOutputs((java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType>)value);
}
break;
case STATUSES:
if (value == null) {
unsetStatuses();
} else {
setStatuses((java.util.List<HandlerStatus>)value);
}
break;
case ERRORS:
if (value == null) {
unsetErrors();
} else {
setErrors((java.util.List<org.apache.airavata.model.commons.ErrorModel>)value);
}
break;
case CREATED_AT:
if (value == null) {
unsetCreatedAt();
} else {
setCreatedAt((java.lang.Long)value);
}
break;
case UPDATED_AT:
if (value == null) {
unsetUpdatedAt();
} else {
setUpdatedAt((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return getId();
case TYPE:
return getType();
case INPUTS:
return getInputs();
case OUTPUTS:
return getOutputs();
case STATUSES:
return getStatuses();
case ERRORS:
return getErrors();
case CREATED_AT:
return getCreatedAt();
case UPDATED_AT:
return getUpdatedAt();
}
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 ID:
return isSetId();
case TYPE:
return isSetType();
case INPUTS:
return isSetInputs();
case OUTPUTS:
return isSetOutputs();
case STATUSES:
return isSetStatuses();
case ERRORS:
return isSetErrors();
case CREATED_AT:
return isSetCreatedAt();
case UPDATED_AT:
return isSetUpdatedAt();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof WorkflowHandler)
return this.equals((WorkflowHandler)that);
return false;
}
public boolean equals(WorkflowHandler that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_id = true && this.isSetId();
boolean that_present_id = true && that.isSetId();
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (!this.id.equals(that.id))
return false;
}
boolean this_present_type = true && this.isSetType();
boolean that_present_type = true && that.isSetType();
if (this_present_type || that_present_type) {
if (!(this_present_type && that_present_type))
return false;
if (!this.type.equals(that.type))
return false;
}
boolean this_present_inputs = true && this.isSetInputs();
boolean that_present_inputs = true && that.isSetInputs();
if (this_present_inputs || that_present_inputs) {
if (!(this_present_inputs && that_present_inputs))
return false;
if (!this.inputs.equals(that.inputs))
return false;
}
boolean this_present_outputs = true && this.isSetOutputs();
boolean that_present_outputs = true && that.isSetOutputs();
if (this_present_outputs || that_present_outputs) {
if (!(this_present_outputs && that_present_outputs))
return false;
if (!this.outputs.equals(that.outputs))
return false;
}
boolean this_present_statuses = true && this.isSetStatuses();
boolean that_present_statuses = true && that.isSetStatuses();
if (this_present_statuses || that_present_statuses) {
if (!(this_present_statuses && that_present_statuses))
return false;
if (!this.statuses.equals(that.statuses))
return false;
}
boolean this_present_errors = true && this.isSetErrors();
boolean that_present_errors = true && that.isSetErrors();
if (this_present_errors || that_present_errors) {
if (!(this_present_errors && that_present_errors))
return false;
if (!this.errors.equals(that.errors))
return false;
}
boolean this_present_createdAt = true && this.isSetCreatedAt();
boolean that_present_createdAt = true && that.isSetCreatedAt();
if (this_present_createdAt || that_present_createdAt) {
if (!(this_present_createdAt && that_present_createdAt))
return false;
if (this.createdAt != that.createdAt)
return false;
}
boolean this_present_updatedAt = true && this.isSetUpdatedAt();
boolean that_present_updatedAt = true && that.isSetUpdatedAt();
if (this_present_updatedAt || that_present_updatedAt) {
if (!(this_present_updatedAt && that_present_updatedAt))
return false;
if (this.updatedAt != that.updatedAt)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287);
if (isSetId())
hashCode = hashCode * 8191 + id.hashCode();
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.getValue();
hashCode = hashCode * 8191 + ((isSetInputs()) ? 131071 : 524287);
if (isSetInputs())
hashCode = hashCode * 8191 + inputs.hashCode();
hashCode = hashCode * 8191 + ((isSetOutputs()) ? 131071 : 524287);
if (isSetOutputs())
hashCode = hashCode * 8191 + outputs.hashCode();
hashCode = hashCode * 8191 + ((isSetStatuses()) ? 131071 : 524287);
if (isSetStatuses())
hashCode = hashCode * 8191 + statuses.hashCode();
hashCode = hashCode * 8191 + ((isSetErrors()) ? 131071 : 524287);
if (isSetErrors())
hashCode = hashCode * 8191 + errors.hashCode();
hashCode = hashCode * 8191 + ((isSetCreatedAt()) ? 131071 : 524287);
if (isSetCreatedAt())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createdAt);
hashCode = hashCode * 8191 + ((isSetUpdatedAt()) ? 131071 : 524287);
if (isSetUpdatedAt())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updatedAt);
return hashCode;
}
@Override
public int compareTo(WorkflowHandler other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetInputs(), other.isSetInputs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInputs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputs, other.inputs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOutputs(), other.isSetOutputs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOutputs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputs, other.outputs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStatuses(), other.isSetStatuses());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatuses()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statuses, other.statuses);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetErrors(), other.isSetErrors());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrors()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCreatedAt(), other.isSetCreatedAt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCreatedAt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, other.createdAt);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUpdatedAt(), other.isSetUpdatedAt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdatedAt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedAt, other.updatedAt);
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("WorkflowHandler(");
boolean first = true;
sb.append("id:");
if (this.id == null) {
sb.append("null");
} else {
sb.append(this.id);
}
first = false;
if (!first) sb.append(", ");
sb.append("type:");
if (this.type == null) {
sb.append("null");
} else {
sb.append(this.type);
}
first = false;
if (isSetInputs()) {
if (!first) sb.append(", ");
sb.append("inputs:");
if (this.inputs == null) {
sb.append("null");
} else {
sb.append(this.inputs);
}
first = false;
}
if (isSetOutputs()) {
if (!first) sb.append(", ");
sb.append("outputs:");
if (this.outputs == null) {
sb.append("null");
} else {
sb.append(this.outputs);
}
first = false;
}
if (isSetStatuses()) {
if (!first) sb.append(", ");
sb.append("statuses:");
if (this.statuses == null) {
sb.append("null");
} else {
sb.append(this.statuses);
}
first = false;
}
if (isSetErrors()) {
if (!first) sb.append(", ");
sb.append("errors:");
if (this.errors == null) {
sb.append("null");
} else {
sb.append(this.errors);
}
first = false;
}
if (isSetCreatedAt()) {
if (!first) sb.append(", ");
sb.append("createdAt:");
sb.append(this.createdAt);
first = false;
}
if (isSetUpdatedAt()) {
if (!first) sb.append(", ");
sb.append("updatedAt:");
sb.append(this.updatedAt);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (!isSetId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString());
}
if (!isSetType()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' 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 WorkflowHandlerStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public WorkflowHandlerStandardScheme getScheme() {
return new WorkflowHandlerStandardScheme();
}
}
private static class WorkflowHandlerStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkflowHandler> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowHandler 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: // ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.id = iprot.readString();
struct.setIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = org.apache.airavata.model.workflow.HandlerType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INPUTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
struct.inputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list16.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.application.io.InputDataObjectType _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = new org.apache.airavata.model.application.io.InputDataObjectType();
_elem17.read(iprot);
struct.inputs.add(_elem17);
}
iprot.readListEnd();
}
struct.setInputsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // OUTPUTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list19 = iprot.readListBegin();
struct.outputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list19.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.application.io.OutputDataObjectType _elem20;
for (int _i21 = 0; _i21 < _list19.size; ++_i21)
{
_elem20 = new org.apache.airavata.model.application.io.OutputDataObjectType();
_elem20.read(iprot);
struct.outputs.add(_elem20);
}
iprot.readListEnd();
}
struct.setOutputsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // STATUSES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
struct.statuses = new java.util.ArrayList<HandlerStatus>(_list22.size);
@org.apache.thrift.annotation.Nullable HandlerStatus _elem23;
for (int _i24 = 0; _i24 < _list22.size; ++_i24)
{
_elem23 = new HandlerStatus();
_elem23.read(iprot);
struct.statuses.add(_elem23);
}
iprot.readListEnd();
}
struct.setStatusesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // ERRORS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
struct.errors = new java.util.ArrayList<org.apache.airavata.model.commons.ErrorModel>(_list25.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.commons.ErrorModel _elem26;
for (int _i27 = 0; _i27 < _list25.size; ++_i27)
{
_elem26 = new org.apache.airavata.model.commons.ErrorModel();
_elem26.read(iprot);
struct.errors.add(_elem26);
}
iprot.readListEnd();
}
struct.setErrorsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // CREATED_AT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.createdAt = iprot.readI64();
struct.setCreatedAtIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // UPDATED_AT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.updatedAt = iprot.readI64();
struct.setUpdatedAtIsSet(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, WorkflowHandler struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.id != null) {
oprot.writeFieldBegin(ID_FIELD_DESC);
oprot.writeString(struct.id);
oprot.writeFieldEnd();
}
if (struct.type != null) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
oprot.writeI32(struct.type.getValue());
oprot.writeFieldEnd();
}
if (struct.inputs != null) {
if (struct.isSetInputs()) {
oprot.writeFieldBegin(INPUTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.inputs.size()));
for (org.apache.airavata.model.application.io.InputDataObjectType _iter28 : struct.inputs)
{
_iter28.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.outputs != null) {
if (struct.isSetOutputs()) {
oprot.writeFieldBegin(OUTPUTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.outputs.size()));
for (org.apache.airavata.model.application.io.OutputDataObjectType _iter29 : struct.outputs)
{
_iter29.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.statuses != null) {
if (struct.isSetStatuses()) {
oprot.writeFieldBegin(STATUSES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statuses.size()));
for (HandlerStatus _iter30 : struct.statuses)
{
_iter30.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.errors != null) {
if (struct.isSetErrors()) {
oprot.writeFieldBegin(ERRORS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
for (org.apache.airavata.model.commons.ErrorModel _iter31 : struct.errors)
{
_iter31.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetCreatedAt()) {
oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
oprot.writeI64(struct.createdAt);
oprot.writeFieldEnd();
}
if (struct.isSetUpdatedAt()) {
oprot.writeFieldBegin(UPDATED_AT_FIELD_DESC);
oprot.writeI64(struct.updatedAt);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class WorkflowHandlerTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public WorkflowHandlerTupleScheme getScheme() {
return new WorkflowHandlerTupleScheme();
}
}
private static class WorkflowHandlerTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkflowHandler> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowHandler struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.id);
oprot.writeI32(struct.type.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetInputs()) {
optionals.set(0);
}
if (struct.isSetOutputs()) {
optionals.set(1);
}
if (struct.isSetStatuses()) {
optionals.set(2);
}
if (struct.isSetErrors()) {
optionals.set(3);
}
if (struct.isSetCreatedAt()) {
optionals.set(4);
}
if (struct.isSetUpdatedAt()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetInputs()) {
{
oprot.writeI32(struct.inputs.size());
for (org.apache.airavata.model.application.io.InputDataObjectType _iter32 : struct.inputs)
{
_iter32.write(oprot);
}
}
}
if (struct.isSetOutputs()) {
{
oprot.writeI32(struct.outputs.size());
for (org.apache.airavata.model.application.io.OutputDataObjectType _iter33 : struct.outputs)
{
_iter33.write(oprot);
}
}
}
if (struct.isSetStatuses()) {
{
oprot.writeI32(struct.statuses.size());
for (HandlerStatus _iter34 : struct.statuses)
{
_iter34.write(oprot);
}
}
}
if (struct.isSetErrors()) {
{
oprot.writeI32(struct.errors.size());
for (org.apache.airavata.model.commons.ErrorModel _iter35 : struct.errors)
{
_iter35.write(oprot);
}
}
}
if (struct.isSetCreatedAt()) {
oprot.writeI64(struct.createdAt);
}
if (struct.isSetUpdatedAt()) {
oprot.writeI64(struct.updatedAt);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowHandler struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readString();
struct.setIdIsSet(true);
struct.type = org.apache.airavata.model.workflow.HandlerType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.inputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list36.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.application.io.InputDataObjectType _elem37;
for (int _i38 = 0; _i38 < _list36.size; ++_i38)
{
_elem37 = new org.apache.airavata.model.application.io.InputDataObjectType();
_elem37.read(iprot);
struct.inputs.add(_elem37);
}
}
struct.setInputsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list39 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.outputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list39.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.application.io.OutputDataObjectType _elem40;
for (int _i41 = 0; _i41 < _list39.size; ++_i41)
{
_elem40 = new org.apache.airavata.model.application.io.OutputDataObjectType();
_elem40.read(iprot);
struct.outputs.add(_elem40);
}
}
struct.setOutputsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.statuses = new java.util.ArrayList<HandlerStatus>(_list42.size);
@org.apache.thrift.annotation.Nullable HandlerStatus _elem43;
for (int _i44 = 0; _i44 < _list42.size; ++_i44)
{
_elem43 = new HandlerStatus();
_elem43.read(iprot);
struct.statuses.add(_elem43);
}
}
struct.setStatusesIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.errors = new java.util.ArrayList<org.apache.airavata.model.commons.ErrorModel>(_list45.size);
@org.apache.thrift.annotation.Nullable org.apache.airavata.model.commons.ErrorModel _elem46;
for (int _i47 = 0; _i47 < _list45.size; ++_i47)
{
_elem46 = new org.apache.airavata.model.commons.ErrorModel();
_elem46.read(iprot);
struct.errors.add(_elem46);
}
}
struct.setErrorsIsSet(true);
}
if (incoming.get(4)) {
struct.createdAt = iprot.readI64();
struct.setCreatedAtIsSet(true);
}
if (incoming.get(5)) {
struct.updatedAt = iprot.readI64();
struct.setUpdatedAtIsSet(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();
}
}