/** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.wso2.carbon.cloud.gateway.common.thrift.gen; 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 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Message implements org.apache.thrift.TBase<Message, Message._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Message"); private static final org.apache.thrift.protocol.TField MESSAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("messageId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField CONTENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("contentType", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField SOAP_ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("soapAction", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("epoch", org.apache.thrift.protocol.TType.I64, (short)5); private static final org.apache.thrift.protocol.TField TRANSPORT_HEADERS_FIELD_DESC = new org.apache.thrift.protocol.TField("transportHeaders", org.apache.thrift.protocol.TType.MAP, (short)6); private static final org.apache.thrift.protocol.TField REQUEST_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("requestURI", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.protocol.TField IS_DOING_REST_FIELD_DESC = new org.apache.thrift.protocol.TField("isDoingREST", org.apache.thrift.protocol.TType.BOOL, (short)8); private static final org.apache.thrift.protocol.TField HTTP_METHOD_FIELD_DESC = new org.apache.thrift.protocol.TField("httpMethod", org.apache.thrift.protocol.TType.STRING, (short)9); private static final org.apache.thrift.protocol.TField IS_DOING_MTOM_FIELD_DESC = new org.apache.thrift.protocol.TField("isDoingMTOM", org.apache.thrift.protocol.TType.BOOL, (short)10); private static final org.apache.thrift.protocol.TField IS_DOING_SW_A_FIELD_DESC = new org.apache.thrift.protocol.TField("isDoingSwA", org.apache.thrift.protocol.TType.BOOL, (short)11); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new MessageStandardSchemeFactory()); schemes.put(TupleScheme.class, new MessageTupleSchemeFactory()); } public String messageId; // required public String contentType; // required public ByteBuffer message; // required public String soapAction; // required public long epoch; // required public Map<String,String> transportHeaders; // required public String requestURI; // required public boolean isDoingREST; // required public String httpMethod; // required public boolean isDoingMTOM; // required public boolean isDoingSwA; // 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 { MESSAGE_ID((short)1, "messageId"), CONTENT_TYPE((short)2, "contentType"), MESSAGE((short)3, "message"), SOAP_ACTION((short)4, "soapAction"), EPOCH((short)5, "epoch"), TRANSPORT_HEADERS((short)6, "transportHeaders"), REQUEST_URI((short)7, "requestURI"), IS_DOING_REST((short)8, "isDoingREST"), HTTP_METHOD((short)9, "httpMethod"), IS_DOING_MTOM((short)10, "isDoingMTOM"), IS_DOING_SW_A((short)11, "isDoingSwA"); 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: // MESSAGE_ID return MESSAGE_ID; case 2: // CONTENT_TYPE return CONTENT_TYPE; case 3: // MESSAGE return MESSAGE; case 4: // SOAP_ACTION return SOAP_ACTION; case 5: // EPOCH return EPOCH; case 6: // TRANSPORT_HEADERS return TRANSPORT_HEADERS; case 7: // REQUEST_URI return REQUEST_URI; case 8: // IS_DOING_REST return IS_DOING_REST; case 9: // HTTP_METHOD return HTTP_METHOD; case 10: // IS_DOING_MTOM return IS_DOING_MTOM; case 11: // IS_DOING_SW_A return IS_DOING_SW_A; 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 __EPOCH_ISSET_ID = 0; private static final int __ISDOINGREST_ISSET_ID = 1; private static final int __ISDOINGMTOM_ISSET_ID = 2; private static final int __ISDOINGSWA_ISSET_ID = 3; private BitSet __isset_bit_vector = new BitSet(4); 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.MESSAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("messageId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CONTENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("contentType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.SOAP_ACTION, new org.apache.thrift.meta_data.FieldMetaData("soapAction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EPOCH, new org.apache.thrift.meta_data.FieldMetaData("epoch", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TRANSPORT_HEADERS, new org.apache.thrift.meta_data.FieldMetaData("transportHeaders", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.REQUEST_URI, new org.apache.thrift.meta_data.FieldMetaData("requestURI", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IS_DOING_REST, new org.apache.thrift.meta_data.FieldMetaData("isDoingREST", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.HTTP_METHOD, new org.apache.thrift.meta_data.FieldMetaData("httpMethod", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IS_DOING_MTOM, new org.apache.thrift.meta_data.FieldMetaData("isDoingMTOM", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.IS_DOING_SW_A, new org.apache.thrift.meta_data.FieldMetaData("isDoingSwA", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Message.class, metaDataMap); } public Message() { } public Message( String messageId, String contentType, ByteBuffer message, String soapAction, long epoch, Map<String,String> transportHeaders, String requestURI, boolean isDoingREST, String httpMethod, boolean isDoingMTOM, boolean isDoingSwA) { this(); this.messageId = messageId; this.contentType = contentType; this.message = message; this.soapAction = soapAction; this.epoch = epoch; setEpochIsSet(true); this.transportHeaders = transportHeaders; this.requestURI = requestURI; this.isDoingREST = isDoingREST; setIsDoingRESTIsSet(true); this.httpMethod = httpMethod; this.isDoingMTOM = isDoingMTOM; setIsDoingMTOMIsSet(true); this.isDoingSwA = isDoingSwA; setIsDoingSwAIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public Message(Message other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetMessageId()) { this.messageId = other.messageId; } if (other.isSetContentType()) { this.contentType = other.contentType; } if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } if (other.isSetSoapAction()) { this.soapAction = other.soapAction; } this.epoch = other.epoch; if (other.isSetTransportHeaders()) { Map<String,String> __this__transportHeaders = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.transportHeaders.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__transportHeaders_copy_key = other_element_key; String __this__transportHeaders_copy_value = other_element_value; __this__transportHeaders.put(__this__transportHeaders_copy_key, __this__transportHeaders_copy_value); } this.transportHeaders = __this__transportHeaders; } if (other.isSetRequestURI()) { this.requestURI = other.requestURI; } this.isDoingREST = other.isDoingREST; if (other.isSetHttpMethod()) { this.httpMethod = other.httpMethod; } this.isDoingMTOM = other.isDoingMTOM; this.isDoingSwA = other.isDoingSwA; } public Message deepCopy() { return new Message(this); } @Override public void clear() { this.messageId = null; this.contentType = null; this.message = null; this.soapAction = null; setEpochIsSet(false); this.epoch = 0; this.transportHeaders = null; this.requestURI = null; setIsDoingRESTIsSet(false); this.isDoingREST = false; this.httpMethod = null; setIsDoingMTOMIsSet(false); this.isDoingMTOM = false; setIsDoingSwAIsSet(false); this.isDoingSwA = false; } public String getMessageId() { return this.messageId; } public Message setMessageId(String messageId) { this.messageId = messageId; return this; } public void unsetMessageId() { this.messageId = null; } /** Returns true if field messageId is set (has been assigned a value) and false otherwise */ public boolean isSetMessageId() { return this.messageId != null; } public void setMessageIdIsSet(boolean value) { if (!value) { this.messageId = null; } } public String getContentType() { return this.contentType; } public Message setContentType(String contentType) { this.contentType = contentType; return this; } public void unsetContentType() { this.contentType = null; } /** Returns true if field contentType is set (has been assigned a value) and false otherwise */ public boolean isSetContentType() { return this.contentType != null; } public void setContentTypeIsSet(boolean value) { if (!value) { this.contentType = null; } } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public Message setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public Message setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public String getSoapAction() { return this.soapAction; } public Message setSoapAction(String soapAction) { this.soapAction = soapAction; return this; } public void unsetSoapAction() { this.soapAction = null; } /** Returns true if field soapAction is set (has been assigned a value) and false otherwise */ public boolean isSetSoapAction() { return this.soapAction != null; } public void setSoapActionIsSet(boolean value) { if (!value) { this.soapAction = null; } } public long getEpoch() { return this.epoch; } public Message setEpoch(long epoch) { this.epoch = epoch; setEpochIsSet(true); return this; } public void unsetEpoch() { __isset_bit_vector.clear(__EPOCH_ISSET_ID); } /** Returns true if field epoch is set (has been assigned a value) and false otherwise */ public boolean isSetEpoch() { return __isset_bit_vector.get(__EPOCH_ISSET_ID); } public void setEpochIsSet(boolean value) { __isset_bit_vector.set(__EPOCH_ISSET_ID, value); } public int getTransportHeadersSize() { return (this.transportHeaders == null) ? 0 : this.transportHeaders.size(); } public void putToTransportHeaders(String key, String val) { if (this.transportHeaders == null) { this.transportHeaders = new HashMap<String,String>(); } this.transportHeaders.put(key, val); } public Map<String,String> getTransportHeaders() { return this.transportHeaders; } public Message setTransportHeaders(Map<String,String> transportHeaders) { this.transportHeaders = transportHeaders; return this; } public void unsetTransportHeaders() { this.transportHeaders = null; } /** Returns true if field transportHeaders is set (has been assigned a value) and false otherwise */ public boolean isSetTransportHeaders() { return this.transportHeaders != null; } public void setTransportHeadersIsSet(boolean value) { if (!value) { this.transportHeaders = null; } } public String getRequestURI() { return this.requestURI; } public Message setRequestURI(String requestURI) { this.requestURI = requestURI; return this; } public void unsetRequestURI() { this.requestURI = null; } /** Returns true if field requestURI is set (has been assigned a value) and false otherwise */ public boolean isSetRequestURI() { return this.requestURI != null; } public void setRequestURIIsSet(boolean value) { if (!value) { this.requestURI = null; } } public boolean isIsDoingREST() { return this.isDoingREST; } public Message setIsDoingREST(boolean isDoingREST) { this.isDoingREST = isDoingREST; setIsDoingRESTIsSet(true); return this; } public void unsetIsDoingREST() { __isset_bit_vector.clear(__ISDOINGREST_ISSET_ID); } /** Returns true if field isDoingREST is set (has been assigned a value) and false otherwise */ public boolean isSetIsDoingREST() { return __isset_bit_vector.get(__ISDOINGREST_ISSET_ID); } public void setIsDoingRESTIsSet(boolean value) { __isset_bit_vector.set(__ISDOINGREST_ISSET_ID, value); } public String getHttpMethod() { return this.httpMethod; } public Message setHttpMethod(String httpMethod) { this.httpMethod = httpMethod; return this; } public void unsetHttpMethod() { this.httpMethod = null; } /** Returns true if field httpMethod is set (has been assigned a value) and false otherwise */ public boolean isSetHttpMethod() { return this.httpMethod != null; } public void setHttpMethodIsSet(boolean value) { if (!value) { this.httpMethod = null; } } public boolean isIsDoingMTOM() { return this.isDoingMTOM; } public Message setIsDoingMTOM(boolean isDoingMTOM) { this.isDoingMTOM = isDoingMTOM; setIsDoingMTOMIsSet(true); return this; } public void unsetIsDoingMTOM() { __isset_bit_vector.clear(__ISDOINGMTOM_ISSET_ID); } /** Returns true if field isDoingMTOM is set (has been assigned a value) and false otherwise */ public boolean isSetIsDoingMTOM() { return __isset_bit_vector.get(__ISDOINGMTOM_ISSET_ID); } public void setIsDoingMTOMIsSet(boolean value) { __isset_bit_vector.set(__ISDOINGMTOM_ISSET_ID, value); } public boolean isIsDoingSwA() { return this.isDoingSwA; } public Message setIsDoingSwA(boolean isDoingSwA) { this.isDoingSwA = isDoingSwA; setIsDoingSwAIsSet(true); return this; } public void unsetIsDoingSwA() { __isset_bit_vector.clear(__ISDOINGSWA_ISSET_ID); } /** Returns true if field isDoingSwA is set (has been assigned a value) and false otherwise */ public boolean isSetIsDoingSwA() { return __isset_bit_vector.get(__ISDOINGSWA_ISSET_ID); } public void setIsDoingSwAIsSet(boolean value) { __isset_bit_vector.set(__ISDOINGSWA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case MESSAGE_ID: if (value == null) { unsetMessageId(); } else { setMessageId((String)value); } break; case CONTENT_TYPE: if (value == null) { unsetContentType(); } else { setContentType((String)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; case SOAP_ACTION: if (value == null) { unsetSoapAction(); } else { setSoapAction((String)value); } break; case EPOCH: if (value == null) { unsetEpoch(); } else { setEpoch((Long)value); } break; case TRANSPORT_HEADERS: if (value == null) { unsetTransportHeaders(); } else { setTransportHeaders((Map<String,String>)value); } break; case REQUEST_URI: if (value == null) { unsetRequestURI(); } else { setRequestURI((String)value); } break; case IS_DOING_REST: if (value == null) { unsetIsDoingREST(); } else { setIsDoingREST((Boolean)value); } break; case HTTP_METHOD: if (value == null) { unsetHttpMethod(); } else { setHttpMethod((String)value); } break; case IS_DOING_MTOM: if (value == null) { unsetIsDoingMTOM(); } else { setIsDoingMTOM((Boolean)value); } break; case IS_DOING_SW_A: if (value == null) { unsetIsDoingSwA(); } else { setIsDoingSwA((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE_ID: return getMessageId(); case CONTENT_TYPE: return getContentType(); case MESSAGE: return getMessage(); case SOAP_ACTION: return getSoapAction(); case EPOCH: return Long.valueOf(getEpoch()); case TRANSPORT_HEADERS: return getTransportHeaders(); case REQUEST_URI: return getRequestURI(); case IS_DOING_REST: return Boolean.valueOf(isIsDoingREST()); case HTTP_METHOD: return getHttpMethod(); case IS_DOING_MTOM: return Boolean.valueOf(isIsDoingMTOM()); case IS_DOING_SW_A: return Boolean.valueOf(isIsDoingSwA()); } 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 MESSAGE_ID: return isSetMessageId(); case CONTENT_TYPE: return isSetContentType(); case MESSAGE: return isSetMessage(); case SOAP_ACTION: return isSetSoapAction(); case EPOCH: return isSetEpoch(); case TRANSPORT_HEADERS: return isSetTransportHeaders(); case REQUEST_URI: return isSetRequestURI(); case IS_DOING_REST: return isSetIsDoingREST(); case HTTP_METHOD: return isSetHttpMethod(); case IS_DOING_MTOM: return isSetIsDoingMTOM(); case IS_DOING_SW_A: return isSetIsDoingSwA(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Message) return this.equals((Message)that); return false; } public boolean equals(Message that) { if (that == null) return false; boolean this_present_messageId = true && this.isSetMessageId(); boolean that_present_messageId = true && that.isSetMessageId(); if (this_present_messageId || that_present_messageId) { if (!(this_present_messageId && that_present_messageId)) return false; if (!this.messageId.equals(that.messageId)) return false; } boolean this_present_contentType = true && this.isSetContentType(); boolean that_present_contentType = true && that.isSetContentType(); if (this_present_contentType || that_present_contentType) { if (!(this_present_contentType && that_present_contentType)) return false; if (!this.contentType.equals(that.contentType)) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } boolean this_present_soapAction = true && this.isSetSoapAction(); boolean that_present_soapAction = true && that.isSetSoapAction(); if (this_present_soapAction || that_present_soapAction) { if (!(this_present_soapAction && that_present_soapAction)) return false; if (!this.soapAction.equals(that.soapAction)) return false; } boolean this_present_epoch = true; boolean that_present_epoch = true; if (this_present_epoch || that_present_epoch) { if (!(this_present_epoch && that_present_epoch)) return false; if (this.epoch != that.epoch) return false; } boolean this_present_transportHeaders = true && this.isSetTransportHeaders(); boolean that_present_transportHeaders = true && that.isSetTransportHeaders(); if (this_present_transportHeaders || that_present_transportHeaders) { if (!(this_present_transportHeaders && that_present_transportHeaders)) return false; if (!this.transportHeaders.equals(that.transportHeaders)) return false; } boolean this_present_requestURI = true && this.isSetRequestURI(); boolean that_present_requestURI = true && that.isSetRequestURI(); if (this_present_requestURI || that_present_requestURI) { if (!(this_present_requestURI && that_present_requestURI)) return false; if (!this.requestURI.equals(that.requestURI)) return false; } boolean this_present_isDoingREST = true; boolean that_present_isDoingREST = true; if (this_present_isDoingREST || that_present_isDoingREST) { if (!(this_present_isDoingREST && that_present_isDoingREST)) return false; if (this.isDoingREST != that.isDoingREST) return false; } boolean this_present_httpMethod = true && this.isSetHttpMethod(); boolean that_present_httpMethod = true && that.isSetHttpMethod(); if (this_present_httpMethod || that_present_httpMethod) { if (!(this_present_httpMethod && that_present_httpMethod)) return false; if (!this.httpMethod.equals(that.httpMethod)) return false; } boolean this_present_isDoingMTOM = true; boolean that_present_isDoingMTOM = true; if (this_present_isDoingMTOM || that_present_isDoingMTOM) { if (!(this_present_isDoingMTOM && that_present_isDoingMTOM)) return false; if (this.isDoingMTOM != that.isDoingMTOM) return false; } boolean this_present_isDoingSwA = true; boolean that_present_isDoingSwA = true; if (this_present_isDoingSwA || that_present_isDoingSwA) { if (!(this_present_isDoingSwA && that_present_isDoingSwA)) return false; if (this.isDoingSwA != that.isDoingSwA) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(Message other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; Message typedOther = (Message)other; lastComparison = Boolean.valueOf(isSetMessageId()).compareTo(typedOther.isSetMessageId()); if (lastComparison != 0) { return lastComparison; } if (isSetMessageId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messageId, typedOther.messageId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetContentType()).compareTo(typedOther.isSetContentType()); if (lastComparison != 0) { return lastComparison; } if (isSetContentType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contentType, typedOther.contentType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSoapAction()).compareTo(typedOther.isSetSoapAction()); if (lastComparison != 0) { return lastComparison; } if (isSetSoapAction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.soapAction, typedOther.soapAction); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEpoch()).compareTo(typedOther.isSetEpoch()); if (lastComparison != 0) { return lastComparison; } if (isSetEpoch()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.epoch, typedOther.epoch); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTransportHeaders()).compareTo(typedOther.isSetTransportHeaders()); if (lastComparison != 0) { return lastComparison; } if (isSetTransportHeaders()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transportHeaders, typedOther.transportHeaders); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRequestURI()).compareTo(typedOther.isSetRequestURI()); if (lastComparison != 0) { return lastComparison; } if (isSetRequestURI()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestURI, typedOther.requestURI); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIsDoingREST()).compareTo(typedOther.isSetIsDoingREST()); if (lastComparison != 0) { return lastComparison; } if (isSetIsDoingREST()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDoingREST, typedOther.isDoingREST); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHttpMethod()).compareTo(typedOther.isSetHttpMethod()); if (lastComparison != 0) { return lastComparison; } if (isSetHttpMethod()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpMethod, typedOther.httpMethod); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIsDoingMTOM()).compareTo(typedOther.isSetIsDoingMTOM()); if (lastComparison != 0) { return lastComparison; } if (isSetIsDoingMTOM()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDoingMTOM, typedOther.isDoingMTOM); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIsDoingSwA()).compareTo(typedOther.isSetIsDoingSwA()); if (lastComparison != 0) { return lastComparison; } if (isSetIsDoingSwA()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDoingSwA, typedOther.isDoingSwA); 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("Message("); boolean first = true; sb.append("messageId:"); if (this.messageId == null) { sb.append("null"); } else { sb.append(this.messageId); } first = false; if (!first) sb.append(", "); sb.append("contentType:"); if (this.contentType == null) { sb.append("null"); } else { sb.append(this.contentType); } first = false; if (!first) sb.append(", "); sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; if (!first) sb.append(", "); sb.append("soapAction:"); if (this.soapAction == null) { sb.append("null"); } else { sb.append(this.soapAction); } first = false; if (!first) sb.append(", "); sb.append("epoch:"); sb.append(this.epoch); first = false; if (!first) sb.append(", "); sb.append("transportHeaders:"); if (this.transportHeaders == null) { sb.append("null"); } else { sb.append(this.transportHeaders); } first = false; if (!first) sb.append(", "); sb.append("requestURI:"); if (this.requestURI == null) { sb.append("null"); } else { sb.append(this.requestURI); } first = false; if (!first) sb.append(", "); sb.append("isDoingREST:"); sb.append(this.isDoingREST); first = false; if (!first) sb.append(", "); sb.append("httpMethod:"); if (this.httpMethod == null) { sb.append("null"); } else { sb.append(this.httpMethod); } first = false; if (!first) sb.append(", "); sb.append("isDoingMTOM:"); sb.append(this.isDoingMTOM); first = false; if (!first) sb.append(", "); sb.append("isDoingSwA:"); sb.append(this.isDoingSwA); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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_bit_vector = new BitSet(1); 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 MessageStandardSchemeFactory implements SchemeFactory { public MessageStandardScheme getScheme() { return new MessageStandardScheme(); } } private static class MessageStandardScheme extends StandardScheme<Message> { public void read(org.apache.thrift.protocol.TProtocol iprot, Message 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: // MESSAGE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.messageId = iprot.readString(); struct.setMessageIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CONTENT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.contentType = iprot.readString(); struct.setContentTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SOAP_ACTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.soapAction = iprot.readString(); struct.setSoapActionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // EPOCH if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.epoch = iprot.readI64(); struct.setEpochIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // TRANSPORT_HEADERS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); struct.transportHeaders = new HashMap<String,String>(2*_map0.size); for (int _i1 = 0; _i1 < _map0.size; ++_i1) { String _key2; // required String _val3; // required _key2 = iprot.readString(); _val3 = iprot.readString(); struct.transportHeaders.put(_key2, _val3); } iprot.readMapEnd(); } struct.setTransportHeadersIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // REQUEST_URI if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requestURI = iprot.readString(); struct.setRequestURIIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // IS_DOING_REST if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isDoingREST = iprot.readBool(); struct.setIsDoingRESTIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // HTTP_METHOD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.httpMethod = iprot.readString(); struct.setHttpMethodIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // IS_DOING_MTOM if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isDoingMTOM = iprot.readBool(); struct.setIsDoingMTOMIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // IS_DOING_SW_A if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isDoingSwA = iprot.readBool(); struct.setIsDoingSwAIsSet(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, Message struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.messageId != null) { oprot.writeFieldBegin(MESSAGE_ID_FIELD_DESC); oprot.writeString(struct.messageId); oprot.writeFieldEnd(); } if (struct.contentType != null) { oprot.writeFieldBegin(CONTENT_TYPE_FIELD_DESC); oprot.writeString(struct.contentType); oprot.writeFieldEnd(); } if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } if (struct.soapAction != null) { oprot.writeFieldBegin(SOAP_ACTION_FIELD_DESC); oprot.writeString(struct.soapAction); oprot.writeFieldEnd(); } oprot.writeFieldBegin(EPOCH_FIELD_DESC); oprot.writeI64(struct.epoch); oprot.writeFieldEnd(); if (struct.transportHeaders != null) { oprot.writeFieldBegin(TRANSPORT_HEADERS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.transportHeaders.size())); for (Map.Entry<String, String> _iter4 : struct.transportHeaders.entrySet()) { oprot.writeString(_iter4.getKey()); oprot.writeString(_iter4.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.requestURI != null) { oprot.writeFieldBegin(REQUEST_URI_FIELD_DESC); oprot.writeString(struct.requestURI); oprot.writeFieldEnd(); } oprot.writeFieldBegin(IS_DOING_REST_FIELD_DESC); oprot.writeBool(struct.isDoingREST); oprot.writeFieldEnd(); if (struct.httpMethod != null) { oprot.writeFieldBegin(HTTP_METHOD_FIELD_DESC); oprot.writeString(struct.httpMethod); oprot.writeFieldEnd(); } oprot.writeFieldBegin(IS_DOING_MTOM_FIELD_DESC); oprot.writeBool(struct.isDoingMTOM); oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_DOING_SW_A_FIELD_DESC); oprot.writeBool(struct.isDoingSwA); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class MessageTupleSchemeFactory implements SchemeFactory { public MessageTupleScheme getScheme() { return new MessageTupleScheme(); } } private static class MessageTupleScheme extends TupleScheme<Message> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMessageId()) { optionals.set(0); } if (struct.isSetContentType()) { optionals.set(1); } if (struct.isSetMessage()) { optionals.set(2); } if (struct.isSetSoapAction()) { optionals.set(3); } if (struct.isSetEpoch()) { optionals.set(4); } if (struct.isSetTransportHeaders()) { optionals.set(5); } if (struct.isSetRequestURI()) { optionals.set(6); } if (struct.isSetIsDoingREST()) { optionals.set(7); } if (struct.isSetHttpMethod()) { optionals.set(8); } if (struct.isSetIsDoingMTOM()) { optionals.set(9); } if (struct.isSetIsDoingSwA()) { optionals.set(10); } oprot.writeBitSet(optionals, 11); if (struct.isSetMessageId()) { oprot.writeString(struct.messageId); } if (struct.isSetContentType()) { oprot.writeString(struct.contentType); } if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } if (struct.isSetSoapAction()) { oprot.writeString(struct.soapAction); } if (struct.isSetEpoch()) { oprot.writeI64(struct.epoch); } if (struct.isSetTransportHeaders()) { { oprot.writeI32(struct.transportHeaders.size()); for (Map.Entry<String, String> _iter5 : struct.transportHeaders.entrySet()) { oprot.writeString(_iter5.getKey()); oprot.writeString(_iter5.getValue()); } } } if (struct.isSetRequestURI()) { oprot.writeString(struct.requestURI); } if (struct.isSetIsDoingREST()) { oprot.writeBool(struct.isDoingREST); } if (struct.isSetHttpMethod()) { oprot.writeString(struct.httpMethod); } if (struct.isSetIsDoingMTOM()) { oprot.writeBool(struct.isDoingMTOM); } if (struct.isSetIsDoingSwA()) { oprot.writeBool(struct.isDoingSwA); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(11); if (incoming.get(0)) { struct.messageId = iprot.readString(); struct.setMessageIdIsSet(true); } if (incoming.get(1)) { struct.contentType = iprot.readString(); struct.setContentTypeIsSet(true); } if (incoming.get(2)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } if (incoming.get(3)) { struct.soapAction = iprot.readString(); struct.setSoapActionIsSet(true); } if (incoming.get(4)) { struct.epoch = iprot.readI64(); struct.setEpochIsSet(true); } if (incoming.get(5)) { { org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.transportHeaders = new HashMap<String,String>(2*_map6.size); for (int _i7 = 0; _i7 < _map6.size; ++_i7) { String _key8; // required String _val9; // required _key8 = iprot.readString(); _val9 = iprot.readString(); struct.transportHeaders.put(_key8, _val9); } } struct.setTransportHeadersIsSet(true); } if (incoming.get(6)) { struct.requestURI = iprot.readString(); struct.setRequestURIIsSet(true); } if (incoming.get(7)) { struct.isDoingREST = iprot.readBool(); struct.setIsDoingRESTIsSet(true); } if (incoming.get(8)) { struct.httpMethod = iprot.readString(); struct.setHttpMethodIsSet(true); } if (incoming.get(9)) { struct.isDoingMTOM = iprot.readBool(); struct.setIsDoingMTOMIsSet(true); } if (incoming.get(10)) { struct.isDoingSwA = iprot.readBool(); struct.setIsDoingSwAIsSet(true); } } } }