Java tutorial
/* Copyright (C) 2013-2014 Computer Sciences Corporation * * Licensed 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.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package ezbake.services.deploy.thrift; 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; public class WebAppInfo implements org.apache.thrift.TBase<WebAppInfo, WebAppInfo._Fields>, java.io.Serializable, Cloneable, Comparable<WebAppInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct( "WebAppInfo"); private static final org.apache.thrift.protocol.TField EXTERNAL_WEB_URL_FIELD_DESC = new org.apache.thrift.protocol.TField( "externalWebUrl", org.apache.thrift.protocol.TType.STRING, (short) 1); private static final org.apache.thrift.protocol.TField INTERNAL_WEB_URL_FIELD_DESC = new org.apache.thrift.protocol.TField( "internalWebUrl", org.apache.thrift.protocol.TType.STRING, (short) 2); private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField( "hostname", org.apache.thrift.protocol.TType.STRING, (short) 3); private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField( "timeout", org.apache.thrift.protocol.TType.I32, (short) 4); private static final org.apache.thrift.protocol.TField TIMEOUT_RETRIES_FIELD_DESC = new org.apache.thrift.protocol.TField( "timeoutRetries", org.apache.thrift.protocol.TType.I32, (short) 5); private static final org.apache.thrift.protocol.TField UPLOAD_FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField( "uploadFileSize", org.apache.thrift.protocol.TType.I32, (short) 7); private static final org.apache.thrift.protocol.TField STICKY_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField( "stickySession", org.apache.thrift.protocol.TType.BOOL, (short) 8); private static final org.apache.thrift.protocol.TField PREFERRED_CONTAINER_FIELD_DESC = new org.apache.thrift.protocol.TField( "preferredContainer", org.apache.thrift.protocol.TType.STRING, (short) 9); private static final org.apache.thrift.protocol.TField CHUNKED_TRANSFER_ENCODING_DISABLED_FIELD_DESC = new org.apache.thrift.protocol.TField( "chunkedTransferEncodingDisabled", org.apache.thrift.protocol.TType.BOOL, (short) 10); private static final org.apache.thrift.protocol.TField WEBSOCKET_SUPPORT_DISABLED_FIELD_DESC = new org.apache.thrift.protocol.TField( "websocketSupportDisabled", 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 WebAppInfoStandardSchemeFactory()); schemes.put(TupleScheme.class, new WebAppInfoTupleSchemeFactory()); } public String externalWebUrl; // optional public String internalWebUrl; // optional public String hostname; // optional public int timeout; // optional public int timeoutRetries; // optional public int uploadFileSize; // optional public boolean stickySession; // optional public String preferredContainer; // optional public boolean chunkedTransferEncodingDisabled; // optional public boolean websocketSupportDisabled; // 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 { EXTERNAL_WEB_URL((short) 1, "externalWebUrl"), INTERNAL_WEB_URL((short) 2, "internalWebUrl"), HOSTNAME( (short) 3, "hostname"), TIMEOUT((short) 4, "timeout"), TIMEOUT_RETRIES((short) 5, "timeoutRetries"), UPLOAD_FILE_SIZE((short) 7, "uploadFileSize"), STICKY_SESSION((short) 8, "stickySession"), PREFERRED_CONTAINER((short) 9, "preferredContainer"), CHUNKED_TRANSFER_ENCODING_DISABLED((short) 10, "chunkedTransferEncodingDisabled"), WEBSOCKET_SUPPORT_DISABLED( (short) 11, "websocketSupportDisabled"); 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: // EXTERNAL_WEB_URL return EXTERNAL_WEB_URL; case 2: // INTERNAL_WEB_URL return INTERNAL_WEB_URL; case 3: // HOSTNAME return HOSTNAME; case 4: // TIMEOUT return TIMEOUT; case 5: // TIMEOUT_RETRIES return TIMEOUT_RETRIES; case 7: // UPLOAD_FILE_SIZE return UPLOAD_FILE_SIZE; case 8: // STICKY_SESSION return STICKY_SESSION; case 9: // PREFERRED_CONTAINER return PREFERRED_CONTAINER; case 10: // CHUNKED_TRANSFER_ENCODING_DISABLED return CHUNKED_TRANSFER_ENCODING_DISABLED; case 11: // WEBSOCKET_SUPPORT_DISABLED return WEBSOCKET_SUPPORT_DISABLED; 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 __TIMEOUT_ISSET_ID = 0; private static final int __TIMEOUTRETRIES_ISSET_ID = 1; private static final int __UPLOADFILESIZE_ISSET_ID = 2; private static final int __STICKYSESSION_ISSET_ID = 3; private static final int __CHUNKEDTRANSFERENCODINGDISABLED_ISSET_ID = 4; private static final int __WEBSOCKETSUPPORTDISABLED_ISSET_ID = 5; private byte __isset_bitfield = 0; private _Fields optionals[] = { _Fields.EXTERNAL_WEB_URL, _Fields.INTERNAL_WEB_URL, _Fields.HOSTNAME, _Fields.TIMEOUT, _Fields.TIMEOUT_RETRIES, _Fields.UPLOAD_FILE_SIZE, _Fields.STICKY_SESSION, _Fields.PREFERRED_CONTAINER, _Fields.CHUNKED_TRANSFER_ENCODING_DISABLED, _Fields.WEBSOCKET_SUPPORT_DISABLED }; 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.EXTERNAL_WEB_URL, new org.apache.thrift.meta_data.FieldMetaData("externalWebUrl", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INTERNAL_WEB_URL, new org.apache.thrift.meta_data.FieldMetaData("internalWebUrl", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TIMEOUT_RETRIES, new org.apache.thrift.meta_data.FieldMetaData("timeoutRetries", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.UPLOAD_FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("uploadFileSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.STICKY_SESSION, new org.apache.thrift.meta_data.FieldMetaData("stickySession", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.PREFERRED_CONTAINER, new org.apache.thrift.meta_data.FieldMetaData("preferredContainer", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CHUNKED_TRANSFER_ENCODING_DISABLED, new org.apache.thrift.meta_data.FieldMetaData("chunkedTransferEncodingDisabled", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.WEBSOCKET_SUPPORT_DISABLED, new org.apache.thrift.meta_data.FieldMetaData("websocketSupportDisabled", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WebAppInfo.class, metaDataMap); } public WebAppInfo() { } /** * Performs a deep copy on <i>other</i>. */ public WebAppInfo(WebAppInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetExternalWebUrl()) { this.externalWebUrl = other.externalWebUrl; } if (other.isSetInternalWebUrl()) { this.internalWebUrl = other.internalWebUrl; } if (other.isSetHostname()) { this.hostname = other.hostname; } this.timeout = other.timeout; this.timeoutRetries = other.timeoutRetries; this.uploadFileSize = other.uploadFileSize; this.stickySession = other.stickySession; if (other.isSetPreferredContainer()) { this.preferredContainer = other.preferredContainer; } this.chunkedTransferEncodingDisabled = other.chunkedTransferEncodingDisabled; this.websocketSupportDisabled = other.websocketSupportDisabled; } public WebAppInfo deepCopy() { return new WebAppInfo(this); } @Override public void clear() { this.externalWebUrl = null; this.internalWebUrl = null; this.hostname = null; setTimeoutIsSet(false); this.timeout = 0; setTimeoutRetriesIsSet(false); this.timeoutRetries = 0; setUploadFileSizeIsSet(false); this.uploadFileSize = 0; setStickySessionIsSet(false); this.stickySession = false; this.preferredContainer = null; setChunkedTransferEncodingDisabledIsSet(false); this.chunkedTransferEncodingDisabled = false; setWebsocketSupportDisabledIsSet(false); this.websocketSupportDisabled = false; } public String getExternalWebUrl() { return this.externalWebUrl; } public WebAppInfo setExternalWebUrl(String externalWebUrl) { this.externalWebUrl = externalWebUrl; return this; } public void unsetExternalWebUrl() { this.externalWebUrl = null; } /** Returns true if field externalWebUrl is set (has been assigned a value) and false otherwise */ public boolean isSetExternalWebUrl() { return this.externalWebUrl != null; } public void setExternalWebUrlIsSet(boolean value) { if (!value) { this.externalWebUrl = null; } } public String getInternalWebUrl() { return this.internalWebUrl; } public WebAppInfo setInternalWebUrl(String internalWebUrl) { this.internalWebUrl = internalWebUrl; return this; } public void unsetInternalWebUrl() { this.internalWebUrl = null; } /** Returns true if field internalWebUrl is set (has been assigned a value) and false otherwise */ public boolean isSetInternalWebUrl() { return this.internalWebUrl != null; } public void setInternalWebUrlIsSet(boolean value) { if (!value) { this.internalWebUrl = null; } } public String getHostname() { return this.hostname; } public WebAppInfo setHostname(String hostname) { this.hostname = hostname; return this; } public void unsetHostname() { this.hostname = null; } /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ public boolean isSetHostname() { return this.hostname != null; } public void setHostnameIsSet(boolean value) { if (!value) { this.hostname = null; } } public int getTimeout() { return this.timeout; } public WebAppInfo setTimeout(int timeout) { this.timeout = timeout; setTimeoutIsSet(true); return this; } public void unsetTimeout() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); } /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ public boolean isSetTimeout() { return EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); } public void setTimeoutIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); } public int getTimeoutRetries() { return this.timeoutRetries; } public WebAppInfo setTimeoutRetries(int timeoutRetries) { this.timeoutRetries = timeoutRetries; setTimeoutRetriesIsSet(true); return this; } public void unsetTimeoutRetries() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTRETRIES_ISSET_ID); } /** Returns true if field timeoutRetries is set (has been assigned a value) and false otherwise */ public boolean isSetTimeoutRetries() { return EncodingUtils.testBit(__isset_bitfield, __TIMEOUTRETRIES_ISSET_ID); } public void setTimeoutRetriesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUTRETRIES_ISSET_ID, value); } public int getUploadFileSize() { return this.uploadFileSize; } public WebAppInfo setUploadFileSize(int uploadFileSize) { this.uploadFileSize = uploadFileSize; setUploadFileSizeIsSet(true); return this; } public void unsetUploadFileSize() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPLOADFILESIZE_ISSET_ID); } /** Returns true if field uploadFileSize is set (has been assigned a value) and false otherwise */ public boolean isSetUploadFileSize() { return EncodingUtils.testBit(__isset_bitfield, __UPLOADFILESIZE_ISSET_ID); } public void setUploadFileSizeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPLOADFILESIZE_ISSET_ID, value); } public boolean isStickySession() { return this.stickySession; } public WebAppInfo setStickySession(boolean stickySession) { this.stickySession = stickySession; setStickySessionIsSet(true); return this; } public void unsetStickySession() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STICKYSESSION_ISSET_ID); } /** Returns true if field stickySession is set (has been assigned a value) and false otherwise */ public boolean isSetStickySession() { return EncodingUtils.testBit(__isset_bitfield, __STICKYSESSION_ISSET_ID); } public void setStickySessionIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STICKYSESSION_ISSET_ID, value); } public String getPreferredContainer() { return this.preferredContainer; } public WebAppInfo setPreferredContainer(String preferredContainer) { this.preferredContainer = preferredContainer; return this; } public void unsetPreferredContainer() { this.preferredContainer = null; } /** Returns true if field preferredContainer is set (has been assigned a value) and false otherwise */ public boolean isSetPreferredContainer() { return this.preferredContainer != null; } public void setPreferredContainerIsSet(boolean value) { if (!value) { this.preferredContainer = null; } } public boolean isChunkedTransferEncodingDisabled() { return this.chunkedTransferEncodingDisabled; } public WebAppInfo setChunkedTransferEncodingDisabled(boolean chunkedTransferEncodingDisabled) { this.chunkedTransferEncodingDisabled = chunkedTransferEncodingDisabled; setChunkedTransferEncodingDisabledIsSet(true); return this; } public void unsetChunkedTransferEncodingDisabled() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CHUNKEDTRANSFERENCODINGDISABLED_ISSET_ID); } /** Returns true if field chunkedTransferEncodingDisabled is set (has been assigned a value) and false otherwise */ public boolean isSetChunkedTransferEncodingDisabled() { return EncodingUtils.testBit(__isset_bitfield, __CHUNKEDTRANSFERENCODINGDISABLED_ISSET_ID); } public void setChunkedTransferEncodingDisabledIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CHUNKEDTRANSFERENCODINGDISABLED_ISSET_ID, value); } public boolean isWebsocketSupportDisabled() { return this.websocketSupportDisabled; } public WebAppInfo setWebsocketSupportDisabled(boolean websocketSupportDisabled) { this.websocketSupportDisabled = websocketSupportDisabled; setWebsocketSupportDisabledIsSet(true); return this; } public void unsetWebsocketSupportDisabled() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WEBSOCKETSUPPORTDISABLED_ISSET_ID); } /** Returns true if field websocketSupportDisabled is set (has been assigned a value) and false otherwise */ public boolean isSetWebsocketSupportDisabled() { return EncodingUtils.testBit(__isset_bitfield, __WEBSOCKETSUPPORTDISABLED_ISSET_ID); } public void setWebsocketSupportDisabledIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WEBSOCKETSUPPORTDISABLED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case EXTERNAL_WEB_URL: if (value == null) { unsetExternalWebUrl(); } else { setExternalWebUrl((String) value); } break; case INTERNAL_WEB_URL: if (value == null) { unsetInternalWebUrl(); } else { setInternalWebUrl((String) value); } break; case HOSTNAME: if (value == null) { unsetHostname(); } else { setHostname((String) value); } break; case TIMEOUT: if (value == null) { unsetTimeout(); } else { setTimeout((Integer) value); } break; case TIMEOUT_RETRIES: if (value == null) { unsetTimeoutRetries(); } else { setTimeoutRetries((Integer) value); } break; case UPLOAD_FILE_SIZE: if (value == null) { unsetUploadFileSize(); } else { setUploadFileSize((Integer) value); } break; case STICKY_SESSION: if (value == null) { unsetStickySession(); } else { setStickySession((Boolean) value); } break; case PREFERRED_CONTAINER: if (value == null) { unsetPreferredContainer(); } else { setPreferredContainer((String) value); } break; case CHUNKED_TRANSFER_ENCODING_DISABLED: if (value == null) { unsetChunkedTransferEncodingDisabled(); } else { setChunkedTransferEncodingDisabled((Boolean) value); } break; case WEBSOCKET_SUPPORT_DISABLED: if (value == null) { unsetWebsocketSupportDisabled(); } else { setWebsocketSupportDisabled((Boolean) value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case EXTERNAL_WEB_URL: return getExternalWebUrl(); case INTERNAL_WEB_URL: return getInternalWebUrl(); case HOSTNAME: return getHostname(); case TIMEOUT: return Integer.valueOf(getTimeout()); case TIMEOUT_RETRIES: return Integer.valueOf(getTimeoutRetries()); case UPLOAD_FILE_SIZE: return Integer.valueOf(getUploadFileSize()); case STICKY_SESSION: return Boolean.valueOf(isStickySession()); case PREFERRED_CONTAINER: return getPreferredContainer(); case CHUNKED_TRANSFER_ENCODING_DISABLED: return Boolean.valueOf(isChunkedTransferEncodingDisabled()); case WEBSOCKET_SUPPORT_DISABLED: return Boolean.valueOf(isWebsocketSupportDisabled()); } 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 EXTERNAL_WEB_URL: return isSetExternalWebUrl(); case INTERNAL_WEB_URL: return isSetInternalWebUrl(); case HOSTNAME: return isSetHostname(); case TIMEOUT: return isSetTimeout(); case TIMEOUT_RETRIES: return isSetTimeoutRetries(); case UPLOAD_FILE_SIZE: return isSetUploadFileSize(); case STICKY_SESSION: return isSetStickySession(); case PREFERRED_CONTAINER: return isSetPreferredContainer(); case CHUNKED_TRANSFER_ENCODING_DISABLED: return isSetChunkedTransferEncodingDisabled(); case WEBSOCKET_SUPPORT_DISABLED: return isSetWebsocketSupportDisabled(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof WebAppInfo) return this.equals((WebAppInfo) that); return false; } public boolean equals(WebAppInfo that) { if (that == null) return false; boolean this_present_externalWebUrl = true && this.isSetExternalWebUrl(); boolean that_present_externalWebUrl = true && that.isSetExternalWebUrl(); if (this_present_externalWebUrl || that_present_externalWebUrl) { if (!(this_present_externalWebUrl && that_present_externalWebUrl)) return false; if (!this.externalWebUrl.equals(that.externalWebUrl)) return false; } boolean this_present_internalWebUrl = true && this.isSetInternalWebUrl(); boolean that_present_internalWebUrl = true && that.isSetInternalWebUrl(); if (this_present_internalWebUrl || that_present_internalWebUrl) { if (!(this_present_internalWebUrl && that_present_internalWebUrl)) return false; if (!this.internalWebUrl.equals(that.internalWebUrl)) return false; } boolean this_present_hostname = true && this.isSetHostname(); boolean that_present_hostname = true && that.isSetHostname(); if (this_present_hostname || that_present_hostname) { if (!(this_present_hostname && that_present_hostname)) return false; if (!this.hostname.equals(that.hostname)) return false; } boolean this_present_timeout = true && this.isSetTimeout(); boolean that_present_timeout = true && that.isSetTimeout(); if (this_present_timeout || that_present_timeout) { if (!(this_present_timeout && that_present_timeout)) return false; if (this.timeout != that.timeout) return false; } boolean this_present_timeoutRetries = true && this.isSetTimeoutRetries(); boolean that_present_timeoutRetries = true && that.isSetTimeoutRetries(); if (this_present_timeoutRetries || that_present_timeoutRetries) { if (!(this_present_timeoutRetries && that_present_timeoutRetries)) return false; if (this.timeoutRetries != that.timeoutRetries) return false; } boolean this_present_uploadFileSize = true && this.isSetUploadFileSize(); boolean that_present_uploadFileSize = true && that.isSetUploadFileSize(); if (this_present_uploadFileSize || that_present_uploadFileSize) { if (!(this_present_uploadFileSize && that_present_uploadFileSize)) return false; if (this.uploadFileSize != that.uploadFileSize) return false; } boolean this_present_stickySession = true && this.isSetStickySession(); boolean that_present_stickySession = true && that.isSetStickySession(); if (this_present_stickySession || that_present_stickySession) { if (!(this_present_stickySession && that_present_stickySession)) return false; if (this.stickySession != that.stickySession) return false; } boolean this_present_preferredContainer = true && this.isSetPreferredContainer(); boolean that_present_preferredContainer = true && that.isSetPreferredContainer(); if (this_present_preferredContainer || that_present_preferredContainer) { if (!(this_present_preferredContainer && that_present_preferredContainer)) return false; if (!this.preferredContainer.equals(that.preferredContainer)) return false; } boolean this_present_chunkedTransferEncodingDisabled = true && this.isSetChunkedTransferEncodingDisabled(); boolean that_present_chunkedTransferEncodingDisabled = true && that.isSetChunkedTransferEncodingDisabled(); if (this_present_chunkedTransferEncodingDisabled || that_present_chunkedTransferEncodingDisabled) { if (!(this_present_chunkedTransferEncodingDisabled && that_present_chunkedTransferEncodingDisabled)) return false; if (this.chunkedTransferEncodingDisabled != that.chunkedTransferEncodingDisabled) return false; } boolean this_present_websocketSupportDisabled = true && this.isSetWebsocketSupportDisabled(); boolean that_present_websocketSupportDisabled = true && that.isSetWebsocketSupportDisabled(); if (this_present_websocketSupportDisabled || that_present_websocketSupportDisabled) { if (!(this_present_websocketSupportDisabled && that_present_websocketSupportDisabled)) return false; if (this.websocketSupportDisabled != that.websocketSupportDisabled) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(WebAppInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetExternalWebUrl()).compareTo(other.isSetExternalWebUrl()); if (lastComparison != 0) { return lastComparison; } if (isSetExternalWebUrl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalWebUrl, other.externalWebUrl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetInternalWebUrl()).compareTo(other.isSetInternalWebUrl()); if (lastComparison != 0) { return lastComparison; } if (isSetInternalWebUrl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internalWebUrl, other.internalWebUrl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); if (lastComparison != 0) { return lastComparison; } if (isSetHostname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTimeout()).compareTo(other.isSetTimeout()); if (lastComparison != 0) { return lastComparison; } if (isSetTimeout()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTimeoutRetries()).compareTo(other.isSetTimeoutRetries()); if (lastComparison != 0) { return lastComparison; } if (isSetTimeoutRetries()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutRetries, other.timeoutRetries); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUploadFileSize()).compareTo(other.isSetUploadFileSize()); if (lastComparison != 0) { return lastComparison; } if (isSetUploadFileSize()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadFileSize, other.uploadFileSize); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStickySession()).compareTo(other.isSetStickySession()); if (lastComparison != 0) { return lastComparison; } if (isSetStickySession()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stickySession, other.stickySession); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPreferredContainer()).compareTo(other.isSetPreferredContainer()); if (lastComparison != 0) { return lastComparison; } if (isSetPreferredContainer()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferredContainer, other.preferredContainer); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetChunkedTransferEncodingDisabled()) .compareTo(other.isSetChunkedTransferEncodingDisabled()); if (lastComparison != 0) { return lastComparison; } if (isSetChunkedTransferEncodingDisabled()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chunkedTransferEncodingDisabled, other.chunkedTransferEncodingDisabled); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetWebsocketSupportDisabled()) .compareTo(other.isSetWebsocketSupportDisabled()); if (lastComparison != 0) { return lastComparison; } if (isSetWebsocketSupportDisabled()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.websocketSupportDisabled, other.websocketSupportDisabled); 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("WebAppInfo("); boolean first = true; if (isSetExternalWebUrl()) { sb.append("externalWebUrl:"); if (this.externalWebUrl == null) { sb.append("null"); } else { sb.append(this.externalWebUrl); } first = false; } if (isSetInternalWebUrl()) { if (!first) sb.append(", "); sb.append("internalWebUrl:"); if (this.internalWebUrl == null) { sb.append("null"); } else { sb.append(this.internalWebUrl); } first = false; } if (isSetHostname()) { if (!first) sb.append(", "); sb.append("hostname:"); if (this.hostname == null) { sb.append("null"); } else { sb.append(this.hostname); } first = false; } if (isSetTimeout()) { if (!first) sb.append(", "); sb.append("timeout:"); sb.append(this.timeout); first = false; } if (isSetTimeoutRetries()) { if (!first) sb.append(", "); sb.append("timeoutRetries:"); sb.append(this.timeoutRetries); first = false; } if (isSetUploadFileSize()) { if (!first) sb.append(", "); sb.append("uploadFileSize:"); sb.append(this.uploadFileSize); first = false; } if (isSetStickySession()) { if (!first) sb.append(", "); sb.append("stickySession:"); sb.append(this.stickySession); first = false; } if (isSetPreferredContainer()) { if (!first) sb.append(", "); sb.append("preferredContainer:"); if (this.preferredContainer == null) { sb.append("null"); } else { sb.append(this.preferredContainer); } first = false; } if (isSetChunkedTransferEncodingDisabled()) { if (!first) sb.append(", "); sb.append("chunkedTransferEncodingDisabled:"); sb.append(this.chunkedTransferEncodingDisabled); first = false; } if (isSetWebsocketSupportDisabled()) { if (!first) sb.append(", "); sb.append("websocketSupportDisabled:"); sb.append(this.websocketSupportDisabled); first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // 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 WebAppInfoStandardSchemeFactory implements SchemeFactory { public WebAppInfoStandardScheme getScheme() { return new WebAppInfoStandardScheme(); } } private static class WebAppInfoStandardScheme extends StandardScheme<WebAppInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, WebAppInfo 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: // EXTERNAL_WEB_URL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.externalWebUrl = iprot.readString(); struct.setExternalWebUrlIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // INTERNAL_WEB_URL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.internalWebUrl = iprot.readString(); struct.setInternalWebUrlIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // HOSTNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TIMEOUT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.timeout = iprot.readI32(); struct.setTimeoutIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TIMEOUT_RETRIES if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.timeoutRetries = iprot.readI32(); struct.setTimeoutRetriesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // UPLOAD_FILE_SIZE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.uploadFileSize = iprot.readI32(); struct.setUploadFileSizeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // STICKY_SESSION if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.stickySession = iprot.readBool(); struct.setStickySessionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // PREFERRED_CONTAINER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.preferredContainer = iprot.readString(); struct.setPreferredContainerIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // CHUNKED_TRANSFER_ENCODING_DISABLED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.chunkedTransferEncodingDisabled = iprot.readBool(); struct.setChunkedTransferEncodingDisabledIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // WEBSOCKET_SUPPORT_DISABLED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.websocketSupportDisabled = iprot.readBool(); struct.setWebsocketSupportDisabledIsSet(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, WebAppInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.externalWebUrl != null) { if (struct.isSetExternalWebUrl()) { oprot.writeFieldBegin(EXTERNAL_WEB_URL_FIELD_DESC); oprot.writeString(struct.externalWebUrl); oprot.writeFieldEnd(); } } if (struct.internalWebUrl != null) { if (struct.isSetInternalWebUrl()) { oprot.writeFieldBegin(INTERNAL_WEB_URL_FIELD_DESC); oprot.writeString(struct.internalWebUrl); oprot.writeFieldEnd(); } } if (struct.hostname != null) { if (struct.isSetHostname()) { oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); oprot.writeString(struct.hostname); oprot.writeFieldEnd(); } } if (struct.isSetTimeout()) { oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); oprot.writeI32(struct.timeout); oprot.writeFieldEnd(); } if (struct.isSetTimeoutRetries()) { oprot.writeFieldBegin(TIMEOUT_RETRIES_FIELD_DESC); oprot.writeI32(struct.timeoutRetries); oprot.writeFieldEnd(); } if (struct.isSetUploadFileSize()) { oprot.writeFieldBegin(UPLOAD_FILE_SIZE_FIELD_DESC); oprot.writeI32(struct.uploadFileSize); oprot.writeFieldEnd(); } if (struct.isSetStickySession()) { oprot.writeFieldBegin(STICKY_SESSION_FIELD_DESC); oprot.writeBool(struct.stickySession); oprot.writeFieldEnd(); } if (struct.preferredContainer != null) { if (struct.isSetPreferredContainer()) { oprot.writeFieldBegin(PREFERRED_CONTAINER_FIELD_DESC); oprot.writeString(struct.preferredContainer); oprot.writeFieldEnd(); } } if (struct.isSetChunkedTransferEncodingDisabled()) { oprot.writeFieldBegin(CHUNKED_TRANSFER_ENCODING_DISABLED_FIELD_DESC); oprot.writeBool(struct.chunkedTransferEncodingDisabled); oprot.writeFieldEnd(); } if (struct.isSetWebsocketSupportDisabled()) { oprot.writeFieldBegin(WEBSOCKET_SUPPORT_DISABLED_FIELD_DESC); oprot.writeBool(struct.websocketSupportDisabled); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class WebAppInfoTupleSchemeFactory implements SchemeFactory { public WebAppInfoTupleScheme getScheme() { return new WebAppInfoTupleScheme(); } } private static class WebAppInfoTupleScheme extends TupleScheme<WebAppInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, WebAppInfo struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetExternalWebUrl()) { optionals.set(0); } if (struct.isSetInternalWebUrl()) { optionals.set(1); } if (struct.isSetHostname()) { optionals.set(2); } if (struct.isSetTimeout()) { optionals.set(3); } if (struct.isSetTimeoutRetries()) { optionals.set(4); } if (struct.isSetUploadFileSize()) { optionals.set(5); } if (struct.isSetStickySession()) { optionals.set(6); } if (struct.isSetPreferredContainer()) { optionals.set(7); } if (struct.isSetChunkedTransferEncodingDisabled()) { optionals.set(8); } if (struct.isSetWebsocketSupportDisabled()) { optionals.set(9); } oprot.writeBitSet(optionals, 10); if (struct.isSetExternalWebUrl()) { oprot.writeString(struct.externalWebUrl); } if (struct.isSetInternalWebUrl()) { oprot.writeString(struct.internalWebUrl); } if (struct.isSetHostname()) { oprot.writeString(struct.hostname); } if (struct.isSetTimeout()) { oprot.writeI32(struct.timeout); } if (struct.isSetTimeoutRetries()) { oprot.writeI32(struct.timeoutRetries); } if (struct.isSetUploadFileSize()) { oprot.writeI32(struct.uploadFileSize); } if (struct.isSetStickySession()) { oprot.writeBool(struct.stickySession); } if (struct.isSetPreferredContainer()) { oprot.writeString(struct.preferredContainer); } if (struct.isSetChunkedTransferEncodingDisabled()) { oprot.writeBool(struct.chunkedTransferEncodingDisabled); } if (struct.isSetWebsocketSupportDisabled()) { oprot.writeBool(struct.websocketSupportDisabled); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, WebAppInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(10); if (incoming.get(0)) { struct.externalWebUrl = iprot.readString(); struct.setExternalWebUrlIsSet(true); } if (incoming.get(1)) { struct.internalWebUrl = iprot.readString(); struct.setInternalWebUrlIsSet(true); } if (incoming.get(2)) { struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); } if (incoming.get(3)) { struct.timeout = iprot.readI32(); struct.setTimeoutIsSet(true); } if (incoming.get(4)) { struct.timeoutRetries = iprot.readI32(); struct.setTimeoutRetriesIsSet(true); } if (incoming.get(5)) { struct.uploadFileSize = iprot.readI32(); struct.setUploadFileSizeIsSet(true); } if (incoming.get(6)) { struct.stickySession = iprot.readBool(); struct.setStickySessionIsSet(true); } if (incoming.get(7)) { struct.preferredContainer = iprot.readString(); struct.setPreferredContainerIsSet(true); } if (incoming.get(8)) { struct.chunkedTransferEncodingDisabled = iprot.readBool(); struct.setChunkedTransferEncodingDisabledIsSet(true); } if (incoming.get(9)) { struct.websocketSupportDisabled = iprot.readBool(); struct.setWebsocketSupportDisabledIsSet(true); } } } }