| /** |
| * 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 ApplicationStatus implements org.apache.thrift.TBase<ApplicationStatus, ApplicationStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationStatus> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationStatus"); |
| |
| 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 STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)2); |
| private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3); |
| 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)4); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ApplicationStatusStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ApplicationStatusTupleSchemeFactory(); |
| |
| private @org.apache.thrift.annotation.Nullable java.lang.String id; // optional |
| private @org.apache.thrift.annotation.Nullable ApplicationState state; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String description; // 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 ApplicationState |
| */ |
| STATE((short)2, "state"), |
| DESCRIPTION((short)3, "description"), |
| UPDATED_AT((short)4, "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: // STATE |
| return STATE; |
| case 3: // DESCRIPTION |
| return DESCRIPTION; |
| case 4: // 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 __UPDATEDAT_ISSET_ID = 0; |
| private byte __isset_bitfield = 0; |
| private static final _Fields optionals[] = {_Fields.ID,_Fields.DESCRIPTION,_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.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| 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, ApplicationState.class))); |
| tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| 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(ApplicationStatus.class, metaDataMap); |
| } |
| |
| public ApplicationStatus() { |
| } |
| |
| public ApplicationStatus( |
| ApplicationState state) |
| { |
| this(); |
| this.state = state; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public ApplicationStatus(ApplicationStatus other) { |
| __isset_bitfield = other.__isset_bitfield; |
| if (other.isSetId()) { |
| this.id = other.id; |
| } |
| if (other.isSetState()) { |
| this.state = other.state; |
| } |
| if (other.isSetDescription()) { |
| this.description = other.description; |
| } |
| this.updatedAt = other.updatedAt; |
| } |
| |
| @Override |
| public ApplicationStatus deepCopy() { |
| return new ApplicationStatus(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.id = null; |
| this.state = null; |
| this.description = null; |
| 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 ApplicationState |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public ApplicationState getState() { |
| return this.state; |
| } |
| |
| /** |
| * |
| * @see ApplicationState |
| */ |
| public void setState(@org.apache.thrift.annotation.Nullable ApplicationState state) { |
| this.state = state; |
| } |
| |
| 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; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getDescription() { |
| return this.description; |
| } |
| |
| public void setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) { |
| this.description = description; |
| } |
| |
| public void unsetDescription() { |
| this.description = null; |
| } |
| |
| /** Returns true if field description is set (has been assigned a value) and false otherwise */ |
| public boolean isSetDescription() { |
| return this.description != null; |
| } |
| |
| public void setDescriptionIsSet(boolean value) { |
| if (!value) { |
| this.description = null; |
| } |
| } |
| |
| 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 STATE: |
| if (value == null) { |
| unsetState(); |
| } else { |
| setState((ApplicationState)value); |
| } |
| break; |
| |
| case DESCRIPTION: |
| if (value == null) { |
| unsetDescription(); |
| } else { |
| setDescription((java.lang.String)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 STATE: |
| return getState(); |
| |
| case DESCRIPTION: |
| return getDescription(); |
| |
| 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 STATE: |
| return isSetState(); |
| case DESCRIPTION: |
| return isSetDescription(); |
| case UPDATED_AT: |
| return isSetUpdatedAt(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that instanceof ApplicationStatus) |
| return this.equals((ApplicationStatus)that); |
| return false; |
| } |
| |
| public boolean equals(ApplicationStatus 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_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_description = true && this.isSetDescription(); |
| boolean that_present_description = true && that.isSetDescription(); |
| if (this_present_description || that_present_description) { |
| if (!(this_present_description && that_present_description)) |
| return false; |
| if (!this.description.equals(that.description)) |
| 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 + ((isSetState()) ? 131071 : 524287); |
| if (isSetState()) |
| hashCode = hashCode * 8191 + state.getValue(); |
| |
| hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287); |
| if (isSetDescription()) |
| hashCode = hashCode * 8191 + description.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetUpdatedAt()) ? 131071 : 524287); |
| if (isSetUpdatedAt()) |
| hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updatedAt); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(ApplicationStatus 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(isSetState(), 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 = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetDescription()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); |
| 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("ApplicationStatus("); |
| boolean first = true; |
| |
| if (isSetId()) { |
| sb.append("id:"); |
| if (this.id == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.id); |
| } |
| first = false; |
| } |
| if (!first) sb.append(", "); |
| sb.append("state:"); |
| if (this.state == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.state); |
| } |
| first = false; |
| if (isSetDescription()) { |
| if (!first) sb.append(", "); |
| sb.append("description:"); |
| if (this.description == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.description); |
| } |
| 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 (!isSetState()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' 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 ApplicationStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public ApplicationStatusStandardScheme getScheme() { |
| return new ApplicationStatusStandardScheme(); |
| } |
| } |
| |
| private static class ApplicationStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<ApplicationStatus> { |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot, ApplicationStatus 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: // STATE |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.state = org.apache.airavata.model.workflow.ApplicationState.findByValue(iprot.readI32()); |
| struct.setStateIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // DESCRIPTION |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.description = iprot.readString(); |
| struct.setDescriptionIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // 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, ApplicationStatus struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.id != null) { |
| if (struct.isSetId()) { |
| oprot.writeFieldBegin(ID_FIELD_DESC); |
| oprot.writeString(struct.id); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.state != null) { |
| oprot.writeFieldBegin(STATE_FIELD_DESC); |
| oprot.writeI32(struct.state.getValue()); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.description != null) { |
| if (struct.isSetDescription()) { |
| oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); |
| oprot.writeString(struct.description); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetUpdatedAt()) { |
| oprot.writeFieldBegin(UPDATED_AT_FIELD_DESC); |
| oprot.writeI64(struct.updatedAt); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class ApplicationStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public ApplicationStatusTupleScheme getScheme() { |
| return new ApplicationStatusTupleScheme(); |
| } |
| } |
| |
| private static class ApplicationStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<ApplicationStatus> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, ApplicationStatus struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| oprot.writeI32(struct.state.getValue()); |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetId()) { |
| optionals.set(0); |
| } |
| if (struct.isSetDescription()) { |
| optionals.set(1); |
| } |
| if (struct.isSetUpdatedAt()) { |
| optionals.set(2); |
| } |
| oprot.writeBitSet(optionals, 3); |
| if (struct.isSetId()) { |
| oprot.writeString(struct.id); |
| } |
| if (struct.isSetDescription()) { |
| oprot.writeString(struct.description); |
| } |
| if (struct.isSetUpdatedAt()) { |
| oprot.writeI64(struct.updatedAt); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, ApplicationStatus struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| struct.state = org.apache.airavata.model.workflow.ApplicationState.findByValue(iprot.readI32()); |
| struct.setStateIsSet(true); |
| java.util.BitSet incoming = iprot.readBitSet(3); |
| if (incoming.get(0)) { |
| struct.id = iprot.readString(); |
| struct.setIdIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.description = iprot.readString(); |
| struct.setDescriptionIsSet(true); |
| } |
| if (incoming.get(2)) { |
| 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(); |
| } |
| } |
| |