com.xiaomi.infra.galaxy.sds.thrift.AppInfo 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.sds.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 = "2016-8-10")
public class AppInfo implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("AppInfo");
private static final libthrift091.protocol.TField APP_ID_FIELD_DESC = new libthrift091.protocol.TField("appId", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField DEVELOPER_ID_FIELD_DESC = new libthrift091.protocol.TField("developerId", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField TABLE_MAPPINGS_FIELD_DESC = new libthrift091.protocol.TField("tableMappings", libthrift091.protocol.TType.MAP, (short)3);
private static final libthrift091.protocol.TField OAUTH_APP_MAPPING_FIELD_DESC = new libthrift091.protocol.TField("oauthAppMapping", libthrift091.protocol.TType.MAP, (short)4);
private static final libthrift091.protocol.TField APP_NAME_FIELD_DESC = new libthrift091.protocol.TField("appName", libthrift091.protocol.TType.STRING, (short)5);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new AppInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new AppInfoTupleSchemeFactory());
}
/**
* 小米应用ID
*/
public String appId; // optional
/**
* 小米开发者ID (注意:不同于小米ID)
*/
public String developerId; // optional
/**
* 表到表ID的映射
*/
public Map tableMappings; // optional
/**
* 应用OAuth信息, OAuth提供方到第三方OAuth应用信息(如OAuth AppID)的映射
*/
public Map oauthAppMapping; // optional
/**
* 小米应用名称
*/
public String appName; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
/**
* 小米应用ID
*/
APP_ID((short)1, "appId"),
/**
* 小米开发者ID (注意:不同于小米ID)
*/
DEVELOPER_ID((short)2, "developerId"),
/**
* 表到表ID的映射
*/
TABLE_MAPPINGS((short)3, "tableMappings"),
/**
* 应用OAuth信息, OAuth提供方到第三方OAuth应用信息(如OAuth AppID)的映射
*/
OAUTH_APP_MAPPING((short)4, "oauthAppMapping"),
/**
* 小米应用名称
*/
APP_NAME((short)5, "appName");
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: // APP_ID
return APP_ID;
case 2: // DEVELOPER_ID
return DEVELOPER_ID;
case 3: // TABLE_MAPPINGS
return TABLE_MAPPINGS;
case 4: // OAUTH_APP_MAPPING
return OAUTH_APP_MAPPING;
case 5: // APP_NAME
return APP_NAME;
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 _Fields optionals[] = {_Fields.APP_ID,_Fields.DEVELOPER_ID,_Fields.TABLE_MAPPINGS,_Fields.OAUTH_APP_MAPPING,_Fields.APP_NAME};
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.APP_ID, new libthrift091.meta_data.FieldMetaData("appId", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.DEVELOPER_ID, new libthrift091.meta_data.FieldMetaData("developerId", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_MAPPINGS, new libthrift091.meta_data.FieldMetaData("tableMappings", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING),
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))));
tmpMap.put(_Fields.OAUTH_APP_MAPPING, new libthrift091.meta_data.FieldMetaData("oauthAppMapping", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING),
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))));
tmpMap.put(_Fields.APP_NAME, new libthrift091.meta_data.FieldMetaData("appName", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(AppInfo.class, metaDataMap);
}
public AppInfo() {
}
/**
* Performs a deep copy on other.
*/
public AppInfo(AppInfo other) {
if (other.isSetAppId()) {
this.appId = other.appId;
}
if (other.isSetDeveloperId()) {
this.developerId = other.developerId;
}
if (other.isSetTableMappings()) {
Map __this__tableMappings = new HashMap(other.tableMappings);
this.tableMappings = __this__tableMappings;
}
if (other.isSetOauthAppMapping()) {
Map __this__oauthAppMapping = new HashMap(other.oauthAppMapping);
this.oauthAppMapping = __this__oauthAppMapping;
}
if (other.isSetAppName()) {
this.appName = other.appName;
}
}
public AppInfo deepCopy() {
return new AppInfo(this);
}
@Override
public void clear() {
this.appId = null;
this.developerId = null;
this.tableMappings = null;
this.oauthAppMapping = null;
this.appName = null;
}
/**
* 小米应用ID
*/
public String getAppId() {
return this.appId;
}
/**
* 小米应用ID
*/
public AppInfo setAppId(String appId) {
this.appId = appId;
return this;
}
public void unsetAppId() {
this.appId = null;
}
/** Returns true if field appId is set (has been assigned a value) and false otherwise */
public boolean isSetAppId() {
return this.appId != null;
}
public void setAppIdIsSet(boolean value) {
if (!value) {
this.appId = null;
}
}
/**
* 小米开发者ID (注意:不同于小米ID)
*/
public String getDeveloperId() {
return this.developerId;
}
/**
* 小米开发者ID (注意:不同于小米ID)
*/
public AppInfo setDeveloperId(String developerId) {
this.developerId = developerId;
return this;
}
public void unsetDeveloperId() {
this.developerId = null;
}
/** Returns true if field developerId is set (has been assigned a value) and false otherwise */
public boolean isSetDeveloperId() {
return this.developerId != null;
}
public void setDeveloperIdIsSet(boolean value) {
if (!value) {
this.developerId = null;
}
}
public int getTableMappingsSize() {
return (this.tableMappings == null) ? 0 : this.tableMappings.size();
}
public void putToTableMappings(String key, String val) {
if (this.tableMappings == null) {
this.tableMappings = new HashMap();
}
this.tableMappings.put(key, val);
}
/**
* 表到表ID的映射
*/
public Map getTableMappings() {
return this.tableMappings;
}
/**
* 表到表ID的映射
*/
public AppInfo setTableMappings(Map tableMappings) {
this.tableMappings = tableMappings;
return this;
}
public void unsetTableMappings() {
this.tableMappings = null;
}
/** Returns true if field tableMappings is set (has been assigned a value) and false otherwise */
public boolean isSetTableMappings() {
return this.tableMappings != null;
}
public void setTableMappingsIsSet(boolean value) {
if (!value) {
this.tableMappings = null;
}
}
public int getOauthAppMappingSize() {
return (this.oauthAppMapping == null) ? 0 : this.oauthAppMapping.size();
}
public void putToOauthAppMapping(String key, String val) {
if (this.oauthAppMapping == null) {
this.oauthAppMapping = new HashMap();
}
this.oauthAppMapping.put(key, val);
}
/**
* 应用OAuth信息, OAuth提供方到第三方OAuth应用信息(如OAuth AppID)的映射
*/
public Map getOauthAppMapping() {
return this.oauthAppMapping;
}
/**
* 应用OAuth信息, OAuth提供方到第三方OAuth应用信息(如OAuth AppID)的映射
*/
public AppInfo setOauthAppMapping(Map oauthAppMapping) {
this.oauthAppMapping = oauthAppMapping;
return this;
}
public void unsetOauthAppMapping() {
this.oauthAppMapping = null;
}
/** Returns true if field oauthAppMapping is set (has been assigned a value) and false otherwise */
public boolean isSetOauthAppMapping() {
return this.oauthAppMapping != null;
}
public void setOauthAppMappingIsSet(boolean value) {
if (!value) {
this.oauthAppMapping = null;
}
}
/**
* 小米应用名称
*/
public String getAppName() {
return this.appName;
}
/**
* 小米应用名称
*/
public AppInfo setAppName(String appName) {
this.appName = appName;
return this;
}
public void unsetAppName() {
this.appName = null;
}
/** Returns true if field appName is set (has been assigned a value) and false otherwise */
public boolean isSetAppName() {
return this.appName != null;
}
public void setAppNameIsSet(boolean value) {
if (!value) {
this.appName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_ID:
if (value == null) {
unsetAppId();
} else {
setAppId((String)value);
}
break;
case DEVELOPER_ID:
if (value == null) {
unsetDeveloperId();
} else {
setDeveloperId((String)value);
}
break;
case TABLE_MAPPINGS:
if (value == null) {
unsetTableMappings();
} else {
setTableMappings((Map)value);
}
break;
case OAUTH_APP_MAPPING:
if (value == null) {
unsetOauthAppMapping();
} else {
setOauthAppMapping((Map)value);
}
break;
case APP_NAME:
if (value == null) {
unsetAppName();
} else {
setAppName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_ID:
return getAppId();
case DEVELOPER_ID:
return getDeveloperId();
case TABLE_MAPPINGS:
return getTableMappings();
case OAUTH_APP_MAPPING:
return getOauthAppMapping();
case APP_NAME:
return getAppName();
}
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 APP_ID:
return isSetAppId();
case DEVELOPER_ID:
return isSetDeveloperId();
case TABLE_MAPPINGS:
return isSetTableMappings();
case OAUTH_APP_MAPPING:
return isSetOauthAppMapping();
case APP_NAME:
return isSetAppName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof AppInfo)
return this.equals((AppInfo)that);
return false;
}
public boolean equals(AppInfo that) {
if (that == null)
return false;
boolean this_present_appId = true && this.isSetAppId();
boolean that_present_appId = true && that.isSetAppId();
if (this_present_appId || that_present_appId) {
if (!(this_present_appId && that_present_appId))
return false;
if (!this.appId.equals(that.appId))
return false;
}
boolean this_present_developerId = true && this.isSetDeveloperId();
boolean that_present_developerId = true && that.isSetDeveloperId();
if (this_present_developerId || that_present_developerId) {
if (!(this_present_developerId && that_present_developerId))
return false;
if (!this.developerId.equals(that.developerId))
return false;
}
boolean this_present_tableMappings = true && this.isSetTableMappings();
boolean that_present_tableMappings = true && that.isSetTableMappings();
if (this_present_tableMappings || that_present_tableMappings) {
if (!(this_present_tableMappings && that_present_tableMappings))
return false;
if (!this.tableMappings.equals(that.tableMappings))
return false;
}
boolean this_present_oauthAppMapping = true && this.isSetOauthAppMapping();
boolean that_present_oauthAppMapping = true && that.isSetOauthAppMapping();
if (this_present_oauthAppMapping || that_present_oauthAppMapping) {
if (!(this_present_oauthAppMapping && that_present_oauthAppMapping))
return false;
if (!this.oauthAppMapping.equals(that.oauthAppMapping))
return false;
}
boolean this_present_appName = true && this.isSetAppName();
boolean that_present_appName = true && that.isSetAppName();
if (this_present_appName || that_present_appName) {
if (!(this_present_appName && that_present_appName))
return false;
if (!this.appName.equals(that.appName))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy