Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.emq.thrift;
import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;
import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-9-13")
public class EMQBaseService {
public interface Iface {
/**
* Get EMQ service version;
*
*/
public Version getServiceVersion() throws GalaxyEmqServiceException, libthrift091.TException;
/**
* Check the version compatibility between client and server;
*
*
* @param clientVersion
*/
public void validClientVersion(Version clientVersion) throws GalaxyEmqServiceException, libthrift091.TException;
}
public interface AsyncIface {
public void getServiceVersion(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void validClientVersion(Version clientVersion, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
}
public static class Client extends libthrift091.TServiceClient implements Iface {
public static class Factory implements libthrift091.TServiceClientFactory {
public Factory() {}
public Client getClient(libthrift091.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(libthrift091.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public Version getServiceVersion() throws GalaxyEmqServiceException, libthrift091.TException
{
send_getServiceVersion();
return recv_getServiceVersion();
}
public void send_getServiceVersion() throws libthrift091.TException
{
getServiceVersion_args args = new getServiceVersion_args();
sendBase("getServiceVersion", args);
}
public Version recv_getServiceVersion() throws GalaxyEmqServiceException, libthrift091.TException
{
getServiceVersion_result result = new getServiceVersion_result();
receiveBase(result, "getServiceVersion");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getServiceVersion failed: unknown result");
}
public void validClientVersion(Version clientVersion) throws GalaxyEmqServiceException, libthrift091.TException
{
send_validClientVersion(clientVersion);
recv_validClientVersion();
}
public void send_validClientVersion(Version clientVersion) throws libthrift091.TException
{
validClientVersion_args args = new validClientVersion_args();
args.setClientVersion(clientVersion);
sendBase("validClientVersion", args);
}
public void recv_validClientVersion() throws GalaxyEmqServiceException, libthrift091.TException
{
validClientVersion_result result = new validClientVersion_result();
receiveBase(result, "validClientVersion");
if (result.e != null) {
throw result.e;
}
return;
}
}
public static class AsyncClient extends libthrift091.async.TAsyncClient implements AsyncIface {
public static class Factory implements libthrift091.async.TAsyncClientFactory {
private libthrift091.async.TAsyncClientManager clientManager;
private libthrift091.protocol.TProtocolFactory protocolFactory;
public Factory(libthrift091.async.TAsyncClientManager clientManager, libthrift091.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(libthrift091.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.async.TAsyncClientManager clientManager, libthrift091.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void getServiceVersion(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getServiceVersion_call method_call = new getServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getServiceVersion_call extends libthrift091.async.TAsyncMethodCall {
public getServiceVersion_call(libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getServiceVersion", libthrift091.protocol.TMessageType.CALL, 0));
getServiceVersion_args args = new getServiceVersion_args();
args.write(prot);
prot.writeMessageEnd();
}
public Version getResult() throws GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getServiceVersion();
}
}
public void validClientVersion(Version clientVersion, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
validClientVersion_call method_call = new validClientVersion_call(clientVersion, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class validClientVersion_call extends libthrift091.async.TAsyncMethodCall {
private Version clientVersion;
public validClientVersion_call(Version clientVersion, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.clientVersion = clientVersion;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("validClientVersion", libthrift091.protocol.TMessageType.CALL, 0));
validClientVersion_args args = new validClientVersion_args();
args.setClientVersion(clientVersion);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_validClientVersion();
}
}
}
public static class Processor extends libthrift091.TBaseProcessor implements libthrift091.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected Processor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("getServiceVersion", new getServiceVersion());
processMap.put("validClientVersion", new validClientVersion());
return processMap;
}
public static class getServiceVersion extends libthrift091.ProcessFunction {
public getServiceVersion() {
super("getServiceVersion");
}
public getServiceVersion_args getEmptyArgsInstance() {
return new getServiceVersion_args();
}
protected boolean isOneway() {
return false;
}
public getServiceVersion_result getResult(I iface, getServiceVersion_args args) throws libthrift091.TException {
getServiceVersion_result result = new getServiceVersion_result();
try {
result.success = iface.getServiceVersion();
} catch (GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class validClientVersion extends libthrift091.ProcessFunction {
public validClientVersion() {
super("validClientVersion");
}
public validClientVersion_args getEmptyArgsInstance() {
return new validClientVersion_args();
}
protected boolean isOneway() {
return false;
}
public validClientVersion_result getResult(I iface, validClientVersion_args args) throws libthrift091.TException {
validClientVersion_result result = new validClientVersion_result();
try {
iface.validClientVersion(args.clientVersion);
} catch (GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
}
public static class AsyncProcessor extends libthrift091.TBaseAsyncProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected AsyncProcessor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("getServiceVersion", new getServiceVersion());
processMap.put("validClientVersion", new validClientVersion());
return processMap;
}
public static class getServiceVersion extends libthrift091.AsyncProcessFunction {
public getServiceVersion() {
super("getServiceVersion");
}
public getServiceVersion_args getEmptyArgsInstance() {
return new getServiceVersion_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Version o) {
getServiceVersion_result result = new getServiceVersion_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
getServiceVersion_result result = new getServiceVersion_result();
if (e instanceof GalaxyEmqServiceException) {
result.e = (GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getServiceVersion_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.getServiceVersion(resultHandler);
}
}
public static class validClientVersion extends libthrift091.AsyncProcessFunction {
public validClientVersion() {
super("validClientVersion");
}
public validClientVersion_args getEmptyArgsInstance() {
return new validClientVersion_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
validClientVersion_result result = new validClientVersion_result();
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
validClientVersion_result result = new validClientVersion_result();
if (e instanceof GalaxyEmqServiceException) {
result.e = (GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, validClientVersion_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.validClientVersion(args.clientVersion,resultHandler);
}
}
}
public static class getServiceVersion_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getServiceVersion_args");
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getServiceVersion_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getServiceVersion_argsTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
;
private static final Map byName = new HashMap();
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) {
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;
}
}
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getServiceVersion_args.class, metaDataMap);
}
public getServiceVersion_args() {
}
/**
* Performs a deep copy on other .
*/
public getServiceVersion_args(getServiceVersion_args other) {
}
public getServiceVersion_args deepCopy() {
return new getServiceVersion_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
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) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getServiceVersion_args)
return this.equals((getServiceVersion_args)that);
return false;
}
public boolean equals(getServiceVersion_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
return list.hashCode();
}
@Override
public int compareTo(getServiceVersion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getServiceVersion_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class getServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
public getServiceVersion_argsStandardScheme getScheme() {
return new getServiceVersion_argsStandardScheme();
}
}
private static class getServiceVersion_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, getServiceVersion_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
libthrift091.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(libthrift091.protocol.TProtocol oprot, getServiceVersion_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
public getServiceVersion_argsTupleScheme getScheme() {
return new getServiceVersion_argsTupleScheme();
}
}
private static class getServiceVersion_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, getServiceVersion_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getServiceVersion_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class getServiceVersion_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getServiceVersion_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getServiceVersion_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getServiceVersion_resultTupleSchemeFactory());
}
public Version success; // required
public GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
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 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, Version.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getServiceVersion_result.class, metaDataMap);
}
public getServiceVersion_result() {
}
public getServiceVersion_result(
Version success,
GalaxyEmqServiceException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public getServiceVersion_result(getServiceVersion_result other) {
if (other.isSetSuccess()) {
this.success = new Version(other.success);
}
if (other.isSetE()) {
this.e = new GalaxyEmqServiceException(other.e);
}
}
public getServiceVersion_result deepCopy() {
return new getServiceVersion_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public Version getSuccess() {
return this.success;
}
public getServiceVersion_result setSuccess(Version success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public GalaxyEmqServiceException getE() {
return this.e;
}
public getServiceVersion_result setE(GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Version)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
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 SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getServiceVersion_result)
return this.equals((getServiceVersion_result)that);
return false;
}
public boolean equals(getServiceVersion_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(getServiceVersion_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getServiceVersion_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class getServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
public getServiceVersion_resultStandardScheme getScheme() {
return new getServiceVersion_resultStandardScheme();
}
}
private static class getServiceVersion_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, getServiceVersion_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.success = new Version();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.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(libthrift091.protocol.TProtocol oprot, getServiceVersion_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
public getServiceVersion_resultTupleScheme getScheme() {
return new getServiceVersion_resultTupleScheme();
}
}
private static class getServiceVersion_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, getServiceVersion_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getServiceVersion_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new Version();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class validClientVersion_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("validClientVersion_args");
private static final libthrift091.protocol.TField CLIENT_VERSION_FIELD_DESC = new libthrift091.protocol.TField("clientVersion", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new validClientVersion_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new validClientVersion_argsTupleSchemeFactory());
}
public Version clientVersion; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
CLIENT_VERSION((short)1, "clientVersion");
private static final Map byName = new HashMap();
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: // CLIENT_VERSION
return CLIENT_VERSION;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CLIENT_VERSION, new libthrift091.meta_data.FieldMetaData("clientVersion", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, Version.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(validClientVersion_args.class, metaDataMap);
}
public validClientVersion_args() {
}
public validClientVersion_args(
Version clientVersion)
{
this();
this.clientVersion = clientVersion;
}
/**
* Performs a deep copy on other .
*/
public validClientVersion_args(validClientVersion_args other) {
if (other.isSetClientVersion()) {
this.clientVersion = new Version(other.clientVersion);
}
}
public validClientVersion_args deepCopy() {
return new validClientVersion_args(this);
}
@Override
public void clear() {
this.clientVersion = null;
}
public Version getClientVersion() {
return this.clientVersion;
}
public validClientVersion_args setClientVersion(Version clientVersion) {
this.clientVersion = clientVersion;
return this;
}
public void unsetClientVersion() {
this.clientVersion = null;
}
/** Returns true if field clientVersion is set (has been assigned a value) and false otherwise */
public boolean isSetClientVersion() {
return this.clientVersion != null;
}
public void setClientVersionIsSet(boolean value) {
if (!value) {
this.clientVersion = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CLIENT_VERSION:
if (value == null) {
unsetClientVersion();
} else {
setClientVersion((Version)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CLIENT_VERSION:
return getClientVersion();
}
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 CLIENT_VERSION:
return isSetClientVersion();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof validClientVersion_args)
return this.equals((validClientVersion_args)that);
return false;
}
public boolean equals(validClientVersion_args that) {
if (that == null)
return false;
boolean this_present_clientVersion = true && this.isSetClientVersion();
boolean that_present_clientVersion = true && that.isSetClientVersion();
if (this_present_clientVersion || that_present_clientVersion) {
if (!(this_present_clientVersion && that_present_clientVersion))
return false;
if (!this.clientVersion.equals(that.clientVersion))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_clientVersion = true && (isSetClientVersion());
list.add(present_clientVersion);
if (present_clientVersion)
list.add(clientVersion);
return list.hashCode();
}
@Override
public int compareTo(validClientVersion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetClientVersion()).compareTo(other.isSetClientVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientVersion()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.clientVersion, other.clientVersion);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("validClientVersion_args(");
boolean first = true;
sb.append("clientVersion:");
if (this.clientVersion == null) {
sb.append("null");
} else {
sb.append(this.clientVersion);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (clientVersion != null) {
clientVersion.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class validClientVersion_argsStandardSchemeFactory implements SchemeFactory {
public validClientVersion_argsStandardScheme getScheme() {
return new validClientVersion_argsStandardScheme();
}
}
private static class validClientVersion_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, validClientVersion_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CLIENT_VERSION
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.clientVersion = new Version();
struct.clientVersion.read(iprot);
struct.setClientVersionIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.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(libthrift091.protocol.TProtocol oprot, validClientVersion_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.clientVersion != null) {
oprot.writeFieldBegin(CLIENT_VERSION_FIELD_DESC);
struct.clientVersion.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validClientVersion_argsTupleSchemeFactory implements SchemeFactory {
public validClientVersion_argsTupleScheme getScheme() {
return new validClientVersion_argsTupleScheme();
}
}
private static class validClientVersion_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, validClientVersion_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetClientVersion()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetClientVersion()) {
struct.clientVersion.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, validClientVersion_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.clientVersion = new Version();
struct.clientVersion.read(iprot);
struct.setClientVersionIsSet(true);
}
}
}
}
public static class validClientVersion_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("validClientVersion_result");
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new validClientVersion_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new validClientVersion_resultTupleSchemeFactory());
}
public GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
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: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(validClientVersion_result.class, metaDataMap);
}
public validClientVersion_result() {
}
public validClientVersion_result(
GalaxyEmqServiceException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public validClientVersion_result(validClientVersion_result other) {
if (other.isSetE()) {
this.e = new GalaxyEmqServiceException(other.e);
}
}
public validClientVersion_result deepCopy() {
return new validClientVersion_result(this);
}
@Override
public void clear() {
this.e = null;
}
public GalaxyEmqServiceException getE() {
return this.e;
}
public validClientVersion_result setE(GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
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 E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof validClientVersion_result)
return this.equals((validClientVersion_result)that);
return false;
}
public boolean equals(validClientVersion_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(validClientVersion_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("validClientVersion_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class validClientVersion_resultStandardSchemeFactory implements SchemeFactory {
public validClientVersion_resultStandardScheme getScheme() {
return new validClientVersion_resultStandardScheme();
}
}
private static class validClientVersion_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, validClientVersion_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.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(libthrift091.protocol.TProtocol oprot, validClientVersion_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validClientVersion_resultTupleSchemeFactory implements SchemeFactory {
public validClientVersion_resultTupleScheme getScheme() {
return new validClientVersion_resultTupleScheme();
}
}
private static class validClientVersion_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, validClientVersion_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetE()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, validClientVersion_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.e = new GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
}