http://git-wip-us.apache.org/repos/asf/airavata/blob/b490671e/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/status/TaskStatus.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/status/TaskStatus.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/status/TaskStatus.java deleted file mode 100644 index 3078a3d..0000000 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/status/TaskStatus.java +++ /dev/null @@ -1,639 +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.status; - -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 TaskStatus implements org.apache.thrift.TBase<TaskStatus, TaskStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatus> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatus"); - - 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 TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", 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 TaskStatusStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TaskStatusTupleSchemeFactory()); - } - - /** - * - * @see TaskState - */ - public TaskState state; // required - public long timeOfStateChange; // optional - public String reason; // 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 { - /** - * - * @see TaskState - */ - STATE((short)1, "state"), - TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange"), - REASON((short)3, "reason"); - - 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: // TIME_OF_STATE_CHANGE - return TIME_OF_STATE_CHANGE; - case 3: // REASON - return REASON; - 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 __TIMEOFSTATECHANGE_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE,_Fields.REASON}; - 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, TaskState.class))); - tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskStatus.class, metaDataMap); - } - - public TaskStatus() { - } - - public TaskStatus( - TaskState state) - { - this(); - this.state = state; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public TaskStatus(TaskStatus other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetState()) { - this.state = other.state; - } - this.timeOfStateChange = other.timeOfStateChange; - if (other.isSetReason()) { - this.reason = other.reason; - } - } - - public TaskStatus deepCopy() { - return new TaskStatus(this); - } - - @Override - public void clear() { - this.state = null; - setTimeOfStateChangeIsSet(false); - this.timeOfStateChange = 0; - this.reason = null; - } - - /** - * - * @see TaskState - */ - public TaskState getState() { - return this.state; - } - - /** - * - * @see TaskState - */ - public TaskStatus setState(TaskState 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 long getTimeOfStateChange() { - return this.timeOfStateChange; - } - - public TaskStatus setTimeOfStateChange(long timeOfStateChange) { - this.timeOfStateChange = timeOfStateChange; - setTimeOfStateChangeIsSet(true); - return this; - } - - public void unsetTimeOfStateChange() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID); - } - - /** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeOfStateChange() { - return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID); - } - - public void setTimeOfStateChangeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value); - } - - public String getReason() { - return this.reason; - } - - public TaskStatus setReason(String reason) { - this.reason = reason; - return this; - } - - public void unsetReason() { - this.reason = null; - } - - /** Returns true if field reason is set (has been assigned a value) and false otherwise */ - public boolean isSetReason() { - return this.reason != null; - } - - public void setReasonIsSet(boolean value) { - if (!value) { - this.reason = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case STATE: - if (value == null) { - unsetState(); - } else { - setState((TaskState)value); - } - break; - - case TIME_OF_STATE_CHANGE: - if (value == null) { - unsetTimeOfStateChange(); - } else { - setTimeOfStateChange((Long)value); - } - break; - - case REASON: - if (value == null) { - unsetReason(); - } else { - setReason((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case STATE: - return getState(); - - case TIME_OF_STATE_CHANGE: - return Long.valueOf(getTimeOfStateChange()); - - case REASON: - return getReason(); - - } - 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 TIME_OF_STATE_CHANGE: - return isSetTimeOfStateChange(); - case REASON: - return isSetReason(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TaskStatus) - return this.equals((TaskStatus)that); - return false; - } - - public boolean equals(TaskStatus 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_timeOfStateChange = true && this.isSetTimeOfStateChange(); - boolean that_present_timeOfStateChange = true && that.isSetTimeOfStateChange(); - if (this_present_timeOfStateChange || that_present_timeOfStateChange) { - if (!(this_present_timeOfStateChange && that_present_timeOfStateChange)) - return false; - if (this.timeOfStateChange != that.timeOfStateChange) - return false; - } - - boolean this_present_reason = true && this.isSetReason(); - boolean that_present_reason = true && that.isSetReason(); - if (this_present_reason || that_present_reason) { - if (!(this_present_reason && that_present_reason)) - return false; - if (!this.reason.equals(that.reason)) - 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_timeOfStateChange = true && (isSetTimeOfStateChange()); - list.add(present_timeOfStateChange); - if (present_timeOfStateChange) - list.add(timeOfStateChange); - - boolean present_reason = true && (isSetReason()); - list.add(present_reason); - if (present_reason) - list.add(reason); - - return list.hashCode(); - } - - @Override - public int compareTo(TaskStatus 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(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeOfStateChange()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeOfStateChange, other.timeOfStateChange); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReason()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reason, other.reason); - 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("TaskStatus("); - boolean first = true; - - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; - if (isSetTimeOfStateChange()) { - if (!first) sb.append(", "); - sb.append("timeOfStateChange:"); - sb.append(this.timeOfStateChange); - first = false; - } - if (isSetReason()) { - if (!first) sb.append(", "); - sb.append("reason:"); - if (this.reason == null) { - sb.append("null"); - } else { - sb.append(this.reason); - } - 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()); - } - // 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 { - // 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 TaskStatusStandardSchemeFactory implements SchemeFactory { - public TaskStatusStandardScheme getScheme() { - return new TaskStatusStandardScheme(); - } - } - - private static class TaskStatusStandardScheme extends StandardScheme<TaskStatus> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TaskStatus 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.TaskState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TIME_OF_STATE_CHANGE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeOfStateChange = iprot.readI64(); - struct.setTimeOfStateChangeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // REASON - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.reason = iprot.readString(); - struct.setReasonIsSet(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, TaskStatus 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.isSetTimeOfStateChange()) { - oprot.writeFieldBegin(TIME_OF_STATE_CHANGE_FIELD_DESC); - oprot.writeI64(struct.timeOfStateChange); - oprot.writeFieldEnd(); - } - if (struct.reason != null) { - if (struct.isSetReason()) { - oprot.writeFieldBegin(REASON_FIELD_DESC); - oprot.writeString(struct.reason); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TaskStatusTupleSchemeFactory implements SchemeFactory { - public TaskStatusTupleScheme getScheme() { - return new TaskStatusTupleScheme(); - } - } - - private static class TaskStatusTupleScheme extends TupleScheme<TaskStatus> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TaskStatus struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.state.getValue()); - BitSet optionals = new BitSet(); - if (struct.isSetTimeOfStateChange()) { - optionals.set(0); - } - if (struct.isSetReason()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetTimeOfStateChange()) { - oprot.writeI64(struct.timeOfStateChange); - } - if (struct.isSetReason()) { - oprot.writeString(struct.reason); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TaskStatus struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.state = org.apache.airavata.model.status.TaskState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.timeOfStateChange = iprot.readI64(); - struct.setTimeOfStateChangeIsSet(true); - } - if (incoming.get(1)) { - struct.reason = iprot.readString(); - struct.setReasonIsSet(true); - } - } - } - -} -
http://git-wip-us.apache.org/repos/asf/airavata/blob/b490671e/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStageType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStageType.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStageType.java deleted file mode 100644 index 48a852d..0000000 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStageType.java +++ /dev/null @@ -1,69 +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.task; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -/** - * DataStagingTaskModel: A structure holding the data staging task details. - * - * Source and Destination locations includes standard representation of protocol, host, port and path - * A friendly description of the task, usally used to communicate information to users. - * - */ -public enum DataStageType implements org.apache.thrift.TEnum { - INPUT(0), - OUPUT(1); - - private final int value; - - private DataStageType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static DataStageType findByValue(int value) { - switch (value) { - case 0: - return INPUT; - case 1: - return OUPUT; - default: - return null; - } - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/b490671e/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java deleted file mode 100644 index 5cc6e08..0000000 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java +++ /dev/null @@ -1,1165 +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.task; - -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 DataStagingTaskModel implements org.apache.thrift.TBase<DataStagingTaskModel, DataStagingTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataStagingTaskModel> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataStagingTaskModel"); - - private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField DESTINATION_FIELD_DESC = new org.apache.thrift.protocol.TField("destination", org.apache.thrift.protocol.TType.STRING, (short)2); - 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)3); - private static final org.apache.thrift.protocol.TField TRANSFER_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("transferStartTime", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField TRANSFER_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("transferEndTime", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField TRANSFER_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("transferRate", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField PROCESS_INPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("processInput", org.apache.thrift.protocol.TType.STRUCT, (short)7); - private static final org.apache.thrift.protocol.TField PROCESS_OUTPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("processOutput", org.apache.thrift.protocol.TType.STRUCT, (short)8); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DataStagingTaskModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DataStagingTaskModelTupleSchemeFactory()); - } - - public String source; // required - public String destination; // required - /** - * - * @see DataStageType - */ - public DataStageType type; // required - public long transferStartTime; // optional - public long transferEndTime; // optional - public String transferRate; // optional - public org.apache.airavata.model.application.io.InputDataObjectType processInput; // optional - public org.apache.airavata.model.application.io.OutputDataObjectType processOutput; // 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 { - SOURCE((short)1, "source"), - DESTINATION((short)2, "destination"), - /** - * - * @see DataStageType - */ - TYPE((short)3, "type"), - TRANSFER_START_TIME((short)4, "transferStartTime"), - TRANSFER_END_TIME((short)5, "transferEndTime"), - TRANSFER_RATE((short)6, "transferRate"), - PROCESS_INPUT((short)7, "processInput"), - PROCESS_OUTPUT((short)8, "processOutput"); - - 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: // SOURCE - return SOURCE; - case 2: // DESTINATION - return DESTINATION; - case 3: // TYPE - return TYPE; - case 4: // TRANSFER_START_TIME - return TRANSFER_START_TIME; - case 5: // TRANSFER_END_TIME - return TRANSFER_END_TIME; - case 6: // TRANSFER_RATE - return TRANSFER_RATE; - case 7: // PROCESS_INPUT - return PROCESS_INPUT; - case 8: // PROCESS_OUTPUT - return PROCESS_OUTPUT; - 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 __TRANSFERSTARTTIME_ISSET_ID = 0; - private static final int __TRANSFERENDTIME_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TRANSFER_START_TIME,_Fields.TRANSFER_END_TIME,_Fields.TRANSFER_RATE,_Fields.PROCESS_INPUT,_Fields.PROCESS_OUTPUT}; - 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.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DESTINATION, new org.apache.thrift.meta_data.FieldMetaData("destination", 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, DataStageType.class))); - tmpMap.put(_Fields.TRANSFER_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("transferStartTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TRANSFER_END_TIME, new org.apache.thrift.meta_data.FieldMetaData("transferEndTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TRANSFER_RATE, new org.apache.thrift.meta_data.FieldMetaData("transferRate", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PROCESS_INPUT, new org.apache.thrift.meta_data.FieldMetaData("processInput", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.application.io.InputDataObjectType.class))); - tmpMap.put(_Fields.PROCESS_OUTPUT, new org.apache.thrift.meta_data.FieldMetaData("processOutput", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.application.io.OutputDataObjectType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataStagingTaskModel.class, metaDataMap); - } - - public DataStagingTaskModel() { - } - - public DataStagingTaskModel( - String source, - String destination, - DataStageType type) - { - this(); - this.source = source; - this.destination = destination; - this.type = type; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public DataStagingTaskModel(DataStagingTaskModel other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetSource()) { - this.source = other.source; - } - if (other.isSetDestination()) { - this.destination = other.destination; - } - if (other.isSetType()) { - this.type = other.type; - } - this.transferStartTime = other.transferStartTime; - this.transferEndTime = other.transferEndTime; - if (other.isSetTransferRate()) { - this.transferRate = other.transferRate; - } - if (other.isSetProcessInput()) { - this.processInput = new org.apache.airavata.model.application.io.InputDataObjectType(other.processInput); - } - if (other.isSetProcessOutput()) { - this.processOutput = new org.apache.airavata.model.application.io.OutputDataObjectType(other.processOutput); - } - } - - public DataStagingTaskModel deepCopy() { - return new DataStagingTaskModel(this); - } - - @Override - public void clear() { - this.source = null; - this.destination = null; - this.type = null; - setTransferStartTimeIsSet(false); - this.transferStartTime = 0; - setTransferEndTimeIsSet(false); - this.transferEndTime = 0; - this.transferRate = null; - this.processInput = null; - this.processOutput = null; - } - - public String getSource() { - return this.source; - } - - public DataStagingTaskModel setSource(String source) { - this.source = source; - return this; - } - - public void unsetSource() { - this.source = null; - } - - /** Returns true if field source is set (has been assigned a value) and false otherwise */ - public boolean isSetSource() { - return this.source != null; - } - - public void setSourceIsSet(boolean value) { - if (!value) { - this.source = null; - } - } - - public String getDestination() { - return this.destination; - } - - public DataStagingTaskModel setDestination(String destination) { - this.destination = destination; - return this; - } - - public void unsetDestination() { - this.destination = null; - } - - /** Returns true if field destination is set (has been assigned a value) and false otherwise */ - public boolean isSetDestination() { - return this.destination != null; - } - - public void setDestinationIsSet(boolean value) { - if (!value) { - this.destination = null; - } - } - - /** - * - * @see DataStageType - */ - public DataStageType getType() { - return this.type; - } - - /** - * - * @see DataStageType - */ - public DataStagingTaskModel setType(DataStageType type) { - this.type = type; - return this; - } - - 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 long getTransferStartTime() { - return this.transferStartTime; - } - - public DataStagingTaskModel setTransferStartTime(long transferStartTime) { - this.transferStartTime = transferStartTime; - setTransferStartTimeIsSet(true); - return this; - } - - public void unsetTransferStartTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRANSFERSTARTTIME_ISSET_ID); - } - - /** Returns true if field transferStartTime is set (has been assigned a value) and false otherwise */ - public boolean isSetTransferStartTime() { - return EncodingUtils.testBit(__isset_bitfield, __TRANSFERSTARTTIME_ISSET_ID); - } - - public void setTransferStartTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRANSFERSTARTTIME_ISSET_ID, value); - } - - public long getTransferEndTime() { - return this.transferEndTime; - } - - public DataStagingTaskModel setTransferEndTime(long transferEndTime) { - this.transferEndTime = transferEndTime; - setTransferEndTimeIsSet(true); - return this; - } - - public void unsetTransferEndTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRANSFERENDTIME_ISSET_ID); - } - - /** Returns true if field transferEndTime is set (has been assigned a value) and false otherwise */ - public boolean isSetTransferEndTime() { - return EncodingUtils.testBit(__isset_bitfield, __TRANSFERENDTIME_ISSET_ID); - } - - public void setTransferEndTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRANSFERENDTIME_ISSET_ID, value); - } - - public String getTransferRate() { - return this.transferRate; - } - - public DataStagingTaskModel setTransferRate(String transferRate) { - this.transferRate = transferRate; - return this; - } - - public void unsetTransferRate() { - this.transferRate = null; - } - - /** Returns true if field transferRate is set (has been assigned a value) and false otherwise */ - public boolean isSetTransferRate() { - return this.transferRate != null; - } - - public void setTransferRateIsSet(boolean value) { - if (!value) { - this.transferRate = null; - } - } - - public org.apache.airavata.model.application.io.InputDataObjectType getProcessInput() { - return this.processInput; - } - - public DataStagingTaskModel setProcessInput(org.apache.airavata.model.application.io.InputDataObjectType processInput) { - this.processInput = processInput; - return this; - } - - public void unsetProcessInput() { - this.processInput = null; - } - - /** Returns true if field processInput is set (has been assigned a value) and false otherwise */ - public boolean isSetProcessInput() { - return this.processInput != null; - } - - public void setProcessInputIsSet(boolean value) { - if (!value) { - this.processInput = null; - } - } - - public org.apache.airavata.model.application.io.OutputDataObjectType getProcessOutput() { - return this.processOutput; - } - - public DataStagingTaskModel setProcessOutput(org.apache.airavata.model.application.io.OutputDataObjectType processOutput) { - this.processOutput = processOutput; - return this; - } - - public void unsetProcessOutput() { - this.processOutput = null; - } - - /** Returns true if field processOutput is set (has been assigned a value) and false otherwise */ - public boolean isSetProcessOutput() { - return this.processOutput != null; - } - - public void setProcessOutputIsSet(boolean value) { - if (!value) { - this.processOutput = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SOURCE: - if (value == null) { - unsetSource(); - } else { - setSource((String)value); - } - break; - - case DESTINATION: - if (value == null) { - unsetDestination(); - } else { - setDestination((String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((DataStageType)value); - } - break; - - case TRANSFER_START_TIME: - if (value == null) { - unsetTransferStartTime(); - } else { - setTransferStartTime((Long)value); - } - break; - - case TRANSFER_END_TIME: - if (value == null) { - unsetTransferEndTime(); - } else { - setTransferEndTime((Long)value); - } - break; - - case TRANSFER_RATE: - if (value == null) { - unsetTransferRate(); - } else { - setTransferRate((String)value); - } - break; - - case PROCESS_INPUT: - if (value == null) { - unsetProcessInput(); - } else { - setProcessInput((org.apache.airavata.model.application.io.InputDataObjectType)value); - } - break; - - case PROCESS_OUTPUT: - if (value == null) { - unsetProcessOutput(); - } else { - setProcessOutput((org.apache.airavata.model.application.io.OutputDataObjectType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SOURCE: - return getSource(); - - case DESTINATION: - return getDestination(); - - case TYPE: - return getType(); - - case TRANSFER_START_TIME: - return Long.valueOf(getTransferStartTime()); - - case TRANSFER_END_TIME: - return Long.valueOf(getTransferEndTime()); - - case TRANSFER_RATE: - return getTransferRate(); - - case PROCESS_INPUT: - return getProcessInput(); - - case PROCESS_OUTPUT: - return getProcessOutput(); - - } - 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 SOURCE: - return isSetSource(); - case DESTINATION: - return isSetDestination(); - case TYPE: - return isSetType(); - case TRANSFER_START_TIME: - return isSetTransferStartTime(); - case TRANSFER_END_TIME: - return isSetTransferEndTime(); - case TRANSFER_RATE: - return isSetTransferRate(); - case PROCESS_INPUT: - return isSetProcessInput(); - case PROCESS_OUTPUT: - return isSetProcessOutput(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DataStagingTaskModel) - return this.equals((DataStagingTaskModel)that); - return false; - } - - public boolean equals(DataStagingTaskModel that) { - if (that == null) - return false; - - boolean this_present_source = true && this.isSetSource(); - boolean that_present_source = true && that.isSetSource(); - if (this_present_source || that_present_source) { - if (!(this_present_source && that_present_source)) - return false; - if (!this.source.equals(that.source)) - return false; - } - - boolean this_present_destination = true && this.isSetDestination(); - boolean that_present_destination = true && that.isSetDestination(); - if (this_present_destination || that_present_destination) { - if (!(this_present_destination && that_present_destination)) - return false; - if (!this.destination.equals(that.destination)) - 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_transferStartTime = true && this.isSetTransferStartTime(); - boolean that_present_transferStartTime = true && that.isSetTransferStartTime(); - if (this_present_transferStartTime || that_present_transferStartTime) { - if (!(this_present_transferStartTime && that_present_transferStartTime)) - return false; - if (this.transferStartTime != that.transferStartTime) - return false; - } - - boolean this_present_transferEndTime = true && this.isSetTransferEndTime(); - boolean that_present_transferEndTime = true && that.isSetTransferEndTime(); - if (this_present_transferEndTime || that_present_transferEndTime) { - if (!(this_present_transferEndTime && that_present_transferEndTime)) - return false; - if (this.transferEndTime != that.transferEndTime) - return false; - } - - boolean this_present_transferRate = true && this.isSetTransferRate(); - boolean that_present_transferRate = true && that.isSetTransferRate(); - if (this_present_transferRate || that_present_transferRate) { - if (!(this_present_transferRate && that_present_transferRate)) - return false; - if (!this.transferRate.equals(that.transferRate)) - return false; - } - - boolean this_present_processInput = true && this.isSetProcessInput(); - boolean that_present_processInput = true && that.isSetProcessInput(); - if (this_present_processInput || that_present_processInput) { - if (!(this_present_processInput && that_present_processInput)) - return false; - if (!this.processInput.equals(that.processInput)) - return false; - } - - boolean this_present_processOutput = true && this.isSetProcessOutput(); - boolean that_present_processOutput = true && that.isSetProcessOutput(); - if (this_present_processOutput || that_present_processOutput) { - if (!(this_present_processOutput && that_present_processOutput)) - return false; - if (!this.processOutput.equals(that.processOutput)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_source = true && (isSetSource()); - list.add(present_source); - if (present_source) - list.add(source); - - boolean present_destination = true && (isSetDestination()); - list.add(present_destination); - if (present_destination) - list.add(destination); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - boolean present_transferStartTime = true && (isSetTransferStartTime()); - list.add(present_transferStartTime); - if (present_transferStartTime) - list.add(transferStartTime); - - boolean present_transferEndTime = true && (isSetTransferEndTime()); - list.add(present_transferEndTime); - if (present_transferEndTime) - list.add(transferEndTime); - - boolean present_transferRate = true && (isSetTransferRate()); - list.add(present_transferRate); - if (present_transferRate) - list.add(transferRate); - - boolean present_processInput = true && (isSetProcessInput()); - list.add(present_processInput); - if (present_processInput) - list.add(processInput); - - boolean present_processOutput = true && (isSetProcessOutput()); - list.add(present_processOutput); - if (present_processOutput) - list.add(processOutput); - - return list.hashCode(); - } - - @Override - public int compareTo(DataStagingTaskModel other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSource()).compareTo(other.isSetSource()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSource()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, other.source); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDestination()).compareTo(other.isSetDestination()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDestination()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destination, other.destination); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(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 = Boolean.valueOf(isSetTransferStartTime()).compareTo(other.isSetTransferStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransferStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferStartTime, other.transferStartTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTransferEndTime()).compareTo(other.isSetTransferEndTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransferEndTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferEndTime, other.transferEndTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTransferRate()).compareTo(other.isSetTransferRate()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTransferRate()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferRate, other.transferRate); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProcessInput()).compareTo(other.isSetProcessInput()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProcessInput()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processInput, other.processInput); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProcessOutput()).compareTo(other.isSetProcessOutput()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProcessOutput()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processOutput, other.processOutput); - 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("DataStagingTaskModel("); - boolean first = true; - - sb.append("source:"); - if (this.source == null) { - sb.append("null"); - } else { - sb.append(this.source); - } - first = false; - if (!first) sb.append(", "); - sb.append("destination:"); - if (this.destination == null) { - sb.append("null"); - } else { - sb.append(this.destination); - } - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (isSetTransferStartTime()) { - if (!first) sb.append(", "); - sb.append("transferStartTime:"); - sb.append(this.transferStartTime); - first = false; - } - if (isSetTransferEndTime()) { - if (!first) sb.append(", "); - sb.append("transferEndTime:"); - sb.append(this.transferEndTime); - first = false; - } - if (isSetTransferRate()) { - if (!first) sb.append(", "); - sb.append("transferRate:"); - if (this.transferRate == null) { - sb.append("null"); - } else { - sb.append(this.transferRate); - } - first = false; - } - if (isSetProcessInput()) { - if (!first) sb.append(", "); - sb.append("processInput:"); - if (this.processInput == null) { - sb.append("null"); - } else { - sb.append(this.processInput); - } - first = false; - } - if (isSetProcessOutput()) { - if (!first) sb.append(", "); - sb.append("processOutput:"); - if (this.processOutput == null) { - sb.append("null"); - } else { - sb.append(this.processOutput); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (source == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'source' was not present! Struct: " + toString()); - } - if (destination == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'destination' was not present! Struct: " + toString()); - } - if (type == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (processInput != null) { - processInput.validate(); - } - if (processOutput != null) { - processOutput.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 DataStagingTaskModelStandardSchemeFactory implements SchemeFactory { - public DataStagingTaskModelStandardScheme getScheme() { - return new DataStagingTaskModelStandardScheme(); - } - } - - private static class DataStagingTaskModelStandardScheme extends StandardScheme<DataStagingTaskModel> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DataStagingTaskModel 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: // SOURCE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.source = iprot.readString(); - struct.setSourceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DESTINATION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.destination = iprot.readString(); - struct.setDestinationIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.airavata.model.task.DataStageType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TRANSFER_START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transferStartTime = iprot.readI64(); - struct.setTransferStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TRANSFER_END_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.transferEndTime = iprot.readI64(); - struct.setTransferEndTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TRANSFER_RATE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.transferRate = iprot.readString(); - struct.setTransferRateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // PROCESS_INPUT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.processInput = new org.apache.airavata.model.application.io.InputDataObjectType(); - struct.processInput.read(iprot); - struct.setProcessInputIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // PROCESS_OUTPUT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.processOutput = new org.apache.airavata.model.application.io.OutputDataObjectType(); - struct.processOutput.read(iprot); - struct.setProcessOutputIsSet(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, DataStagingTaskModel struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.source != null) { - oprot.writeFieldBegin(SOURCE_FIELD_DESC); - oprot.writeString(struct.source); - oprot.writeFieldEnd(); - } - if (struct.destination != null) { - oprot.writeFieldBegin(DESTINATION_FIELD_DESC); - oprot.writeString(struct.destination); - oprot.writeFieldEnd(); - } - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.isSetTransferStartTime()) { - oprot.writeFieldBegin(TRANSFER_START_TIME_FIELD_DESC); - oprot.writeI64(struct.transferStartTime); - oprot.writeFieldEnd(); - } - if (struct.isSetTransferEndTime()) { - oprot.writeFieldBegin(TRANSFER_END_TIME_FIELD_DESC); - oprot.writeI64(struct.transferEndTime); - oprot.writeFieldEnd(); - } - if (struct.transferRate != null) { - if (struct.isSetTransferRate()) { - oprot.writeFieldBegin(TRANSFER_RATE_FIELD_DESC); - oprot.writeString(struct.transferRate); - oprot.writeFieldEnd(); - } - } - if (struct.processInput != null) { - if (struct.isSetProcessInput()) { - oprot.writeFieldBegin(PROCESS_INPUT_FIELD_DESC); - struct.processInput.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.processOutput != null) { - if (struct.isSetProcessOutput()) { - oprot.writeFieldBegin(PROCESS_OUTPUT_FIELD_DESC); - struct.processOutput.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DataStagingTaskModelTupleSchemeFactory implements SchemeFactory { - public DataStagingTaskModelTupleScheme getScheme() { - return new DataStagingTaskModelTupleScheme(); - } - } - - private static class DataStagingTaskModelTupleScheme extends TupleScheme<DataStagingTaskModel> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DataStagingTaskModel struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.source); - oprot.writeString(struct.destination); - oprot.writeI32(struct.type.getValue()); - BitSet optionals = new BitSet(); - if (struct.isSetTransferStartTime()) { - optionals.set(0); - } - if (struct.isSetTransferEndTime()) { - optionals.set(1); - } - if (struct.isSetTransferRate()) { - optionals.set(2); - } - if (struct.isSetProcessInput()) { - optionals.set(3); - } - if (struct.isSetProcessOutput()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetTransferStartTime()) { - oprot.writeI64(struct.transferStartTime); - } - if (struct.isSetTransferEndTime()) { - oprot.writeI64(struct.transferEndTime); - } - if (struct.isSetTransferRate()) { - oprot.writeString(struct.transferRate); - } - if (struct.isSetProcessInput()) { - struct.processInput.write(oprot); - } - if (struct.isSetProcessOutput()) { - struct.processOutput.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DataStagingTaskModel struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.source = iprot.readString(); - struct.setSourceIsSet(true); - struct.destination = iprot.readString(); - struct.setDestinationIsSet(true); - struct.type = org.apache.airavata.model.task.DataStageType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.transferStartTime = iprot.readI64(); - struct.setTransferStartTimeIsSet(true); - } - if (incoming.get(1)) { - struct.transferEndTime = iprot.readI64(); - struct.setTransferEndTimeIsSet(true); - } - if (incoming.get(2)) { - struct.transferRate = iprot.readString(); - struct.setTransferRateIsSet(true); - } - if (incoming.get(3)) { - struct.processInput = new org.apache.airavata.model.application.io.InputDataObjectType(); - struct.processInput.read(iprot); - struct.setProcessInputIsSet(true); - } - if (incoming.get(4)) { - struct.processOutput = new org.apache.airavata.model.application.io.OutputDataObjectType(); - struct.processOutput.read(iprot); - struct.setProcessOutputIsSet(true); - } - } - } - -} - http://git-wip-us.apache.org/repos/asf/airavata/blob/b490671e/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java deleted file mode 100644 index d211fb2..0000000 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java +++ /dev/null @@ -1,529 +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.task; - -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"}) -/** - * EnvironmentSetupTaskModel: A structure holding the environment creation task details - * - */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-2") -public class EnvironmentSetupTaskModel implements org.apache.thrift.TBase<EnvironmentSetupTaskModel, EnvironmentSetupTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<EnvironmentSetupTaskModel> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EnvironmentSetupTaskModel"); - - private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol", org.apache.thrift.protocol.TType.I32, (short)2); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new EnvironmentSetupTaskModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new EnvironmentSetupTaskModelTupleSchemeFactory()); - } - - public String location; // required - /** - * - * @see org.apache.airavata.model.data.movement.SecurityProtocol - */ - public org.apache.airavata.model.data.movement.SecurityProtocol protocol; // 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 { - LOCATION((short)1, "location"), - /** - * - * @see org.apache.airavata.model.data.movement.SecurityProtocol - */ - PROTOCOL((short)2, "protocol"); - - 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: // LOCATION - return LOCATION; - case 2: // PROTOCOL - return PROTOCOL; - 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.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("protocol", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.data.movement.SecurityProtocol.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EnvironmentSetupTaskModel.class, metaDataMap); - } - - public EnvironmentSetupTaskModel() { - } - - public EnvironmentSetupTaskModel( - String location, - org.apache.airavata.model.data.movement.SecurityProtocol protocol) - { - this(); - this.location = location; - this.protocol = protocol; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public EnvironmentSetupTaskModel(EnvironmentSetupTaskModel other) { - if (other.isSetLocation()) { - this.location = other.location; - } - if (other.isSetProtocol()) { - this.protocol = other.protocol; - } - } - - public EnvironmentSetupTaskModel deepCopy() { - return new EnvironmentSetupTaskModel(this); - } - - @Override - public void clear() { - this.location = null; - this.protocol = null; - } - - public String getLocation() { - return this.location; - } - - public EnvironmentSetupTaskModel setLocation(String location) { - this.location = location; - return this; - } - - public void unsetLocation() { - this.location = null; - } - - /** Returns true if field location is set (has been assigned a value) and false otherwise */ - public boolean isSetLocation() { - return this.location != null; - } - - public void setLocationIsSet(boolean value) { - if (!value) { - this.location = null; - } - } - - /** - * - * @see org.apache.airavata.model.data.movement.SecurityProtocol - */ - public org.apache.airavata.model.data.movement.SecurityProtocol getProtocol() { - return this.protocol; - } - - /** - * - * @see org.apache.airavata.model.data.movement.SecurityProtocol - */ - public EnvironmentSetupTaskModel setProtocol(org.apache.airavata.model.data.movement.SecurityProtocol protocol) { - this.protocol = protocol; - return this; - } - - public void unsetProtocol() { - this.protocol = null; - } - - /** Returns true if field protocol is set (has been assigned a value) and false otherwise */ - public boolean isSetProtocol() { - return this.protocol != null; - } - - public void setProtocolIsSet(boolean value) { - if (!value) { - this.protocol = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCATION: - if (value == null) { - unsetLocation(); - } else { - setLocation((String)value); - } - break; - - case PROTOCOL: - if (value == null) { - unsetProtocol(); - } else { - setProtocol((org.apache.airavata.model.data.movement.SecurityProtocol)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCATION: - return getLocation(); - - case PROTOCOL: - return getProtocol(); - - } - 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 LOCATION: - return isSetLocation(); - case PROTOCOL: - return isSetProtocol(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof EnvironmentSetupTaskModel) - return this.equals((EnvironmentSetupTaskModel)that); - return false; - } - - public boolean equals(EnvironmentSetupTaskModel that) { - if (that == null) - return false; - - boolean this_present_location = true && this.isSetLocation(); - boolean that_present_location = true && that.isSetLocation(); - if (this_present_location || that_present_location) { - if (!(this_present_location && that_present_location)) - return false; - if (!this.location.equals(that.location)) - return false; - } - - boolean this_present_protocol = true && this.isSetProtocol(); - boolean that_present_protocol = true && that.isSetProtocol(); - if (this_present_protocol || that_present_protocol) { - if (!(this_present_protocol && that_present_protocol)) - return false; - if (!this.protocol.equals(that.protocol)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_location = true && (isSetLocation()); - list.add(present_location); - if (present_location) - list.add(location); - - boolean present_protocol = true && (isSetProtocol()); - list.add(present_protocol); - if (present_protocol) - list.add(protocol.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(EnvironmentSetupTaskModel other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLocation()).compareTo(other.isSetLocation()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLocation()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, other.location); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProtocol()).compareTo(other.isSetProtocol()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProtocol()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.protocol, other.protocol); - 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("EnvironmentSetupTaskModel("); - boolean first = true; - - sb.append("location:"); - if (this.location == null) { - sb.append("null"); - } else { - sb.append(this.location); - } - first = false; - if (!first) sb.append(", "); - sb.append("protocol:"); - if (this.protocol == null) { - sb.append("null"); - } else { - sb.append(this.protocol); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (location == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'location' was not present! Struct: " + toString()); - } - if (protocol == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol' 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 EnvironmentSetupTaskModelStandardSchemeFactory implements SchemeFactory { - public EnvironmentSetupTaskModelStandardScheme getScheme() { - return new EnvironmentSetupTaskModelStandardScheme(); - } - } - - private static class EnvironmentSetupTaskModelStandardScheme extends StandardScheme<EnvironmentSetupTaskModel> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, EnvironmentSetupTaskModel 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: // LOCATION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.location = iprot.readString(); - struct.setLocationIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PROTOCOL - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.protocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32()); - struct.setProtocolIsSet(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, EnvironmentSetupTaskModel struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.location != null) { - oprot.writeFieldBegin(LOCATION_FIELD_DESC); - oprot.writeString(struct.location); - oprot.writeFieldEnd(); - } - if (struct.protocol != null) { - oprot.writeFieldBegin(PROTOCOL_FIELD_DESC); - oprot.writeI32(struct.protocol.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class EnvironmentSetupTaskModelTupleSchemeFactory implements SchemeFactory { - public EnvironmentSetupTaskModelTupleScheme getScheme() { - return new EnvironmentSetupTaskModelTupleScheme(); - } - } - - private static class EnvironmentSetupTaskModelTupleScheme extends TupleScheme<EnvironmentSetupTaskModel> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, EnvironmentSetupTaskModel struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.location); - oprot.writeI32(struct.protocol.getValue()); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, EnvironmentSetupTaskModel struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.location = iprot.readString(); - struct.setLocationIsSet(true); - struct.protocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32()); - struct.setProtocolIsSet(true); - } - } - -} -
