com.gen.QuerySiteInfoResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-autotest-tool Show documentation
Show all versions of java-autotest-tool Show documentation
This is an integration of autotest tools
package com.gen;
/**
* Autogenerated by Thrift Compiler (0.13.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2021-02-04")
public class QuerySiteInfoResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QuerySiteInfoResponse");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("Code", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("Data", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField BASE_RESP_FIELD_DESC = new org.apache.thrift.protocol.TField("BaseResp", org.apache.thrift.protocol.TType.STRUCT, (short)255);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new QuerySiteInfoResponseStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new QuerySiteInfoResponseTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable String Code; // required
public @org.apache.thrift.annotation.Nullable String Message; // required
public @org.apache.thrift.annotation.Nullable QuerySiteInfoData Data; // optional
public @org.apache.thrift.annotation.Nullable BaseResp BaseResp; // 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 {
CODE((short)1, "Code"),
MESSAGE((short)2, "Message"),
DATA((short)3, "Data"),
BASE_RESP((short)255, "BaseResp");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // CODE
return CODE;
case 2: // MESSAGE
return MESSAGE;
case 3: // DATA
return DATA;
case 255: // BASE_RESP
return BASE_RESP;
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.
*/
@org.apache.thrift.annotation.Nullable
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 _Fields optionals[] = {_Fields.DATA};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("Code", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("Data", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QuerySiteInfoData.class)));
tmpMap.put(_Fields.BASE_RESP, new org.apache.thrift.meta_data.FieldMetaData("BaseResp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BaseResp.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QuerySiteInfoResponse.class, metaDataMap);
}
public QuerySiteInfoResponse() {
}
public QuerySiteInfoResponse(
String Code,
String Message,
BaseResp BaseResp)
{
this();
this.Code = Code;
this.Message = Message;
this.BaseResp = BaseResp;
}
/**
* Performs a deep copy on other.
*/
public QuerySiteInfoResponse(QuerySiteInfoResponse other) {
if (other.isSetCode()) {
this.Code = other.Code;
}
if (other.isSetMessage()) {
this.Message = other.Message;
}
if (other.isSetData()) {
this.Data = new QuerySiteInfoData(other.Data);
}
if (other.isSetBaseResp()) {
this.BaseResp = new BaseResp(other.BaseResp);
}
}
public QuerySiteInfoResponse deepCopy() {
return new QuerySiteInfoResponse(this);
}
@Override
public void clear() {
this.Code = null;
this.Message = null;
this.Data = null;
this.BaseResp = null;
}
@org.apache.thrift.annotation.Nullable
public String getCode() {
return this.Code;
}
public QuerySiteInfoResponse setCode(@org.apache.thrift.annotation.Nullable String Code) {
this.Code = Code;
return this;
}
public void unsetCode() {
this.Code = null;
}
/** Returns true if field Code is set (has been assigned a value) and false otherwise */
public boolean isSetCode() {
return this.Code != null;
}
public void setCodeIsSet(boolean value) {
if (!value) {
this.Code = null;
}
}
@org.apache.thrift.annotation.Nullable
public String getMessage() {
return this.Message;
}
public QuerySiteInfoResponse setMessage(@org.apache.thrift.annotation.Nullable String 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;
}
}
@org.apache.thrift.annotation.Nullable
public QuerySiteInfoData getData() {
return this.Data;
}
public QuerySiteInfoResponse setData(@org.apache.thrift.annotation.Nullable QuerySiteInfoData Data) {
this.Data = Data;
return this;
}
public void unsetData() {
this.Data = null;
}
/** Returns true if field Data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.Data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.Data = null;
}
}
@org.apache.thrift.annotation.Nullable
public BaseResp getBaseResp() {
return this.BaseResp;
}
public QuerySiteInfoResponse setBaseResp(@org.apache.thrift.annotation.Nullable BaseResp BaseResp) {
this.BaseResp = BaseResp;
return this;
}
public void unsetBaseResp() {
this.BaseResp = null;
}
/** Returns true if field BaseResp is set (has been assigned a value) and false otherwise */
public boolean isSetBaseResp() {
return this.BaseResp != null;
}
public void setBaseRespIsSet(boolean value) {
if (!value) {
this.BaseResp = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
switch (field) {
case CODE:
if (value == null) {
unsetCode();
} else {
setCode((String)value);
}
break;
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
setMessage((String)value);
}
break;
case DATA:
if (value == null) {
unsetData();
} else {
setData((QuerySiteInfoData)value);
}
break;
case BASE_RESP:
if (value == null) {
unsetBaseResp();
} else {
setBaseResp((BaseResp)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return getCode();
case MESSAGE:
return getMessage();
case DATA:
return getData();
case BASE_RESP:
return getBaseResp();
}
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 CODE:
return isSetCode();
case MESSAGE:
return isSetMessage();
case DATA:
return isSetData();
case BASE_RESP:
return isSetBaseResp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof QuerySiteInfoResponse)
return this.equals((QuerySiteInfoResponse)that);
return false;
}
public boolean equals(QuerySiteInfoResponse that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_Code = true && this.isSetCode();
boolean that_present_Code = true && that.isSetCode();
if (this_present_Code || that_present_Code) {
if (!(this_present_Code && that_present_Code))
return false;
if (!this.Code.equals(that.Code))
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_Data = true && this.isSetData();
boolean that_present_Data = true && that.isSetData();
if (this_present_Data || that_present_Data) {
if (!(this_present_Data && that_present_Data))
return false;
if (!this.Data.equals(that.Data))
return false;
}
boolean this_present_BaseResp = true && this.isSetBaseResp();
boolean that_present_BaseResp = true && that.isSetBaseResp();
if (this_present_BaseResp || that_present_BaseResp) {
if (!(this_present_BaseResp && that_present_BaseResp))
return false;
if (!this.BaseResp.equals(that.BaseResp))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetCode()) ? 131071 : 524287);
if (isSetCode())
hashCode = hashCode * 8191 + Code.hashCode();
hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
if (isSetMessage())
hashCode = hashCode * 8191 + Message.hashCode();
hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
if (isSetData())
hashCode = hashCode * 8191 + Data.hashCode();
hashCode = hashCode * 8191 + ((isSetBaseResp()) ? 131071 : 524287);
if (isSetBaseResp())
hashCode = hashCode * 8191 + BaseResp.hashCode();
return hashCode;
}
@Override
public int compareTo(QuerySiteInfoResponse other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Code, other.Code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMessage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Message, other.Message);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Data, other.Data);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBaseResp()).compareTo(other.isSetBaseResp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBaseResp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.BaseResp, other.BaseResp);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("QuerySiteInfoResponse(");
boolean first = true;
sb.append("Code:");
if (this.Code == null) {
sb.append("null");
} else {
sb.append(this.Code);
}
first = false;
if (!first) sb.append(", ");
sb.append("Message:");
if (this.Message == null) {
sb.append("null");
} else {
sb.append(this.Message);
}
first = false;
if (isSetData()) {
if (!first) sb.append(", ");
sb.append("Data:");
if (this.Data == null) {
sb.append("null");
} else {
sb.append(this.Data);
}
first = false;
}
if (!first) sb.append(", ");
sb.append("BaseResp:");
if (this.BaseResp == null) {
sb.append("null");
} else {
sb.append(this.BaseResp);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (Code == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'Code' was not present! Struct: " + toString());
}
if (Message == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'Message' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (Data != null) {
Data.validate();
}
if (BaseResp != null) {
BaseResp.validate();
}
}
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 {
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 QuerySiteInfoResponseStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public QuerySiteInfoResponseStandardScheme getScheme() {
return new QuerySiteInfoResponseStandardScheme();
}
}
private static class QuerySiteInfoResponseStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, QuerySiteInfoResponse 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: // CODE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.Code = iprot.readString();
struct.setCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.Message = iprot.readString();
struct.setMessageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.Data = new QuerySiteInfoData();
struct.Data.read(iprot);
struct.setDataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 255: // BASE_RESP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.BaseResp = new BaseResp();
struct.BaseResp.read(iprot);
struct.setBaseRespIsSet(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, QuerySiteInfoResponse struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.Code != null) {
oprot.writeFieldBegin(CODE_FIELD_DESC);
oprot.writeString(struct.Code);
oprot.writeFieldEnd();
}
if (struct.Message != null) {
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
oprot.writeString(struct.Message);
oprot.writeFieldEnd();
}
if (struct.Data != null) {
if (struct.isSetData()) {
oprot.writeFieldBegin(DATA_FIELD_DESC);
struct.Data.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.BaseResp != null) {
oprot.writeFieldBegin(BASE_RESP_FIELD_DESC);
struct.BaseResp.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class QuerySiteInfoResponseTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public QuerySiteInfoResponseTupleScheme getScheme() {
return new QuerySiteInfoResponseTupleScheme();
}
}
private static class QuerySiteInfoResponseTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, QuerySiteInfoResponse struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.Code);
oprot.writeString(struct.Message);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetData()) {
optionals.set(0);
}
if (struct.isSetBaseResp()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetData()) {
struct.Data.write(oprot);
}
if (struct.isSetBaseResp()) {
struct.BaseResp.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, QuerySiteInfoResponse struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.Code = iprot.readString();
struct.setCodeIsSet(true);
struct.Message = iprot.readString();
struct.setMessageIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.Data = new QuerySiteInfoData();
struct.Data.read(iprot);
struct.setDataIsSet(true);
}
if (incoming.get(1)) {
struct.BaseResp = new BaseResp();
struct.BaseResp.read(iprot);
struct.setBaseRespIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}