| /** |
| * 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.10.0) |
| * |
| * 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.10.0)") |
| public class DataBlock implements org.apache.thrift.TBase<DataBlock, DataBlock._Fields>, java.io.Serializable, Cloneable, Comparable<DataBlock> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataBlock"); |
| |
| 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 VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", 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 CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)4); |
| 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)5); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DataBlockStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DataBlockTupleSchemeFactory(); |
| |
| private java.lang.String id; // required |
| private java.lang.String value; // optional |
| private org.apache.airavata.model.application.io.DataType type; // optional |
| private long createdAt; // optional |
| private long updatedAt; // optional |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| ID((short)1, "id"), |
| VALUE((short)2, "value"), |
| /** |
| * |
| * @see org.apache.airavata.model.application.io.DataType |
| */ |
| TYPE((short)3, "type"), |
| CREATED_AT((short)4, "createdAt"), |
| UPDATED_AT((short)5, "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. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // ID |
| return ID; |
| case 2: // VALUE |
| return VALUE; |
| case 3: // TYPE |
| return TYPE; |
| case 4: // CREATED_AT |
| return CREATED_AT; |
| case 5: // 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. |
| */ |
| 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; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final int __CREATEDAT_ISSET_ID = 0; |
| private static final int __UPDATEDAT_ISSET_ID = 1; |
| private byte __isset_bitfield = 0; |
| private static final _Fields optionals[] = {_Fields.VALUE,_Fields.TYPE,_Fields.CREATED_AT,_Fields.UPDATED_AT}; |
| public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| 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.OPTIONAL, |
| new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.application.io.DataType.class))); |
| tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); |
| tmpMap.put(_Fields.UPDATED_AT, new org.apache.thrift.meta_data.FieldMetaData("updatedAt", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); |
| metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataBlock.class, metaDataMap); |
| } |
| |
| public DataBlock() { |
| } |
| |
| public DataBlock( |
| java.lang.String id) |
| { |
| this(); |
| this.id = id; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public DataBlock(DataBlock other) { |
| __isset_bitfield = other.__isset_bitfield; |
| if (other.isSetId()) { |
| this.id = other.id; |
| } |
| if (other.isSetValue()) { |
| this.value = other.value; |
| } |
| if (other.isSetType()) { |
| this.type = other.type; |
| } |
| this.createdAt = other.createdAt; |
| this.updatedAt = other.updatedAt; |
| } |
| |
| public DataBlock deepCopy() { |
| return new DataBlock(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.id = null; |
| this.value = null; |
| this.type = null; |
| setCreatedAtIsSet(false); |
| this.createdAt = 0; |
| setUpdatedAtIsSet(false); |
| this.updatedAt = 0; |
| } |
| |
| public java.lang.String getId() { |
| return this.id; |
| } |
| |
| public void setId(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; |
| } |
| } |
| |
| public java.lang.String getValue() { |
| return this.value; |
| } |
| |
| public void setValue(java.lang.String value) { |
| this.value = value; |
| } |
| |
| public void unsetValue() { |
| this.value = null; |
| } |
| |
| /** Returns true if field value is set (has been assigned a value) and false otherwise */ |
| public boolean isSetValue() { |
| return this.value != null; |
| } |
| |
| public void setValueIsSet(boolean value) { |
| if (!value) { |
| this.value = null; |
| } |
| } |
| |
| /** |
| * |
| * @see org.apache.airavata.model.application.io.DataType |
| */ |
| public org.apache.airavata.model.application.io.DataType getType() { |
| return this.type; |
| } |
| |
| /** |
| * |
| * @see org.apache.airavata.model.application.io.DataType |
| */ |
| public void setType(org.apache.airavata.model.application.io.DataType type) { |
| this.type = type; |
| } |
| |
| public void unsetType() { |
| this.type = null; |
| } |
| |
| /** Returns true if field type is set (has been assigned a value) and false otherwise */ |
| public boolean isSetType() { |
| return this.type != null; |
| } |
| |
| public void setTypeIsSet(boolean value) { |
| if (!value) { |
| this.type = null; |
| } |
| } |
| |
| public long getCreatedAt() { |
| return this.createdAt; |
| } |
| |
| public void setCreatedAt(long createdAt) { |
| this.createdAt = createdAt; |
| setCreatedAtIsSet(true); |
| } |
| |
| public void unsetCreatedAt() { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATEDAT_ISSET_ID); |
| } |
| |
| /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */ |
| public boolean isSetCreatedAt() { |
| return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATEDAT_ISSET_ID); |
| } |
| |
| public void setCreatedAtIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATEDAT_ISSET_ID, value); |
| } |
| |
| public long getUpdatedAt() { |
| return this.updatedAt; |
| } |
| |
| public void setUpdatedAt(long updatedAt) { |
| this.updatedAt = updatedAt; |
| setUpdatedAtIsSet(true); |
| } |
| |
| public void unsetUpdatedAt() { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEDAT_ISSET_ID); |
| } |
| |
| /** Returns true if field updatedAt is set (has been assigned a value) and false otherwise */ |
| public boolean isSetUpdatedAt() { |
| return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEDAT_ISSET_ID); |
| } |
| |
| public void setUpdatedAtIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEDAT_ISSET_ID, value); |
| } |
| |
| public void setFieldValue(_Fields field, java.lang.Object value) { |
| switch (field) { |
| case ID: |
| if (value == null) { |
| unsetId(); |
| } else { |
| setId((java.lang.String)value); |
| } |
| break; |
| |
| case VALUE: |
| if (value == null) { |
| unsetValue(); |
| } else { |
| setValue((java.lang.String)value); |
| } |
| break; |
| |
| case TYPE: |
| if (value == null) { |
| unsetType(); |
| } else { |
| setType((org.apache.airavata.model.application.io.DataType)value); |
| } |
| break; |
| |
| case CREATED_AT: |
| if (value == null) { |
| unsetCreatedAt(); |
| } else { |
| setCreatedAt((java.lang.Long)value); |
| } |
| break; |
| |
| case UPDATED_AT: |
| if (value == null) { |
| unsetUpdatedAt(); |
| } else { |
| setUpdatedAt((java.lang.Long)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case ID: |
| return getId(); |
| |
| case VALUE: |
| return getValue(); |
| |
| case TYPE: |
| return getType(); |
| |
| case CREATED_AT: |
| return getCreatedAt(); |
| |
| case UPDATED_AT: |
| return getUpdatedAt(); |
| |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case ID: |
| return isSetId(); |
| case VALUE: |
| return isSetValue(); |
| case TYPE: |
| return isSetType(); |
| case CREATED_AT: |
| return isSetCreatedAt(); |
| case UPDATED_AT: |
| return isSetUpdatedAt(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof DataBlock) |
| return this.equals((DataBlock)that); |
| return false; |
| } |
| |
| public boolean equals(DataBlock 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_value = true && this.isSetValue(); |
| boolean that_present_value = true && that.isSetValue(); |
| if (this_present_value || that_present_value) { |
| if (!(this_present_value && that_present_value)) |
| return false; |
| if (!this.value.equals(that.value)) |
| 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_createdAt = true && this.isSetCreatedAt(); |
| boolean that_present_createdAt = true && that.isSetCreatedAt(); |
| if (this_present_createdAt || that_present_createdAt) { |
| if (!(this_present_createdAt && that_present_createdAt)) |
| return false; |
| if (this.createdAt != that.createdAt) |
| return false; |
| } |
| |
| boolean this_present_updatedAt = true && this.isSetUpdatedAt(); |
| boolean that_present_updatedAt = true && that.isSetUpdatedAt(); |
| if (this_present_updatedAt || that_present_updatedAt) { |
| if (!(this_present_updatedAt && that_present_updatedAt)) |
| return false; |
| if (this.updatedAt != that.updatedAt) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287); |
| if (isSetId()) |
| hashCode = hashCode * 8191 + id.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); |
| if (isSetValue()) |
| hashCode = hashCode * 8191 + value.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); |
| if (isSetType()) |
| hashCode = hashCode * 8191 + type.getValue(); |
| |
| hashCode = hashCode * 8191 + ((isSetCreatedAt()) ? 131071 : 524287); |
| if (isSetCreatedAt()) |
| hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createdAt); |
| |
| hashCode = hashCode * 8191 + ((isSetUpdatedAt()) ? 131071 : 524287); |
| if (isSetUpdatedAt()) |
| hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updatedAt); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(DataBlock other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(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.valueOf(isSetValue()).compareTo(other.isSetValue()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetValue()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetCreatedAt()).compareTo(other.isSetCreatedAt()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetCreatedAt()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, other.createdAt); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetUpdatedAt()).compareTo(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; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| 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("DataBlock("); |
| boolean first = true; |
| |
| sb.append("id:"); |
| if (this.id == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.id); |
| } |
| first = false; |
| if (isSetValue()) { |
| if (!first) sb.append(", "); |
| sb.append("value:"); |
| if (this.value == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.value); |
| } |
| first = false; |
| } |
| if (isSetType()) { |
| if (!first) sb.append(", "); |
| sb.append("type:"); |
| if (this.type == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.type); |
| } |
| first = false; |
| } |
| if (isSetCreatedAt()) { |
| if (!first) sb.append(", "); |
| sb.append("createdAt:"); |
| sb.append(this.createdAt); |
| first = false; |
| } |
| if (isSetUpdatedAt()) { |
| if (!first) sb.append(", "); |
| sb.append("updatedAt:"); |
| sb.append(this.updatedAt); |
| first = false; |
| } |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (!isSetId()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); |
| } |
| |
| // 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 DataBlockStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public DataBlockStandardScheme getScheme() { |
| return new DataBlockStandardScheme(); |
| } |
| } |
| |
| private static class DataBlockStandardScheme extends org.apache.thrift.scheme.StandardScheme<DataBlock> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, DataBlock 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: // VALUE |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.value = iprot.readString(); |
| struct.setValueIsSet(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.application.io.DataType.findByValue(iprot.readI32()); |
| struct.setTypeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // CREATED_AT |
| if (schemeField.type == org.apache.thrift.protocol.TType.I64) { |
| struct.createdAt = iprot.readI64(); |
| struct.setCreatedAtIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 5: // 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(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, DataBlock struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.id != null) { |
| oprot.writeFieldBegin(ID_FIELD_DESC); |
| oprot.writeString(struct.id); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.value != null) { |
| if (struct.isSetValue()) { |
| oprot.writeFieldBegin(VALUE_FIELD_DESC); |
| oprot.writeString(struct.value); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.type != null) { |
| if (struct.isSetType()) { |
| oprot.writeFieldBegin(TYPE_FIELD_DESC); |
| oprot.writeI32(struct.type.getValue()); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetCreatedAt()) { |
| oprot.writeFieldBegin(CREATED_AT_FIELD_DESC); |
| oprot.writeI64(struct.createdAt); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetUpdatedAt()) { |
| oprot.writeFieldBegin(UPDATED_AT_FIELD_DESC); |
| oprot.writeI64(struct.updatedAt); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class DataBlockTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public DataBlockTupleScheme getScheme() { |
| return new DataBlockTupleScheme(); |
| } |
| } |
| |
| private static class DataBlockTupleScheme extends org.apache.thrift.scheme.TupleScheme<DataBlock> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, DataBlock struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| oprot.writeString(struct.id); |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetValue()) { |
| optionals.set(0); |
| } |
| if (struct.isSetType()) { |
| optionals.set(1); |
| } |
| if (struct.isSetCreatedAt()) { |
| optionals.set(2); |
| } |
| if (struct.isSetUpdatedAt()) { |
| optionals.set(3); |
| } |
| oprot.writeBitSet(optionals, 4); |
| if (struct.isSetValue()) { |
| oprot.writeString(struct.value); |
| } |
| if (struct.isSetType()) { |
| oprot.writeI32(struct.type.getValue()); |
| } |
| if (struct.isSetCreatedAt()) { |
| oprot.writeI64(struct.createdAt); |
| } |
| if (struct.isSetUpdatedAt()) { |
| oprot.writeI64(struct.updatedAt); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, DataBlock struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| struct.id = iprot.readString(); |
| struct.setIdIsSet(true); |
| java.util.BitSet incoming = iprot.readBitSet(4); |
| if (incoming.get(0)) { |
| struct.value = iprot.readString(); |
| struct.setValueIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.type = org.apache.airavata.model.application.io.DataType.findByValue(iprot.readI32()); |
| struct.setTypeIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.createdAt = iprot.readI64(); |
| struct.setCreatedAtIsSet(true); |
| } |
| if (incoming.get(3)) { |
| 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(); |
| } |
| } |
| |