/**
* 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-12-30")
public class AdminService {
/**
* 结构化存储管理接口
*/
public interface Iface extends com.xiaomi.infra.galaxy.sds.thrift.BaseService.Iface {
/**
* 保存应用信息,用于注册第三方应用OAuth信息
*
* @param appInfo
*/
public void saveAppInfo(AppInfo appInfo) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询应用信息
*
* @param appId
*/
public AppInfo getAppInfo(String appId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询指定用户所有应用信息
*/
public List<AppInfo> findAllApps() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取指定用户所有表信息
*/
public List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> findAllTables() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 创建表
*
* @param tableName
* @param tableSpec
*/
public com.xiaomi.infra.galaxy.sds.thrift.TableInfo createTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 删除表
*
* @param tableName
*/
public void dropTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 修改表
*
* @param tableName
* @param tableSpec
*/
public void alterTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 克隆表
*
* @param srcTableName
* @param destTableName
* @param flushTable
*/
public void cloneTable(String srcTableName, String destTableName, boolean flushTable) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 关闭表读写操作
*
* @param tableName
*/
public void disableTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 打开表读写操作
*
* @param tableName
*/
public void enableTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取表定义
*
* @param tableName
*/
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec describeTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取表状态等元信息
*
* @param tableName
*/
public com.xiaomi.infra.galaxy.sds.thrift.TableStatus getTableStatus(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取表状态
*
* @param tableName
*/
public com.xiaomi.infra.galaxy.sds.thrift.TableState getTableState(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取表分布信息,如用于MapReduce应用
*
* @param tableName
* @param startKey
* @param stopKey
*/
public List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> getTableSplits(String tableName, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询表统计指标
*
* @param query
*/
public TimeSeriesData queryMetric(MetricQueryRequest query) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 批量查询表统计指标
*
* @param queries
*/
public List<TimeSeriesData> queryMetrics(List<MetricQueryRequest> queries) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取AppInfo列表,只包括appId和appName
*/
public List<AppInfo> findAllAppInfo() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取表空间大小
*
* @param tableName
*/
public long getTableSize(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 上传客户端metrics
*
* @param clientMetrics
*/
public void putClientMetrics(ClientMetrics clientMetrics) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 添加关注电话
*
* @param phoneNumber
* @param spaceId
*/
public void subscribePhoneAlert(String phoneNumber, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 取消关注电话
*
* @param phoneNumber
* @param spaceId
*/
public void unsubscribePhoneAlert(String phoneNumber, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 添加关注邮箱
*
* @param email
* @param spaceId
*/
public void subscribeEmailAlert(String email, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 取消关注邮箱
*
* @param email
* @param spaceId
*/
public void unsubscribeEmailAlert(String email, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查看所有关注电话
*
* @param spaceId
*/
public List<String> listSubscribedPhone(String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查看所有关注邮箱地址
*
* @param spaceId
*/
public List<String> listSubscribedEmail(String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 获取表空间历史大小
*
* @param tableName
* @param startDate
* @param stopDate
*/
public Map<Long,Long> getTableHistorySize(String tableName, long startDate, long stopDate) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 表重命名
*
* @param srcName
* @param destName
*/
public void renameTable(String srcName, String destName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询表的所有snapshot
*
* @param tableName
*/
public TableSnapshots listSnapshots(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 生成表快照
*
* @param tableName
* @param snapshotName
*/
public void snapshotTable(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 删除某个快照
*
* @param tableName
* @param snapshotName
*/
public void deleteSnapshot(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 从快照恢复表
*
* @param tableName
* @param snapshotName
* @param destTableName
* @param isSystem
*/
public void restoreSnapshot(String tableName, String snapshotName, String destTableName, boolean isSystem) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 列出用户的所有表快照
*/
public List<SnapshotTableView> listAllSnapshots() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 取消生成快照
*
* @param tableName
* @param snapshotName
*/
public void cancelSnapshotTable(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询快照状态
*
* @param tableName
* @param snapshotName
*/
public com.xiaomi.infra.galaxy.sds.thrift.SnapshotState getSnapshotState(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询用户各种quota的使用情况
*
* @param spaceId
*/
public QuotaInfo getQuotaInfo(String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询最近的stream checkpoint
*
* @param tableName
* @param topicName
*/
public StreamCheckpoint getLatestStreamCheckpoint(String tableName, String topicName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询小于等于timestamp的最大stream checkpoint
*
* @param tableName
* @param topicName
* @param timestamp
*/
public StreamCheckpoint getFloorStreamCheckpoint(String tableName, String topicName, long timestamp) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 查询大于等于timestamp的最小stream checkpoint
*
* @param tableName
* @param topicName
* @param timestamp
*/
public StreamCheckpoint getCeilStreamCheckpoint(String tableName, String topicName, long timestamp) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
/**
* 恢复表到指定timestamp的状态,destTableName由系统根据最近快照创建,异步操作
*
* @param srcTableName
* @param destTableName
* @param topicName
* @param timestamp
*/
public void recoverTable(String srcTableName, String destTableName, String topicName, long timestamp) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException;
}
public interface AsyncIface extends com.xiaomi.infra.galaxy.sds.thrift.BaseService .AsyncIface {
public void saveAppInfo(AppInfo appInfo, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getAppInfo(String appId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void findAllApps(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void findAllTables(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void createTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void dropTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void alterTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void cloneTable(String srcTableName, String destTableName, boolean flushTable, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void disableTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void enableTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void describeTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getTableStatus(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getTableState(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getTableSplits(String tableName, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void queryMetric(MetricQueryRequest query, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void queryMetrics(List<MetricQueryRequest> queries, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void findAllAppInfo(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getTableSize(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void putClientMetrics(ClientMetrics clientMetrics, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void subscribePhoneAlert(String phoneNumber, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void unsubscribePhoneAlert(String phoneNumber, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void subscribeEmailAlert(String email, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void unsubscribeEmailAlert(String email, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void listSubscribedPhone(String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void listSubscribedEmail(String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getTableHistorySize(String tableName, long startDate, long stopDate, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void renameTable(String srcName, String destName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void listSnapshots(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void snapshotTable(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deleteSnapshot(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void restoreSnapshot(String tableName, String snapshotName, String destTableName, boolean isSystem, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void listAllSnapshots(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void cancelSnapshotTable(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getSnapshotState(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getQuotaInfo(String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getLatestStreamCheckpoint(String tableName, String topicName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getFloorStreamCheckpoint(String tableName, String topicName, long timestamp, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getCeilStreamCheckpoint(String tableName, String topicName, long timestamp, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void recoverTable(String srcTableName, String destTableName, String topicName, long timestamp, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
}
public static class Client extends com.xiaomi.infra.galaxy.sds.thrift.BaseService.Client implements Iface {
public static class Factory implements libthrift091.TServiceClientFactory<Client> {
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 void saveAppInfo(AppInfo appInfo) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_saveAppInfo(appInfo);
recv_saveAppInfo();
}
public void send_saveAppInfo(AppInfo appInfo) throws libthrift091.TException
{
saveAppInfo_args args = new saveAppInfo_args();
args.setAppInfo(appInfo);
sendBase("saveAppInfo", args);
}
public void recv_saveAppInfo() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
saveAppInfo_result result = new saveAppInfo_result();
receiveBase(result, "saveAppInfo");
if (result.se != null) {
throw result.se;
}
return;
}
public AppInfo getAppInfo(String appId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getAppInfo(appId);
return recv_getAppInfo();
}
public void send_getAppInfo(String appId) throws libthrift091.TException
{
getAppInfo_args args = new getAppInfo_args();
args.setAppId(appId);
sendBase("getAppInfo", args);
}
public AppInfo recv_getAppInfo() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getAppInfo_result result = new getAppInfo_result();
receiveBase(result, "getAppInfo");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getAppInfo failed: unknown result");
}
public List<AppInfo> findAllApps() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_findAllApps();
return recv_findAllApps();
}
public void send_findAllApps() throws libthrift091.TException
{
findAllApps_args args = new findAllApps_args();
sendBase("findAllApps", args);
}
public List<AppInfo> recv_findAllApps() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
findAllApps_result result = new findAllApps_result();
receiveBase(result, "findAllApps");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "findAllApps failed: unknown result");
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> findAllTables() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_findAllTables();
return recv_findAllTables();
}
public void send_findAllTables() throws libthrift091.TException
{
findAllTables_args args = new findAllTables_args();
sendBase("findAllTables", args);
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> recv_findAllTables() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
findAllTables_result result = new findAllTables_result();
receiveBase(result, "findAllTables");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "findAllTables failed: unknown result");
}
public com.xiaomi.infra.galaxy.sds.thrift.TableInfo createTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_createTable(tableName, tableSpec);
return recv_createTable();
}
public void send_createTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) throws libthrift091.TException
{
createTable_args args = new createTable_args();
args.setTableName(tableName);
args.setTableSpec(tableSpec);
sendBase("createTable", args);
}
public com.xiaomi.infra.galaxy.sds.thrift.TableInfo recv_createTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
createTable_result result = new createTable_result();
receiveBase(result, "createTable");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "createTable failed: unknown result");
}
public void dropTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_dropTable(tableName);
recv_dropTable();
}
public void send_dropTable(String tableName) throws libthrift091.TException
{
dropTable_args args = new dropTable_args();
args.setTableName(tableName);
sendBase("dropTable", args);
}
public void recv_dropTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
dropTable_result result = new dropTable_result();
receiveBase(result, "dropTable");
if (result.se != null) {
throw result.se;
}
return;
}
public void alterTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_alterTable(tableName, tableSpec);
recv_alterTable();
}
public void send_alterTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) throws libthrift091.TException
{
alterTable_args args = new alterTable_args();
args.setTableName(tableName);
args.setTableSpec(tableSpec);
sendBase("alterTable", args);
}
public void recv_alterTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
alterTable_result result = new alterTable_result();
receiveBase(result, "alterTable");
if (result.se != null) {
throw result.se;
}
return;
}
public void cloneTable(String srcTableName, String destTableName, boolean flushTable) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_cloneTable(srcTableName, destTableName, flushTable);
recv_cloneTable();
}
public void send_cloneTable(String srcTableName, String destTableName, boolean flushTable) throws libthrift091.TException
{
cloneTable_args args = new cloneTable_args();
args.setSrcTableName(srcTableName);
args.setDestTableName(destTableName);
args.setFlushTable(flushTable);
sendBase("cloneTable", args);
}
public void recv_cloneTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
cloneTable_result result = new cloneTable_result();
receiveBase(result, "cloneTable");
if (result.se != null) {
throw result.se;
}
return;
}
public void disableTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_disableTable(tableName);
recv_disableTable();
}
public void send_disableTable(String tableName) throws libthrift091.TException
{
disableTable_args args = new disableTable_args();
args.setTableName(tableName);
sendBase("disableTable", args);
}
public void recv_disableTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
disableTable_result result = new disableTable_result();
receiveBase(result, "disableTable");
if (result.se != null) {
throw result.se;
}
return;
}
public void enableTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_enableTable(tableName);
recv_enableTable();
}
public void send_enableTable(String tableName) throws libthrift091.TException
{
enableTable_args args = new enableTable_args();
args.setTableName(tableName);
sendBase("enableTable", args);
}
public void recv_enableTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
enableTable_result result = new enableTable_result();
receiveBase(result, "enableTable");
if (result.se != null) {
throw result.se;
}
return;
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec describeTable(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_describeTable(tableName);
return recv_describeTable();
}
public void send_describeTable(String tableName) throws libthrift091.TException
{
describeTable_args args = new describeTable_args();
args.setTableName(tableName);
sendBase("describeTable", args);
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec recv_describeTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
describeTable_result result = new describeTable_result();
receiveBase(result, "describeTable");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "describeTable failed: unknown result");
}
public com.xiaomi.infra.galaxy.sds.thrift.TableStatus getTableStatus(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getTableStatus(tableName);
return recv_getTableStatus();
}
public void send_getTableStatus(String tableName) throws libthrift091.TException
{
getTableStatus_args args = new getTableStatus_args();
args.setTableName(tableName);
sendBase("getTableStatus", args);
}
public com.xiaomi.infra.galaxy.sds.thrift.TableStatus recv_getTableStatus() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getTableStatus_result result = new getTableStatus_result();
receiveBase(result, "getTableStatus");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getTableStatus failed: unknown result");
}
public com.xiaomi.infra.galaxy.sds.thrift.TableState getTableState(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getTableState(tableName);
return recv_getTableState();
}
public void send_getTableState(String tableName) throws libthrift091.TException
{
getTableState_args args = new getTableState_args();
args.setTableName(tableName);
sendBase("getTableState", args);
}
public com.xiaomi.infra.galaxy.sds.thrift.TableState recv_getTableState() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getTableState_result result = new getTableState_result();
receiveBase(result, "getTableState");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getTableState failed: unknown result");
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> getTableSplits(String tableName, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getTableSplits(tableName, startKey, stopKey);
return recv_getTableSplits();
}
public void send_getTableSplits(String tableName, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey) throws libthrift091.TException
{
getTableSplits_args args = new getTableSplits_args();
args.setTableName(tableName);
args.setStartKey(startKey);
args.setStopKey(stopKey);
sendBase("getTableSplits", args);
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> recv_getTableSplits() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getTableSplits_result result = new getTableSplits_result();
receiveBase(result, "getTableSplits");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getTableSplits failed: unknown result");
}
public TimeSeriesData queryMetric(MetricQueryRequest query) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_queryMetric(query);
return recv_queryMetric();
}
public void send_queryMetric(MetricQueryRequest query) throws libthrift091.TException
{
queryMetric_args args = new queryMetric_args();
args.setQuery(query);
sendBase("queryMetric", args);
}
public TimeSeriesData recv_queryMetric() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
queryMetric_result result = new queryMetric_result();
receiveBase(result, "queryMetric");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "queryMetric failed: unknown result");
}
public List<TimeSeriesData> queryMetrics(List<MetricQueryRequest> queries) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_queryMetrics(queries);
return recv_queryMetrics();
}
public void send_queryMetrics(List<MetricQueryRequest> queries) throws libthrift091.TException
{
queryMetrics_args args = new queryMetrics_args();
args.setQueries(queries);
sendBase("queryMetrics", args);
}
public List<TimeSeriesData> recv_queryMetrics() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
queryMetrics_result result = new queryMetrics_result();
receiveBase(result, "queryMetrics");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "queryMetrics failed: unknown result");
}
public List<AppInfo> findAllAppInfo() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_findAllAppInfo();
return recv_findAllAppInfo();
}
public void send_findAllAppInfo() throws libthrift091.TException
{
findAllAppInfo_args args = new findAllAppInfo_args();
sendBase("findAllAppInfo", args);
}
public List<AppInfo> recv_findAllAppInfo() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
findAllAppInfo_result result = new findAllAppInfo_result();
receiveBase(result, "findAllAppInfo");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "findAllAppInfo failed: unknown result");
}
public long getTableSize(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getTableSize(tableName);
return recv_getTableSize();
}
public void send_getTableSize(String tableName) throws libthrift091.TException
{
getTableSize_args args = new getTableSize_args();
args.setTableName(tableName);
sendBase("getTableSize", args);
}
public long recv_getTableSize() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getTableSize_result result = new getTableSize_result();
receiveBase(result, "getTableSize");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getTableSize failed: unknown result");
}
public void putClientMetrics(ClientMetrics clientMetrics) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_putClientMetrics(clientMetrics);
recv_putClientMetrics();
}
public void send_putClientMetrics(ClientMetrics clientMetrics) throws libthrift091.TException
{
putClientMetrics_args args = new putClientMetrics_args();
args.setClientMetrics(clientMetrics);
sendBase("putClientMetrics", args);
}
public void recv_putClientMetrics() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
putClientMetrics_result result = new putClientMetrics_result();
receiveBase(result, "putClientMetrics");
if (result.se != null) {
throw result.se;
}
return;
}
public void subscribePhoneAlert(String phoneNumber, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_subscribePhoneAlert(phoneNumber, spaceId);
recv_subscribePhoneAlert();
}
public void send_subscribePhoneAlert(String phoneNumber, String spaceId) throws libthrift091.TException
{
subscribePhoneAlert_args args = new subscribePhoneAlert_args();
args.setPhoneNumber(phoneNumber);
args.setSpaceId(spaceId);
sendBase("subscribePhoneAlert", args);
}
public void recv_subscribePhoneAlert() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
subscribePhoneAlert_result result = new subscribePhoneAlert_result();
receiveBase(result, "subscribePhoneAlert");
if (result.se != null) {
throw result.se;
}
return;
}
public void unsubscribePhoneAlert(String phoneNumber, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_unsubscribePhoneAlert(phoneNumber, spaceId);
recv_unsubscribePhoneAlert();
}
public void send_unsubscribePhoneAlert(String phoneNumber, String spaceId) throws libthrift091.TException
{
unsubscribePhoneAlert_args args = new unsubscribePhoneAlert_args();
args.setPhoneNumber(phoneNumber);
args.setSpaceId(spaceId);
sendBase("unsubscribePhoneAlert", args);
}
public void recv_unsubscribePhoneAlert() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
unsubscribePhoneAlert_result result = new unsubscribePhoneAlert_result();
receiveBase(result, "unsubscribePhoneAlert");
if (result.se != null) {
throw result.se;
}
return;
}
public void subscribeEmailAlert(String email, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_subscribeEmailAlert(email, spaceId);
recv_subscribeEmailAlert();
}
public void send_subscribeEmailAlert(String email, String spaceId) throws libthrift091.TException
{
subscribeEmailAlert_args args = new subscribeEmailAlert_args();
args.setEmail(email);
args.setSpaceId(spaceId);
sendBase("subscribeEmailAlert", args);
}
public void recv_subscribeEmailAlert() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
subscribeEmailAlert_result result = new subscribeEmailAlert_result();
receiveBase(result, "subscribeEmailAlert");
if (result.se != null) {
throw result.se;
}
return;
}
public void unsubscribeEmailAlert(String email, String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_unsubscribeEmailAlert(email, spaceId);
recv_unsubscribeEmailAlert();
}
public void send_unsubscribeEmailAlert(String email, String spaceId) throws libthrift091.TException
{
unsubscribeEmailAlert_args args = new unsubscribeEmailAlert_args();
args.setEmail(email);
args.setSpaceId(spaceId);
sendBase("unsubscribeEmailAlert", args);
}
public void recv_unsubscribeEmailAlert() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
unsubscribeEmailAlert_result result = new unsubscribeEmailAlert_result();
receiveBase(result, "unsubscribeEmailAlert");
if (result.se != null) {
throw result.se;
}
return;
}
public List<String> listSubscribedPhone(String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_listSubscribedPhone(spaceId);
return recv_listSubscribedPhone();
}
public void send_listSubscribedPhone(String spaceId) throws libthrift091.TException
{
listSubscribedPhone_args args = new listSubscribedPhone_args();
args.setSpaceId(spaceId);
sendBase("listSubscribedPhone", args);
}
public List<String> recv_listSubscribedPhone() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
listSubscribedPhone_result result = new listSubscribedPhone_result();
receiveBase(result, "listSubscribedPhone");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listSubscribedPhone failed: unknown result");
}
public List<String> listSubscribedEmail(String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_listSubscribedEmail(spaceId);
return recv_listSubscribedEmail();
}
public void send_listSubscribedEmail(String spaceId) throws libthrift091.TException
{
listSubscribedEmail_args args = new listSubscribedEmail_args();
args.setSpaceId(spaceId);
sendBase("listSubscribedEmail", args);
}
public List<String> recv_listSubscribedEmail() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
listSubscribedEmail_result result = new listSubscribedEmail_result();
receiveBase(result, "listSubscribedEmail");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listSubscribedEmail failed: unknown result");
}
public Map<Long,Long> getTableHistorySize(String tableName, long startDate, long stopDate) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getTableHistorySize(tableName, startDate, stopDate);
return recv_getTableHistorySize();
}
public void send_getTableHistorySize(String tableName, long startDate, long stopDate) throws libthrift091.TException
{
getTableHistorySize_args args = new getTableHistorySize_args();
args.setTableName(tableName);
args.setStartDate(startDate);
args.setStopDate(stopDate);
sendBase("getTableHistorySize", args);
}
public Map<Long,Long> recv_getTableHistorySize() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getTableHistorySize_result result = new getTableHistorySize_result();
receiveBase(result, "getTableHistorySize");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getTableHistorySize failed: unknown result");
}
public void renameTable(String srcName, String destName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_renameTable(srcName, destName);
recv_renameTable();
}
public void send_renameTable(String srcName, String destName) throws libthrift091.TException
{
renameTable_args args = new renameTable_args();
args.setSrcName(srcName);
args.setDestName(destName);
sendBase("renameTable", args);
}
public void recv_renameTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
renameTable_result result = new renameTable_result();
receiveBase(result, "renameTable");
if (result.se != null) {
throw result.se;
}
return;
}
public TableSnapshots listSnapshots(String tableName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_listSnapshots(tableName);
return recv_listSnapshots();
}
public void send_listSnapshots(String tableName) throws libthrift091.TException
{
listSnapshots_args args = new listSnapshots_args();
args.setTableName(tableName);
sendBase("listSnapshots", args);
}
public TableSnapshots recv_listSnapshots() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
listSnapshots_result result = new listSnapshots_result();
receiveBase(result, "listSnapshots");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listSnapshots failed: unknown result");
}
public void snapshotTable(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_snapshotTable(tableName, snapshotName);
recv_snapshotTable();
}
public void send_snapshotTable(String tableName, String snapshotName) throws libthrift091.TException
{
snapshotTable_args args = new snapshotTable_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
sendBase("snapshotTable", args);
}
public void recv_snapshotTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
snapshotTable_result result = new snapshotTable_result();
receiveBase(result, "snapshotTable");
if (result.se != null) {
throw result.se;
}
return;
}
public void deleteSnapshot(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_deleteSnapshot(tableName, snapshotName);
recv_deleteSnapshot();
}
public void send_deleteSnapshot(String tableName, String snapshotName) throws libthrift091.TException
{
deleteSnapshot_args args = new deleteSnapshot_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
sendBase("deleteSnapshot", args);
}
public void recv_deleteSnapshot() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
deleteSnapshot_result result = new deleteSnapshot_result();
receiveBase(result, "deleteSnapshot");
if (result.se != null) {
throw result.se;
}
return;
}
public void restoreSnapshot(String tableName, String snapshotName, String destTableName, boolean isSystem) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_restoreSnapshot(tableName, snapshotName, destTableName, isSystem);
recv_restoreSnapshot();
}
public void send_restoreSnapshot(String tableName, String snapshotName, String destTableName, boolean isSystem) throws libthrift091.TException
{
restoreSnapshot_args args = new restoreSnapshot_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
args.setDestTableName(destTableName);
args.setIsSystem(isSystem);
sendBase("restoreSnapshot", args);
}
public void recv_restoreSnapshot() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
restoreSnapshot_result result = new restoreSnapshot_result();
receiveBase(result, "restoreSnapshot");
if (result.se != null) {
throw result.se;
}
return;
}
public List<SnapshotTableView> listAllSnapshots() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_listAllSnapshots();
return recv_listAllSnapshots();
}
public void send_listAllSnapshots() throws libthrift091.TException
{
listAllSnapshots_args args = new listAllSnapshots_args();
sendBase("listAllSnapshots", args);
}
public List<SnapshotTableView> recv_listAllSnapshots() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
listAllSnapshots_result result = new listAllSnapshots_result();
receiveBase(result, "listAllSnapshots");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listAllSnapshots failed: unknown result");
}
public void cancelSnapshotTable(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_cancelSnapshotTable(tableName, snapshotName);
recv_cancelSnapshotTable();
}
public void send_cancelSnapshotTable(String tableName, String snapshotName) throws libthrift091.TException
{
cancelSnapshotTable_args args = new cancelSnapshotTable_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
sendBase("cancelSnapshotTable", args);
}
public void recv_cancelSnapshotTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
cancelSnapshotTable_result result = new cancelSnapshotTable_result();
receiveBase(result, "cancelSnapshotTable");
if (result.se != null) {
throw result.se;
}
return;
}
public com.xiaomi.infra.galaxy.sds.thrift.SnapshotState getSnapshotState(String tableName, String snapshotName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getSnapshotState(tableName, snapshotName);
return recv_getSnapshotState();
}
public void send_getSnapshotState(String tableName, String snapshotName) throws libthrift091.TException
{
getSnapshotState_args args = new getSnapshotState_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
sendBase("getSnapshotState", args);
}
public com.xiaomi.infra.galaxy.sds.thrift.SnapshotState recv_getSnapshotState() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getSnapshotState_result result = new getSnapshotState_result();
receiveBase(result, "getSnapshotState");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getSnapshotState failed: unknown result");
}
public QuotaInfo getQuotaInfo(String spaceId) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getQuotaInfo(spaceId);
return recv_getQuotaInfo();
}
public void send_getQuotaInfo(String spaceId) throws libthrift091.TException
{
getQuotaInfo_args args = new getQuotaInfo_args();
args.setSpaceId(spaceId);
sendBase("getQuotaInfo", args);
}
public QuotaInfo recv_getQuotaInfo() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getQuotaInfo_result result = new getQuotaInfo_result();
receiveBase(result, "getQuotaInfo");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getQuotaInfo failed: unknown result");
}
public StreamCheckpoint getLatestStreamCheckpoint(String tableName, String topicName) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getLatestStreamCheckpoint(tableName, topicName);
return recv_getLatestStreamCheckpoint();
}
public void send_getLatestStreamCheckpoint(String tableName, String topicName) throws libthrift091.TException
{
getLatestStreamCheckpoint_args args = new getLatestStreamCheckpoint_args();
args.setTableName(tableName);
args.setTopicName(topicName);
sendBase("getLatestStreamCheckpoint", args);
}
public StreamCheckpoint recv_getLatestStreamCheckpoint() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getLatestStreamCheckpoint_result result = new getLatestStreamCheckpoint_result();
receiveBase(result, "getLatestStreamCheckpoint");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getLatestStreamCheckpoint failed: unknown result");
}
public StreamCheckpoint getFloorStreamCheckpoint(String tableName, String topicName, long timestamp) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getFloorStreamCheckpoint(tableName, topicName, timestamp);
return recv_getFloorStreamCheckpoint();
}
public void send_getFloorStreamCheckpoint(String tableName, String topicName, long timestamp) throws libthrift091.TException
{
getFloorStreamCheckpoint_args args = new getFloorStreamCheckpoint_args();
args.setTableName(tableName);
args.setTopicName(topicName);
args.setTimestamp(timestamp);
sendBase("getFloorStreamCheckpoint", args);
}
public StreamCheckpoint recv_getFloorStreamCheckpoint() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getFloorStreamCheckpoint_result result = new getFloorStreamCheckpoint_result();
receiveBase(result, "getFloorStreamCheckpoint");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getFloorStreamCheckpoint failed: unknown result");
}
public StreamCheckpoint getCeilStreamCheckpoint(String tableName, String topicName, long timestamp) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_getCeilStreamCheckpoint(tableName, topicName, timestamp);
return recv_getCeilStreamCheckpoint();
}
public void send_getCeilStreamCheckpoint(String tableName, String topicName, long timestamp) throws libthrift091.TException
{
getCeilStreamCheckpoint_args args = new getCeilStreamCheckpoint_args();
args.setTableName(tableName);
args.setTopicName(topicName);
args.setTimestamp(timestamp);
sendBase("getCeilStreamCheckpoint", args);
}
public StreamCheckpoint recv_getCeilStreamCheckpoint() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
getCeilStreamCheckpoint_result result = new getCeilStreamCheckpoint_result();
receiveBase(result, "getCeilStreamCheckpoint");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getCeilStreamCheckpoint failed: unknown result");
}
public void recoverTable(String srcTableName, String destTableName, String topicName, long timestamp) throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
send_recoverTable(srcTableName, destTableName, topicName, timestamp);
recv_recoverTable();
}
public void send_recoverTable(String srcTableName, String destTableName, String topicName, long timestamp) throws libthrift091.TException
{
recoverTable_args args = new recoverTable_args();
args.setSrcTableName(srcTableName);
args.setDestTableName(destTableName);
args.setTopicName(topicName);
args.setTimestamp(timestamp);
sendBase("recoverTable", args);
}
public void recv_recoverTable() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, libthrift091.TException
{
recoverTable_result result = new recoverTable_result();
receiveBase(result, "recoverTable");
if (result.se != null) {
throw result.se;
}
return;
}
}
public static class AsyncClient extends com.xiaomi.infra.galaxy.sds.thrift.BaseService.AsyncClient implements AsyncIface {
public static class Factory implements libthrift091.async.TAsyncClientFactory<AsyncClient> {
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 saveAppInfo(AppInfo appInfo, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
saveAppInfo_call method_call = new saveAppInfo_call(appInfo, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class saveAppInfo_call extends libthrift091.async.TAsyncMethodCall {
private AppInfo appInfo;
public saveAppInfo_call(AppInfo appInfo, 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.appInfo = appInfo;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("saveAppInfo", libthrift091.protocol.TMessageType.CALL, 0));
saveAppInfo_args args = new saveAppInfo_args();
args.setAppInfo(appInfo);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_saveAppInfo();
}
}
public void getAppInfo(String appId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getAppInfo_call method_call = new getAppInfo_call(appId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAppInfo_call extends libthrift091.async.TAsyncMethodCall {
private String appId;
public getAppInfo_call(String appId, 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.appId = appId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getAppInfo", libthrift091.protocol.TMessageType.CALL, 0));
getAppInfo_args args = new getAppInfo_args();
args.setAppId(appId);
args.write(prot);
prot.writeMessageEnd();
}
public AppInfo getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getAppInfo();
}
}
public void findAllApps(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
findAllApps_call method_call = new findAllApps_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class findAllApps_call extends libthrift091.async.TAsyncMethodCall {
public findAllApps_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("findAllApps", libthrift091.protocol.TMessageType.CALL, 0));
findAllApps_args args = new findAllApps_args();
args.write(prot);
prot.writeMessageEnd();
}
public List<AppInfo> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_findAllApps();
}
}
public void findAllTables(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
findAllTables_call method_call = new findAllTables_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class findAllTables_call extends libthrift091.async.TAsyncMethodCall {
public findAllTables_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("findAllTables", libthrift091.protocol.TMessageType.CALL, 0));
findAllTables_args args = new findAllTables_args();
args.write(prot);
prot.writeMessageEnd();
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_findAllTables();
}
}
public void createTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
createTable_call method_call = new createTable_call(tableName, tableSpec, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec;
public createTable_call(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec, 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.tableName = tableName;
this.tableSpec = tableSpec;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("createTable", libthrift091.protocol.TMessageType.CALL, 0));
createTable_args args = new createTable_args();
args.setTableName(tableName);
args.setTableSpec(tableSpec);
args.write(prot);
prot.writeMessageEnd();
}
public com.xiaomi.infra.galaxy.sds.thrift.TableInfo getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_createTable();
}
}
public void dropTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
dropTable_call method_call = new dropTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public dropTable_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("dropTable", libthrift091.protocol.TMessageType.CALL, 0));
dropTable_args args = new dropTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_dropTable();
}
}
public void alterTable(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
alterTable_call method_call = new alterTable_call(tableName, tableSpec, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class alterTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec;
public alterTable_call(String tableName, com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec, 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.tableName = tableName;
this.tableSpec = tableSpec;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("alterTable", libthrift091.protocol.TMessageType.CALL, 0));
alterTable_args args = new alterTable_args();
args.setTableName(tableName);
args.setTableSpec(tableSpec);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_alterTable();
}
}
public void cloneTable(String srcTableName, String destTableName, boolean flushTable, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
cloneTable_call method_call = new cloneTable_call(srcTableName, destTableName, flushTable, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class cloneTable_call extends libthrift091.async.TAsyncMethodCall {
private String srcTableName;
private String destTableName;
private boolean flushTable;
public cloneTable_call(String srcTableName, String destTableName, boolean flushTable, 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.srcTableName = srcTableName;
this.destTableName = destTableName;
this.flushTable = flushTable;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("cloneTable", libthrift091.protocol.TMessageType.CALL, 0));
cloneTable_args args = new cloneTable_args();
args.setSrcTableName(srcTableName);
args.setDestTableName(destTableName);
args.setFlushTable(flushTable);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_cloneTable();
}
}
public void disableTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
disableTable_call method_call = new disableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class disableTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public disableTable_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("disableTable", libthrift091.protocol.TMessageType.CALL, 0));
disableTable_args args = new disableTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_disableTable();
}
}
public void enableTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
enableTable_call method_call = new enableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class enableTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public enableTable_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("enableTable", libthrift091.protocol.TMessageType.CALL, 0));
enableTable_args args = new enableTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_enableTable();
}
}
public void describeTable(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
describeTable_call method_call = new describeTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class describeTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public describeTable_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("describeTable", libthrift091.protocol.TMessageType.CALL, 0));
describeTable_args args = new describeTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_describeTable();
}
}
public void getTableStatus(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getTableStatus_call method_call = new getTableStatus_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableStatus_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public getTableStatus_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getTableStatus", libthrift091.protocol.TMessageType.CALL, 0));
getTableStatus_args args = new getTableStatus_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public com.xiaomi.infra.galaxy.sds.thrift.TableStatus getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getTableStatus();
}
}
public void getTableState(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getTableState_call method_call = new getTableState_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableState_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public getTableState_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getTableState", libthrift091.protocol.TMessageType.CALL, 0));
getTableState_args args = new getTableState_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public com.xiaomi.infra.galaxy.sds.thrift.TableState getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getTableState();
}
}
public void getTableSplits(String tableName, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getTableSplits_call method_call = new getTableSplits_call(tableName, startKey, stopKey, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableSplits_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey;
private Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey;
public getTableSplits_call(String tableName, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey, Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey, 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.tableName = tableName;
this.startKey = startKey;
this.stopKey = stopKey;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getTableSplits", libthrift091.protocol.TMessageType.CALL, 0));
getTableSplits_args args = new getTableSplits_args();
args.setTableName(tableName);
args.setStartKey(startKey);
args.setStopKey(stopKey);
args.write(prot);
prot.writeMessageEnd();
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getTableSplits();
}
}
public void queryMetric(MetricQueryRequest query, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
queryMetric_call method_call = new queryMetric_call(query, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class queryMetric_call extends libthrift091.async.TAsyncMethodCall {
private MetricQueryRequest query;
public queryMetric_call(MetricQueryRequest query, 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.query = query;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("queryMetric", libthrift091.protocol.TMessageType.CALL, 0));
queryMetric_args args = new queryMetric_args();
args.setQuery(query);
args.write(prot);
prot.writeMessageEnd();
}
public TimeSeriesData getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_queryMetric();
}
}
public void queryMetrics(List<MetricQueryRequest> queries, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
queryMetrics_call method_call = new queryMetrics_call(queries, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class queryMetrics_call extends libthrift091.async.TAsyncMethodCall {
private List<MetricQueryRequest> queries;
public queryMetrics_call(List<MetricQueryRequest> queries, 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.queries = queries;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("queryMetrics", libthrift091.protocol.TMessageType.CALL, 0));
queryMetrics_args args = new queryMetrics_args();
args.setQueries(queries);
args.write(prot);
prot.writeMessageEnd();
}
public List<TimeSeriesData> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_queryMetrics();
}
}
public void findAllAppInfo(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
findAllAppInfo_call method_call = new findAllAppInfo_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class findAllAppInfo_call extends libthrift091.async.TAsyncMethodCall {
public findAllAppInfo_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("findAllAppInfo", libthrift091.protocol.TMessageType.CALL, 0));
findAllAppInfo_args args = new findAllAppInfo_args();
args.write(prot);
prot.writeMessageEnd();
}
public List<AppInfo> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_findAllAppInfo();
}
}
public void getTableSize(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getTableSize_call method_call = new getTableSize_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableSize_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public getTableSize_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getTableSize", libthrift091.protocol.TMessageType.CALL, 0));
getTableSize_args args = new getTableSize_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public long getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getTableSize();
}
}
public void putClientMetrics(ClientMetrics clientMetrics, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
putClientMetrics_call method_call = new putClientMetrics_call(clientMetrics, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class putClientMetrics_call extends libthrift091.async.TAsyncMethodCall {
private ClientMetrics clientMetrics;
public putClientMetrics_call(ClientMetrics clientMetrics, 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.clientMetrics = clientMetrics;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("putClientMetrics", libthrift091.protocol.TMessageType.CALL, 0));
putClientMetrics_args args = new putClientMetrics_args();
args.setClientMetrics(clientMetrics);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_putClientMetrics();
}
}
public void subscribePhoneAlert(String phoneNumber, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
subscribePhoneAlert_call method_call = new subscribePhoneAlert_call(phoneNumber, spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class subscribePhoneAlert_call extends libthrift091.async.TAsyncMethodCall {
private String phoneNumber;
private String spaceId;
public subscribePhoneAlert_call(String phoneNumber, String spaceId, 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.phoneNumber = phoneNumber;
this.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("subscribePhoneAlert", libthrift091.protocol.TMessageType.CALL, 0));
subscribePhoneAlert_args args = new subscribePhoneAlert_args();
args.setPhoneNumber(phoneNumber);
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_subscribePhoneAlert();
}
}
public void unsubscribePhoneAlert(String phoneNumber, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
unsubscribePhoneAlert_call method_call = new unsubscribePhoneAlert_call(phoneNumber, spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class unsubscribePhoneAlert_call extends libthrift091.async.TAsyncMethodCall {
private String phoneNumber;
private String spaceId;
public unsubscribePhoneAlert_call(String phoneNumber, String spaceId, 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.phoneNumber = phoneNumber;
this.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("unsubscribePhoneAlert", libthrift091.protocol.TMessageType.CALL, 0));
unsubscribePhoneAlert_args args = new unsubscribePhoneAlert_args();
args.setPhoneNumber(phoneNumber);
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_unsubscribePhoneAlert();
}
}
public void subscribeEmailAlert(String email, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
subscribeEmailAlert_call method_call = new subscribeEmailAlert_call(email, spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class subscribeEmailAlert_call extends libthrift091.async.TAsyncMethodCall {
private String email;
private String spaceId;
public subscribeEmailAlert_call(String email, String spaceId, 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.email = email;
this.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("subscribeEmailAlert", libthrift091.protocol.TMessageType.CALL, 0));
subscribeEmailAlert_args args = new subscribeEmailAlert_args();
args.setEmail(email);
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_subscribeEmailAlert();
}
}
public void unsubscribeEmailAlert(String email, String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
unsubscribeEmailAlert_call method_call = new unsubscribeEmailAlert_call(email, spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class unsubscribeEmailAlert_call extends libthrift091.async.TAsyncMethodCall {
private String email;
private String spaceId;
public unsubscribeEmailAlert_call(String email, String spaceId, 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.email = email;
this.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("unsubscribeEmailAlert", libthrift091.protocol.TMessageType.CALL, 0));
unsubscribeEmailAlert_args args = new unsubscribeEmailAlert_args();
args.setEmail(email);
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_unsubscribeEmailAlert();
}
}
public void listSubscribedPhone(String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listSubscribedPhone_call method_call = new listSubscribedPhone_call(spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listSubscribedPhone_call extends libthrift091.async.TAsyncMethodCall {
private String spaceId;
public listSubscribedPhone_call(String spaceId, 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.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("listSubscribedPhone", libthrift091.protocol.TMessageType.CALL, 0));
listSubscribedPhone_args args = new listSubscribedPhone_args();
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public List<String> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_listSubscribedPhone();
}
}
public void listSubscribedEmail(String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listSubscribedEmail_call method_call = new listSubscribedEmail_call(spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listSubscribedEmail_call extends libthrift091.async.TAsyncMethodCall {
private String spaceId;
public listSubscribedEmail_call(String spaceId, 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.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("listSubscribedEmail", libthrift091.protocol.TMessageType.CALL, 0));
listSubscribedEmail_args args = new listSubscribedEmail_args();
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public List<String> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_listSubscribedEmail();
}
}
public void getTableHistorySize(String tableName, long startDate, long stopDate, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getTableHistorySize_call method_call = new getTableHistorySize_call(tableName, startDate, stopDate, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableHistorySize_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private long startDate;
private long stopDate;
public getTableHistorySize_call(String tableName, long startDate, long stopDate, 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.tableName = tableName;
this.startDate = startDate;
this.stopDate = stopDate;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getTableHistorySize", libthrift091.protocol.TMessageType.CALL, 0));
getTableHistorySize_args args = new getTableHistorySize_args();
args.setTableName(tableName);
args.setStartDate(startDate);
args.setStopDate(stopDate);
args.write(prot);
prot.writeMessageEnd();
}
public Map<Long,Long> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getTableHistorySize();
}
}
public void renameTable(String srcName, String destName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
renameTable_call method_call = new renameTable_call(srcName, destName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class renameTable_call extends libthrift091.async.TAsyncMethodCall {
private String srcName;
private String destName;
public renameTable_call(String srcName, String destName, 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.srcName = srcName;
this.destName = destName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("renameTable", libthrift091.protocol.TMessageType.CALL, 0));
renameTable_args args = new renameTable_args();
args.setSrcName(srcName);
args.setDestName(destName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_renameTable();
}
}
public void listSnapshots(String tableName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listSnapshots_call method_call = new listSnapshots_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listSnapshots_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
public listSnapshots_call(String tableName, 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.tableName = tableName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("listSnapshots", libthrift091.protocol.TMessageType.CALL, 0));
listSnapshots_args args = new listSnapshots_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public TableSnapshots getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_listSnapshots();
}
}
public void snapshotTable(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
snapshotTable_call method_call = new snapshotTable_call(tableName, snapshotName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class snapshotTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String snapshotName;
public snapshotTable_call(String tableName, String snapshotName, 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.tableName = tableName;
this.snapshotName = snapshotName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("snapshotTable", libthrift091.protocol.TMessageType.CALL, 0));
snapshotTable_args args = new snapshotTable_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_snapshotTable();
}
}
public void deleteSnapshot(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deleteSnapshot_call method_call = new deleteSnapshot_call(tableName, snapshotName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteSnapshot_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String snapshotName;
public deleteSnapshot_call(String tableName, String snapshotName, 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.tableName = tableName;
this.snapshotName = snapshotName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteSnapshot", libthrift091.protocol.TMessageType.CALL, 0));
deleteSnapshot_args args = new deleteSnapshot_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_deleteSnapshot();
}
}
public void restoreSnapshot(String tableName, String snapshotName, String destTableName, boolean isSystem, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
restoreSnapshot_call method_call = new restoreSnapshot_call(tableName, snapshotName, destTableName, isSystem, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class restoreSnapshot_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String snapshotName;
private String destTableName;
private boolean isSystem;
public restoreSnapshot_call(String tableName, String snapshotName, String destTableName, boolean isSystem, 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.tableName = tableName;
this.snapshotName = snapshotName;
this.destTableName = destTableName;
this.isSystem = isSystem;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("restoreSnapshot", libthrift091.protocol.TMessageType.CALL, 0));
restoreSnapshot_args args = new restoreSnapshot_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
args.setDestTableName(destTableName);
args.setIsSystem(isSystem);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_restoreSnapshot();
}
}
public void listAllSnapshots(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listAllSnapshots_call method_call = new listAllSnapshots_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listAllSnapshots_call extends libthrift091.async.TAsyncMethodCall {
public listAllSnapshots_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("listAllSnapshots", libthrift091.protocol.TMessageType.CALL, 0));
listAllSnapshots_args args = new listAllSnapshots_args();
args.write(prot);
prot.writeMessageEnd();
}
public List<SnapshotTableView> getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_listAllSnapshots();
}
}
public void cancelSnapshotTable(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
cancelSnapshotTable_call method_call = new cancelSnapshotTable_call(tableName, snapshotName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class cancelSnapshotTable_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String snapshotName;
public cancelSnapshotTable_call(String tableName, String snapshotName, 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.tableName = tableName;
this.snapshotName = snapshotName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("cancelSnapshotTable", libthrift091.protocol.TMessageType.CALL, 0));
cancelSnapshotTable_args args = new cancelSnapshotTable_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_cancelSnapshotTable();
}
}
public void getSnapshotState(String tableName, String snapshotName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getSnapshotState_call method_call = new getSnapshotState_call(tableName, snapshotName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getSnapshotState_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String snapshotName;
public getSnapshotState_call(String tableName, String snapshotName, 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.tableName = tableName;
this.snapshotName = snapshotName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getSnapshotState", libthrift091.protocol.TMessageType.CALL, 0));
getSnapshotState_args args = new getSnapshotState_args();
args.setTableName(tableName);
args.setSnapshotName(snapshotName);
args.write(prot);
prot.writeMessageEnd();
}
public com.xiaomi.infra.galaxy.sds.thrift.SnapshotState getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getSnapshotState();
}
}
public void getQuotaInfo(String spaceId, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getQuotaInfo_call method_call = new getQuotaInfo_call(spaceId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getQuotaInfo_call extends libthrift091.async.TAsyncMethodCall {
private String spaceId;
public getQuotaInfo_call(String spaceId, 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.spaceId = spaceId;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getQuotaInfo", libthrift091.protocol.TMessageType.CALL, 0));
getQuotaInfo_args args = new getQuotaInfo_args();
args.setSpaceId(spaceId);
args.write(prot);
prot.writeMessageEnd();
}
public QuotaInfo getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getQuotaInfo();
}
}
public void getLatestStreamCheckpoint(String tableName, String topicName, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getLatestStreamCheckpoint_call method_call = new getLatestStreamCheckpoint_call(tableName, topicName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getLatestStreamCheckpoint_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String topicName;
public getLatestStreamCheckpoint_call(String tableName, String topicName, 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.tableName = tableName;
this.topicName = topicName;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getLatestStreamCheckpoint", libthrift091.protocol.TMessageType.CALL, 0));
getLatestStreamCheckpoint_args args = new getLatestStreamCheckpoint_args();
args.setTableName(tableName);
args.setTopicName(topicName);
args.write(prot);
prot.writeMessageEnd();
}
public StreamCheckpoint getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getLatestStreamCheckpoint();
}
}
public void getFloorStreamCheckpoint(String tableName, String topicName, long timestamp, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getFloorStreamCheckpoint_call method_call = new getFloorStreamCheckpoint_call(tableName, topicName, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getFloorStreamCheckpoint_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String topicName;
private long timestamp;
public getFloorStreamCheckpoint_call(String tableName, String topicName, long timestamp, 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.tableName = tableName;
this.topicName = topicName;
this.timestamp = timestamp;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getFloorStreamCheckpoint", libthrift091.protocol.TMessageType.CALL, 0));
getFloorStreamCheckpoint_args args = new getFloorStreamCheckpoint_args();
args.setTableName(tableName);
args.setTopicName(topicName);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public StreamCheckpoint getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getFloorStreamCheckpoint();
}
}
public void getCeilStreamCheckpoint(String tableName, String topicName, long timestamp, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getCeilStreamCheckpoint_call method_call = new getCeilStreamCheckpoint_call(tableName, topicName, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getCeilStreamCheckpoint_call extends libthrift091.async.TAsyncMethodCall {
private String tableName;
private String topicName;
private long timestamp;
public getCeilStreamCheckpoint_call(String tableName, String topicName, long timestamp, 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.tableName = tableName;
this.topicName = topicName;
this.timestamp = timestamp;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getCeilStreamCheckpoint", libthrift091.protocol.TMessageType.CALL, 0));
getCeilStreamCheckpoint_args args = new getCeilStreamCheckpoint_args();
args.setTableName(tableName);
args.setTopicName(topicName);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public StreamCheckpoint getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_getCeilStreamCheckpoint();
}
}
public void recoverTable(String srcTableName, String destTableName, String topicName, long timestamp, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
recoverTable_call method_call = new recoverTable_call(srcTableName, destTableName, topicName, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class recoverTable_call extends libthrift091.async.TAsyncMethodCall {
private String srcTableName;
private String destTableName;
private String topicName;
private long timestamp;
public recoverTable_call(String srcTableName, String destTableName, String topicName, long timestamp, 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.srcTableName = srcTableName;
this.destTableName = destTableName;
this.topicName = topicName;
this.timestamp = timestamp;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("recoverTable", libthrift091.protocol.TMessageType.CALL, 0));
recoverTable_args args = new recoverTable_args();
args.setSrcTableName(srcTableName);
args.setDestTableName(destTableName);
args.setTopicName(topicName);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.sds.thrift.ServiceException, 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_recoverTable();
}
}
}
public static class Processor<I extends Iface> extends com.xiaomi.infra.galaxy.sds.thrift.BaseService.Processor<I> implements libthrift091.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>>()));
}
protected Processor(I iface, Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> getProcessMap(Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> processMap) {
processMap.put("saveAppInfo", new saveAppInfo());
processMap.put("getAppInfo", new getAppInfo());
processMap.put("findAllApps", new findAllApps());
processMap.put("findAllTables", new findAllTables());
processMap.put("createTable", new createTable());
processMap.put("dropTable", new dropTable());
processMap.put("alterTable", new alterTable());
processMap.put("cloneTable", new cloneTable());
processMap.put("disableTable", new disableTable());
processMap.put("enableTable", new enableTable());
processMap.put("describeTable", new describeTable());
processMap.put("getTableStatus", new getTableStatus());
processMap.put("getTableState", new getTableState());
processMap.put("getTableSplits", new getTableSplits());
processMap.put("queryMetric", new queryMetric());
processMap.put("queryMetrics", new queryMetrics());
processMap.put("findAllAppInfo", new findAllAppInfo());
processMap.put("getTableSize", new getTableSize());
processMap.put("putClientMetrics", new putClientMetrics());
processMap.put("subscribePhoneAlert", new subscribePhoneAlert());
processMap.put("unsubscribePhoneAlert", new unsubscribePhoneAlert());
processMap.put("subscribeEmailAlert", new subscribeEmailAlert());
processMap.put("unsubscribeEmailAlert", new unsubscribeEmailAlert());
processMap.put("listSubscribedPhone", new listSubscribedPhone());
processMap.put("listSubscribedEmail", new listSubscribedEmail());
processMap.put("getTableHistorySize", new getTableHistorySize());
processMap.put("renameTable", new renameTable());
processMap.put("listSnapshots", new listSnapshots());
processMap.put("snapshotTable", new snapshotTable());
processMap.put("deleteSnapshot", new deleteSnapshot());
processMap.put("restoreSnapshot", new restoreSnapshot());
processMap.put("listAllSnapshots", new listAllSnapshots());
processMap.put("cancelSnapshotTable", new cancelSnapshotTable());
processMap.put("getSnapshotState", new getSnapshotState());
processMap.put("getQuotaInfo", new getQuotaInfo());
processMap.put("getLatestStreamCheckpoint", new getLatestStreamCheckpoint());
processMap.put("getFloorStreamCheckpoint", new getFloorStreamCheckpoint());
processMap.put("getCeilStreamCheckpoint", new getCeilStreamCheckpoint());
processMap.put("recoverTable", new recoverTable());
return processMap;
}
public static class saveAppInfo<I extends Iface> extends libthrift091.ProcessFunction<I, saveAppInfo_args> {
public saveAppInfo() {
super("saveAppInfo");
}
public saveAppInfo_args getEmptyArgsInstance() {
return new saveAppInfo_args();
}
protected boolean isOneway() {
return false;
}
public saveAppInfo_result getResult(I iface, saveAppInfo_args args) throws libthrift091.TException {
saveAppInfo_result result = new saveAppInfo_result();
try {
iface.saveAppInfo(args.appInfo);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getAppInfo<I extends Iface> extends libthrift091.ProcessFunction<I, getAppInfo_args> {
public getAppInfo() {
super("getAppInfo");
}
public getAppInfo_args getEmptyArgsInstance() {
return new getAppInfo_args();
}
protected boolean isOneway() {
return false;
}
public getAppInfo_result getResult(I iface, getAppInfo_args args) throws libthrift091.TException {
getAppInfo_result result = new getAppInfo_result();
try {
result.success = iface.getAppInfo(args.appId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class findAllApps<I extends Iface> extends libthrift091.ProcessFunction<I, findAllApps_args> {
public findAllApps() {
super("findAllApps");
}
public findAllApps_args getEmptyArgsInstance() {
return new findAllApps_args();
}
protected boolean isOneway() {
return false;
}
public findAllApps_result getResult(I iface, findAllApps_args args) throws libthrift091.TException {
findAllApps_result result = new findAllApps_result();
try {
result.success = iface.findAllApps();
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class findAllTables<I extends Iface> extends libthrift091.ProcessFunction<I, findAllTables_args> {
public findAllTables() {
super("findAllTables");
}
public findAllTables_args getEmptyArgsInstance() {
return new findAllTables_args();
}
protected boolean isOneway() {
return false;
}
public findAllTables_result getResult(I iface, findAllTables_args args) throws libthrift091.TException {
findAllTables_result result = new findAllTables_result();
try {
result.success = iface.findAllTables();
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class createTable<I extends Iface> extends libthrift091.ProcessFunction<I, createTable_args> {
public createTable() {
super("createTable");
}
public createTable_args getEmptyArgsInstance() {
return new createTable_args();
}
protected boolean isOneway() {
return false;
}
public createTable_result getResult(I iface, createTable_args args) throws libthrift091.TException {
createTable_result result = new createTable_result();
try {
result.success = iface.createTable(args.tableName, args.tableSpec);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class dropTable<I extends Iface> extends libthrift091.ProcessFunction<I, dropTable_args> {
public dropTable() {
super("dropTable");
}
public dropTable_args getEmptyArgsInstance() {
return new dropTable_args();
}
protected boolean isOneway() {
return false;
}
public dropTable_result getResult(I iface, dropTable_args args) throws libthrift091.TException {
dropTable_result result = new dropTable_result();
try {
iface.dropTable(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class alterTable<I extends Iface> extends libthrift091.ProcessFunction<I, alterTable_args> {
public alterTable() {
super("alterTable");
}
public alterTable_args getEmptyArgsInstance() {
return new alterTable_args();
}
protected boolean isOneway() {
return false;
}
public alterTable_result getResult(I iface, alterTable_args args) throws libthrift091.TException {
alterTable_result result = new alterTable_result();
try {
iface.alterTable(args.tableName, args.tableSpec);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class cloneTable<I extends Iface> extends libthrift091.ProcessFunction<I, cloneTable_args> {
public cloneTable() {
super("cloneTable");
}
public cloneTable_args getEmptyArgsInstance() {
return new cloneTable_args();
}
protected boolean isOneway() {
return false;
}
public cloneTable_result getResult(I iface, cloneTable_args args) throws libthrift091.TException {
cloneTable_result result = new cloneTable_result();
try {
iface.cloneTable(args.srcTableName, args.destTableName, args.flushTable);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class disableTable<I extends Iface> extends libthrift091.ProcessFunction<I, disableTable_args> {
public disableTable() {
super("disableTable");
}
public disableTable_args getEmptyArgsInstance() {
return new disableTable_args();
}
protected boolean isOneway() {
return false;
}
public disableTable_result getResult(I iface, disableTable_args args) throws libthrift091.TException {
disableTable_result result = new disableTable_result();
try {
iface.disableTable(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class enableTable<I extends Iface> extends libthrift091.ProcessFunction<I, enableTable_args> {
public enableTable() {
super("enableTable");
}
public enableTable_args getEmptyArgsInstance() {
return new enableTable_args();
}
protected boolean isOneway() {
return false;
}
public enableTable_result getResult(I iface, enableTable_args args) throws libthrift091.TException {
enableTable_result result = new enableTable_result();
try {
iface.enableTable(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class describeTable<I extends Iface> extends libthrift091.ProcessFunction<I, describeTable_args> {
public describeTable() {
super("describeTable");
}
public describeTable_args getEmptyArgsInstance() {
return new describeTable_args();
}
protected boolean isOneway() {
return false;
}
public describeTable_result getResult(I iface, describeTable_args args) throws libthrift091.TException {
describeTable_result result = new describeTable_result();
try {
result.success = iface.describeTable(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getTableStatus<I extends Iface> extends libthrift091.ProcessFunction<I, getTableStatus_args> {
public getTableStatus() {
super("getTableStatus");
}
public getTableStatus_args getEmptyArgsInstance() {
return new getTableStatus_args();
}
protected boolean isOneway() {
return false;
}
public getTableStatus_result getResult(I iface, getTableStatus_args args) throws libthrift091.TException {
getTableStatus_result result = new getTableStatus_result();
try {
result.success = iface.getTableStatus(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getTableState<I extends Iface> extends libthrift091.ProcessFunction<I, getTableState_args> {
public getTableState() {
super("getTableState");
}
public getTableState_args getEmptyArgsInstance() {
return new getTableState_args();
}
protected boolean isOneway() {
return false;
}
public getTableState_result getResult(I iface, getTableState_args args) throws libthrift091.TException {
getTableState_result result = new getTableState_result();
try {
result.success = iface.getTableState(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getTableSplits<I extends Iface> extends libthrift091.ProcessFunction<I, getTableSplits_args> {
public getTableSplits() {
super("getTableSplits");
}
public getTableSplits_args getEmptyArgsInstance() {
return new getTableSplits_args();
}
protected boolean isOneway() {
return false;
}
public getTableSplits_result getResult(I iface, getTableSplits_args args) throws libthrift091.TException {
getTableSplits_result result = new getTableSplits_result();
try {
result.success = iface.getTableSplits(args.tableName, args.startKey, args.stopKey);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class queryMetric<I extends Iface> extends libthrift091.ProcessFunction<I, queryMetric_args> {
public queryMetric() {
super("queryMetric");
}
public queryMetric_args getEmptyArgsInstance() {
return new queryMetric_args();
}
protected boolean isOneway() {
return false;
}
public queryMetric_result getResult(I iface, queryMetric_args args) throws libthrift091.TException {
queryMetric_result result = new queryMetric_result();
try {
result.success = iface.queryMetric(args.query);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class queryMetrics<I extends Iface> extends libthrift091.ProcessFunction<I, queryMetrics_args> {
public queryMetrics() {
super("queryMetrics");
}
public queryMetrics_args getEmptyArgsInstance() {
return new queryMetrics_args();
}
protected boolean isOneway() {
return false;
}
public queryMetrics_result getResult(I iface, queryMetrics_args args) throws libthrift091.TException {
queryMetrics_result result = new queryMetrics_result();
try {
result.success = iface.queryMetrics(args.queries);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class findAllAppInfo<I extends Iface> extends libthrift091.ProcessFunction<I, findAllAppInfo_args> {
public findAllAppInfo() {
super("findAllAppInfo");
}
public findAllAppInfo_args getEmptyArgsInstance() {
return new findAllAppInfo_args();
}
protected boolean isOneway() {
return false;
}
public findAllAppInfo_result getResult(I iface, findAllAppInfo_args args) throws libthrift091.TException {
findAllAppInfo_result result = new findAllAppInfo_result();
try {
result.success = iface.findAllAppInfo();
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getTableSize<I extends Iface> extends libthrift091.ProcessFunction<I, getTableSize_args> {
public getTableSize() {
super("getTableSize");
}
public getTableSize_args getEmptyArgsInstance() {
return new getTableSize_args();
}
protected boolean isOneway() {
return false;
}
public getTableSize_result getResult(I iface, getTableSize_args args) throws libthrift091.TException {
getTableSize_result result = new getTableSize_result();
try {
result.success = iface.getTableSize(args.tableName);
result.setSuccessIsSet(true);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class putClientMetrics<I extends Iface> extends libthrift091.ProcessFunction<I, putClientMetrics_args> {
public putClientMetrics() {
super("putClientMetrics");
}
public putClientMetrics_args getEmptyArgsInstance() {
return new putClientMetrics_args();
}
protected boolean isOneway() {
return false;
}
public putClientMetrics_result getResult(I iface, putClientMetrics_args args) throws libthrift091.TException {
putClientMetrics_result result = new putClientMetrics_result();
try {
iface.putClientMetrics(args.clientMetrics);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class subscribePhoneAlert<I extends Iface> extends libthrift091.ProcessFunction<I, subscribePhoneAlert_args> {
public subscribePhoneAlert() {
super("subscribePhoneAlert");
}
public subscribePhoneAlert_args getEmptyArgsInstance() {
return new subscribePhoneAlert_args();
}
protected boolean isOneway() {
return false;
}
public subscribePhoneAlert_result getResult(I iface, subscribePhoneAlert_args args) throws libthrift091.TException {
subscribePhoneAlert_result result = new subscribePhoneAlert_result();
try {
iface.subscribePhoneAlert(args.phoneNumber, args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class unsubscribePhoneAlert<I extends Iface> extends libthrift091.ProcessFunction<I, unsubscribePhoneAlert_args> {
public unsubscribePhoneAlert() {
super("unsubscribePhoneAlert");
}
public unsubscribePhoneAlert_args getEmptyArgsInstance() {
return new unsubscribePhoneAlert_args();
}
protected boolean isOneway() {
return false;
}
public unsubscribePhoneAlert_result getResult(I iface, unsubscribePhoneAlert_args args) throws libthrift091.TException {
unsubscribePhoneAlert_result result = new unsubscribePhoneAlert_result();
try {
iface.unsubscribePhoneAlert(args.phoneNumber, args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class subscribeEmailAlert<I extends Iface> extends libthrift091.ProcessFunction<I, subscribeEmailAlert_args> {
public subscribeEmailAlert() {
super("subscribeEmailAlert");
}
public subscribeEmailAlert_args getEmptyArgsInstance() {
return new subscribeEmailAlert_args();
}
protected boolean isOneway() {
return false;
}
public subscribeEmailAlert_result getResult(I iface, subscribeEmailAlert_args args) throws libthrift091.TException {
subscribeEmailAlert_result result = new subscribeEmailAlert_result();
try {
iface.subscribeEmailAlert(args.email, args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class unsubscribeEmailAlert<I extends Iface> extends libthrift091.ProcessFunction<I, unsubscribeEmailAlert_args> {
public unsubscribeEmailAlert() {
super("unsubscribeEmailAlert");
}
public unsubscribeEmailAlert_args getEmptyArgsInstance() {
return new unsubscribeEmailAlert_args();
}
protected boolean isOneway() {
return false;
}
public unsubscribeEmailAlert_result getResult(I iface, unsubscribeEmailAlert_args args) throws libthrift091.TException {
unsubscribeEmailAlert_result result = new unsubscribeEmailAlert_result();
try {
iface.unsubscribeEmailAlert(args.email, args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class listSubscribedPhone<I extends Iface> extends libthrift091.ProcessFunction<I, listSubscribedPhone_args> {
public listSubscribedPhone() {
super("listSubscribedPhone");
}
public listSubscribedPhone_args getEmptyArgsInstance() {
return new listSubscribedPhone_args();
}
protected boolean isOneway() {
return false;
}
public listSubscribedPhone_result getResult(I iface, listSubscribedPhone_args args) throws libthrift091.TException {
listSubscribedPhone_result result = new listSubscribedPhone_result();
try {
result.success = iface.listSubscribedPhone(args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class listSubscribedEmail<I extends Iface> extends libthrift091.ProcessFunction<I, listSubscribedEmail_args> {
public listSubscribedEmail() {
super("listSubscribedEmail");
}
public listSubscribedEmail_args getEmptyArgsInstance() {
return new listSubscribedEmail_args();
}
protected boolean isOneway() {
return false;
}
public listSubscribedEmail_result getResult(I iface, listSubscribedEmail_args args) throws libthrift091.TException {
listSubscribedEmail_result result = new listSubscribedEmail_result();
try {
result.success = iface.listSubscribedEmail(args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getTableHistorySize<I extends Iface> extends libthrift091.ProcessFunction<I, getTableHistorySize_args> {
public getTableHistorySize() {
super("getTableHistorySize");
}
public getTableHistorySize_args getEmptyArgsInstance() {
return new getTableHistorySize_args();
}
protected boolean isOneway() {
return false;
}
public getTableHistorySize_result getResult(I iface, getTableHistorySize_args args) throws libthrift091.TException {
getTableHistorySize_result result = new getTableHistorySize_result();
try {
result.success = iface.getTableHistorySize(args.tableName, args.startDate, args.stopDate);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class renameTable<I extends Iface> extends libthrift091.ProcessFunction<I, renameTable_args> {
public renameTable() {
super("renameTable");
}
public renameTable_args getEmptyArgsInstance() {
return new renameTable_args();
}
protected boolean isOneway() {
return false;
}
public renameTable_result getResult(I iface, renameTable_args args) throws libthrift091.TException {
renameTable_result result = new renameTable_result();
try {
iface.renameTable(args.srcName, args.destName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class listSnapshots<I extends Iface> extends libthrift091.ProcessFunction<I, listSnapshots_args> {
public listSnapshots() {
super("listSnapshots");
}
public listSnapshots_args getEmptyArgsInstance() {
return new listSnapshots_args();
}
protected boolean isOneway() {
return false;
}
public listSnapshots_result getResult(I iface, listSnapshots_args args) throws libthrift091.TException {
listSnapshots_result result = new listSnapshots_result();
try {
result.success = iface.listSnapshots(args.tableName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class snapshotTable<I extends Iface> extends libthrift091.ProcessFunction<I, snapshotTable_args> {
public snapshotTable() {
super("snapshotTable");
}
public snapshotTable_args getEmptyArgsInstance() {
return new snapshotTable_args();
}
protected boolean isOneway() {
return false;
}
public snapshotTable_result getResult(I iface, snapshotTable_args args) throws libthrift091.TException {
snapshotTable_result result = new snapshotTable_result();
try {
iface.snapshotTable(args.tableName, args.snapshotName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class deleteSnapshot<I extends Iface> extends libthrift091.ProcessFunction<I, deleteSnapshot_args> {
public deleteSnapshot() {
super("deleteSnapshot");
}
public deleteSnapshot_args getEmptyArgsInstance() {
return new deleteSnapshot_args();
}
protected boolean isOneway() {
return false;
}
public deleteSnapshot_result getResult(I iface, deleteSnapshot_args args) throws libthrift091.TException {
deleteSnapshot_result result = new deleteSnapshot_result();
try {
iface.deleteSnapshot(args.tableName, args.snapshotName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class restoreSnapshot<I extends Iface> extends libthrift091.ProcessFunction<I, restoreSnapshot_args> {
public restoreSnapshot() {
super("restoreSnapshot");
}
public restoreSnapshot_args getEmptyArgsInstance() {
return new restoreSnapshot_args();
}
protected boolean isOneway() {
return false;
}
public restoreSnapshot_result getResult(I iface, restoreSnapshot_args args) throws libthrift091.TException {
restoreSnapshot_result result = new restoreSnapshot_result();
try {
iface.restoreSnapshot(args.tableName, args.snapshotName, args.destTableName, args.isSystem);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class listAllSnapshots<I extends Iface> extends libthrift091.ProcessFunction<I, listAllSnapshots_args> {
public listAllSnapshots() {
super("listAllSnapshots");
}
public listAllSnapshots_args getEmptyArgsInstance() {
return new listAllSnapshots_args();
}
protected boolean isOneway() {
return false;
}
public listAllSnapshots_result getResult(I iface, listAllSnapshots_args args) throws libthrift091.TException {
listAllSnapshots_result result = new listAllSnapshots_result();
try {
result.success = iface.listAllSnapshots();
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class cancelSnapshotTable<I extends Iface> extends libthrift091.ProcessFunction<I, cancelSnapshotTable_args> {
public cancelSnapshotTable() {
super("cancelSnapshotTable");
}
public cancelSnapshotTable_args getEmptyArgsInstance() {
return new cancelSnapshotTable_args();
}
protected boolean isOneway() {
return false;
}
public cancelSnapshotTable_result getResult(I iface, cancelSnapshotTable_args args) throws libthrift091.TException {
cancelSnapshotTable_result result = new cancelSnapshotTable_result();
try {
iface.cancelSnapshotTable(args.tableName, args.snapshotName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getSnapshotState<I extends Iface> extends libthrift091.ProcessFunction<I, getSnapshotState_args> {
public getSnapshotState() {
super("getSnapshotState");
}
public getSnapshotState_args getEmptyArgsInstance() {
return new getSnapshotState_args();
}
protected boolean isOneway() {
return false;
}
public getSnapshotState_result getResult(I iface, getSnapshotState_args args) throws libthrift091.TException {
getSnapshotState_result result = new getSnapshotState_result();
try {
result.success = iface.getSnapshotState(args.tableName, args.snapshotName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getQuotaInfo<I extends Iface> extends libthrift091.ProcessFunction<I, getQuotaInfo_args> {
public getQuotaInfo() {
super("getQuotaInfo");
}
public getQuotaInfo_args getEmptyArgsInstance() {
return new getQuotaInfo_args();
}
protected boolean isOneway() {
return false;
}
public getQuotaInfo_result getResult(I iface, getQuotaInfo_args args) throws libthrift091.TException {
getQuotaInfo_result result = new getQuotaInfo_result();
try {
result.success = iface.getQuotaInfo(args.spaceId);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getLatestStreamCheckpoint<I extends Iface> extends libthrift091.ProcessFunction<I, getLatestStreamCheckpoint_args> {
public getLatestStreamCheckpoint() {
super("getLatestStreamCheckpoint");
}
public getLatestStreamCheckpoint_args getEmptyArgsInstance() {
return new getLatestStreamCheckpoint_args();
}
protected boolean isOneway() {
return false;
}
public getLatestStreamCheckpoint_result getResult(I iface, getLatestStreamCheckpoint_args args) throws libthrift091.TException {
getLatestStreamCheckpoint_result result = new getLatestStreamCheckpoint_result();
try {
result.success = iface.getLatestStreamCheckpoint(args.tableName, args.topicName);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getFloorStreamCheckpoint<I extends Iface> extends libthrift091.ProcessFunction<I, getFloorStreamCheckpoint_args> {
public getFloorStreamCheckpoint() {
super("getFloorStreamCheckpoint");
}
public getFloorStreamCheckpoint_args getEmptyArgsInstance() {
return new getFloorStreamCheckpoint_args();
}
protected boolean isOneway() {
return false;
}
public getFloorStreamCheckpoint_result getResult(I iface, getFloorStreamCheckpoint_args args) throws libthrift091.TException {
getFloorStreamCheckpoint_result result = new getFloorStreamCheckpoint_result();
try {
result.success = iface.getFloorStreamCheckpoint(args.tableName, args.topicName, args.timestamp);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class getCeilStreamCheckpoint<I extends Iface> extends libthrift091.ProcessFunction<I, getCeilStreamCheckpoint_args> {
public getCeilStreamCheckpoint() {
super("getCeilStreamCheckpoint");
}
public getCeilStreamCheckpoint_args getEmptyArgsInstance() {
return new getCeilStreamCheckpoint_args();
}
protected boolean isOneway() {
return false;
}
public getCeilStreamCheckpoint_result getResult(I iface, getCeilStreamCheckpoint_args args) throws libthrift091.TException {
getCeilStreamCheckpoint_result result = new getCeilStreamCheckpoint_result();
try {
result.success = iface.getCeilStreamCheckpoint(args.tableName, args.topicName, args.timestamp);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
public static class recoverTable<I extends Iface> extends libthrift091.ProcessFunction<I, recoverTable_args> {
public recoverTable() {
super("recoverTable");
}
public recoverTable_args getEmptyArgsInstance() {
return new recoverTable_args();
}
protected boolean isOneway() {
return false;
}
public recoverTable_result getResult(I iface, recoverTable_args args) throws libthrift091.TException {
recoverTable_result result = new recoverTable_result();
try {
iface.recoverTable(args.srcTableName, args.destTableName, args.topicName, args.timestamp);
} catch (com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
result.se = se;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends com.xiaomi.infra.galaxy.sds.thrift.BaseService.AsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>>()));
}
protected AsyncProcessor(I iface, Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase,?>> getProcessMap(Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>> processMap) {
processMap.put("saveAppInfo", new saveAppInfo());
processMap.put("getAppInfo", new getAppInfo());
processMap.put("findAllApps", new findAllApps());
processMap.put("findAllTables", new findAllTables());
processMap.put("createTable", new createTable());
processMap.put("dropTable", new dropTable());
processMap.put("alterTable", new alterTable());
processMap.put("cloneTable", new cloneTable());
processMap.put("disableTable", new disableTable());
processMap.put("enableTable", new enableTable());
processMap.put("describeTable", new describeTable());
processMap.put("getTableStatus", new getTableStatus());
processMap.put("getTableState", new getTableState());
processMap.put("getTableSplits", new getTableSplits());
processMap.put("queryMetric", new queryMetric());
processMap.put("queryMetrics", new queryMetrics());
processMap.put("findAllAppInfo", new findAllAppInfo());
processMap.put("getTableSize", new getTableSize());
processMap.put("putClientMetrics", new putClientMetrics());
processMap.put("subscribePhoneAlert", new subscribePhoneAlert());
processMap.put("unsubscribePhoneAlert", new unsubscribePhoneAlert());
processMap.put("subscribeEmailAlert", new subscribeEmailAlert());
processMap.put("unsubscribeEmailAlert", new unsubscribeEmailAlert());
processMap.put("listSubscribedPhone", new listSubscribedPhone());
processMap.put("listSubscribedEmail", new listSubscribedEmail());
processMap.put("getTableHistorySize", new getTableHistorySize());
processMap.put("renameTable", new renameTable());
processMap.put("listSnapshots", new listSnapshots());
processMap.put("snapshotTable", new snapshotTable());
processMap.put("deleteSnapshot", new deleteSnapshot());
processMap.put("restoreSnapshot", new restoreSnapshot());
processMap.put("listAllSnapshots", new listAllSnapshots());
processMap.put("cancelSnapshotTable", new cancelSnapshotTable());
processMap.put("getSnapshotState", new getSnapshotState());
processMap.put("getQuotaInfo", new getQuotaInfo());
processMap.put("getLatestStreamCheckpoint", new getLatestStreamCheckpoint());
processMap.put("getFloorStreamCheckpoint", new getFloorStreamCheckpoint());
processMap.put("getCeilStreamCheckpoint", new getCeilStreamCheckpoint());
processMap.put("recoverTable", new recoverTable());
return processMap;
}
public static class saveAppInfo<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, saveAppInfo_args, Void> {
public saveAppInfo() {
super("saveAppInfo");
}
public saveAppInfo_args getEmptyArgsInstance() {
return new saveAppInfo_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
saveAppInfo_result result = new saveAppInfo_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;
saveAppInfo_result result = new saveAppInfo_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, saveAppInfo_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.saveAppInfo(args.appInfo,resultHandler);
}
}
public static class getAppInfo<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getAppInfo_args, AppInfo> {
public getAppInfo() {
super("getAppInfo");
}
public getAppInfo_args getEmptyArgsInstance() {
return new getAppInfo_args();
}
public AsyncMethodCallback<AppInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<AppInfo>() {
public void onComplete(AppInfo o) {
getAppInfo_result result = new getAppInfo_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;
getAppInfo_result result = new getAppInfo_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getAppInfo_args args, libthrift091.async.AsyncMethodCallback<AppInfo> resultHandler) throws TException {
iface.getAppInfo(args.appId,resultHandler);
}
}
public static class findAllApps<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, findAllApps_args, List<AppInfo>> {
public findAllApps() {
super("findAllApps");
}
public findAllApps_args getEmptyArgsInstance() {
return new findAllApps_args();
}
public AsyncMethodCallback<List<AppInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<AppInfo>>() {
public void onComplete(List<AppInfo> o) {
findAllApps_result result = new findAllApps_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;
findAllApps_result result = new findAllApps_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, findAllApps_args args, libthrift091.async.AsyncMethodCallback<List<AppInfo>> resultHandler) throws TException {
iface.findAllApps(resultHandler);
}
}
public static class findAllTables<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, findAllTables_args, List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>> {
public findAllTables() {
super("findAllTables");
}
public findAllTables_args getEmptyArgsInstance() {
return new findAllTables_args();
}
public AsyncMethodCallback<List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>>() {
public void onComplete(List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> o) {
findAllTables_result result = new findAllTables_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;
findAllTables_result result = new findAllTables_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, findAllTables_args args, libthrift091.async.AsyncMethodCallback<List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>> resultHandler) throws TException {
iface.findAllTables(resultHandler);
}
}
public static class createTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, createTable_args, com.xiaomi.infra.galaxy.sds.thrift.TableInfo> {
public createTable() {
super("createTable");
}
public createTable_args getEmptyArgsInstance() {
return new createTable_args();
}
public AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>() {
public void onComplete(com.xiaomi.infra.galaxy.sds.thrift.TableInfo o) {
createTable_result result = new createTable_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;
createTable_result result = new createTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, createTable_args args, libthrift091.async.AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> resultHandler) throws TException {
iface.createTable(args.tableName, args.tableSpec,resultHandler);
}
}
public static class dropTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, dropTable_args, Void> {
public dropTable() {
super("dropTable");
}
public dropTable_args getEmptyArgsInstance() {
return new dropTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
dropTable_result result = new dropTable_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;
dropTable_result result = new dropTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, dropTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.dropTable(args.tableName,resultHandler);
}
}
public static class alterTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, alterTable_args, Void> {
public alterTable() {
super("alterTable");
}
public alterTable_args getEmptyArgsInstance() {
return new alterTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
alterTable_result result = new alterTable_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;
alterTable_result result = new alterTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, alterTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.alterTable(args.tableName, args.tableSpec,resultHandler);
}
}
public static class cloneTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, cloneTable_args, Void> {
public cloneTable() {
super("cloneTable");
}
public cloneTable_args getEmptyArgsInstance() {
return new cloneTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
cloneTable_result result = new cloneTable_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;
cloneTable_result result = new cloneTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, cloneTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.cloneTable(args.srcTableName, args.destTableName, args.flushTable,resultHandler);
}
}
public static class disableTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, disableTable_args, Void> {
public disableTable() {
super("disableTable");
}
public disableTable_args getEmptyArgsInstance() {
return new disableTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
disableTable_result result = new disableTable_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;
disableTable_result result = new disableTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, disableTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.disableTable(args.tableName,resultHandler);
}
}
public static class enableTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, enableTable_args, Void> {
public enableTable() {
super("enableTable");
}
public enableTable_args getEmptyArgsInstance() {
return new enableTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
enableTable_result result = new enableTable_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;
enableTable_result result = new enableTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, enableTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.enableTable(args.tableName,resultHandler);
}
}
public static class describeTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, describeTable_args, com.xiaomi.infra.galaxy.sds.thrift.TableSpec> {
public describeTable() {
super("describeTable");
}
public describeTable_args getEmptyArgsInstance() {
return new describeTable_args();
}
public AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableSpec> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableSpec>() {
public void onComplete(com.xiaomi.infra.galaxy.sds.thrift.TableSpec o) {
describeTable_result result = new describeTable_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;
describeTable_result result = new describeTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, describeTable_args args, libthrift091.async.AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableSpec> resultHandler) throws TException {
iface.describeTable(args.tableName,resultHandler);
}
}
public static class getTableStatus<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getTableStatus_args, com.xiaomi.infra.galaxy.sds.thrift.TableStatus> {
public getTableStatus() {
super("getTableStatus");
}
public getTableStatus_args getEmptyArgsInstance() {
return new getTableStatus_args();
}
public AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableStatus>() {
public void onComplete(com.xiaomi.infra.galaxy.sds.thrift.TableStatus o) {
getTableStatus_result result = new getTableStatus_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;
getTableStatus_result result = new getTableStatus_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getTableStatus_args args, libthrift091.async.AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableStatus> resultHandler) throws TException {
iface.getTableStatus(args.tableName,resultHandler);
}
}
public static class getTableState<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getTableState_args, com.xiaomi.infra.galaxy.sds.thrift.TableState> {
public getTableState() {
super("getTableState");
}
public getTableState_args getEmptyArgsInstance() {
return new getTableState_args();
}
public AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableState> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableState>() {
public void onComplete(com.xiaomi.infra.galaxy.sds.thrift.TableState o) {
getTableState_result result = new getTableState_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;
getTableState_result result = new getTableState_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getTableState_args args, libthrift091.async.AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.TableState> resultHandler) throws TException {
iface.getTableState(args.tableName,resultHandler);
}
}
public static class getTableSplits<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getTableSplits_args, List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>> {
public getTableSplits() {
super("getTableSplits");
}
public getTableSplits_args getEmptyArgsInstance() {
return new getTableSplits_args();
}
public AsyncMethodCallback<List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>>() {
public void onComplete(List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> o) {
getTableSplits_result result = new getTableSplits_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;
getTableSplits_result result = new getTableSplits_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getTableSplits_args args, libthrift091.async.AsyncMethodCallback<List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>> resultHandler) throws TException {
iface.getTableSplits(args.tableName, args.startKey, args.stopKey,resultHandler);
}
}
public static class queryMetric<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, queryMetric_args, TimeSeriesData> {
public queryMetric() {
super("queryMetric");
}
public queryMetric_args getEmptyArgsInstance() {
return new queryMetric_args();
}
public AsyncMethodCallback<TimeSeriesData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<TimeSeriesData>() {
public void onComplete(TimeSeriesData o) {
queryMetric_result result = new queryMetric_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;
queryMetric_result result = new queryMetric_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, queryMetric_args args, libthrift091.async.AsyncMethodCallback<TimeSeriesData> resultHandler) throws TException {
iface.queryMetric(args.query,resultHandler);
}
}
public static class queryMetrics<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, queryMetrics_args, List<TimeSeriesData>> {
public queryMetrics() {
super("queryMetrics");
}
public queryMetrics_args getEmptyArgsInstance() {
return new queryMetrics_args();
}
public AsyncMethodCallback<List<TimeSeriesData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<TimeSeriesData>>() {
public void onComplete(List<TimeSeriesData> o) {
queryMetrics_result result = new queryMetrics_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;
queryMetrics_result result = new queryMetrics_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, queryMetrics_args args, libthrift091.async.AsyncMethodCallback<List<TimeSeriesData>> resultHandler) throws TException {
iface.queryMetrics(args.queries,resultHandler);
}
}
public static class findAllAppInfo<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, findAllAppInfo_args, List<AppInfo>> {
public findAllAppInfo() {
super("findAllAppInfo");
}
public findAllAppInfo_args getEmptyArgsInstance() {
return new findAllAppInfo_args();
}
public AsyncMethodCallback<List<AppInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<AppInfo>>() {
public void onComplete(List<AppInfo> o) {
findAllAppInfo_result result = new findAllAppInfo_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;
findAllAppInfo_result result = new findAllAppInfo_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, findAllAppInfo_args args, libthrift091.async.AsyncMethodCallback<List<AppInfo>> resultHandler) throws TException {
iface.findAllAppInfo(resultHandler);
}
}
public static class getTableSize<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getTableSize_args, Long> {
public getTableSize() {
super("getTableSize");
}
public getTableSize_args getEmptyArgsInstance() {
return new getTableSize_args();
}
public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Long>() {
public void onComplete(Long o) {
getTableSize_result result = new getTableSize_result();
result.success = o;
result.setSuccessIsSet(true);
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;
getTableSize_result result = new getTableSize_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getTableSize_args args, libthrift091.async.AsyncMethodCallback<Long> resultHandler) throws TException {
iface.getTableSize(args.tableName,resultHandler);
}
}
public static class putClientMetrics<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, putClientMetrics_args, Void> {
public putClientMetrics() {
super("putClientMetrics");
}
public putClientMetrics_args getEmptyArgsInstance() {
return new putClientMetrics_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
putClientMetrics_result result = new putClientMetrics_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;
putClientMetrics_result result = new putClientMetrics_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, putClientMetrics_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.putClientMetrics(args.clientMetrics,resultHandler);
}
}
public static class subscribePhoneAlert<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, subscribePhoneAlert_args, Void> {
public subscribePhoneAlert() {
super("subscribePhoneAlert");
}
public subscribePhoneAlert_args getEmptyArgsInstance() {
return new subscribePhoneAlert_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
subscribePhoneAlert_result result = new subscribePhoneAlert_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;
subscribePhoneAlert_result result = new subscribePhoneAlert_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, subscribePhoneAlert_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.subscribePhoneAlert(args.phoneNumber, args.spaceId,resultHandler);
}
}
public static class unsubscribePhoneAlert<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, unsubscribePhoneAlert_args, Void> {
public unsubscribePhoneAlert() {
super("unsubscribePhoneAlert");
}
public unsubscribePhoneAlert_args getEmptyArgsInstance() {
return new unsubscribePhoneAlert_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
unsubscribePhoneAlert_result result = new unsubscribePhoneAlert_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;
unsubscribePhoneAlert_result result = new unsubscribePhoneAlert_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, unsubscribePhoneAlert_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.unsubscribePhoneAlert(args.phoneNumber, args.spaceId,resultHandler);
}
}
public static class subscribeEmailAlert<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, subscribeEmailAlert_args, Void> {
public subscribeEmailAlert() {
super("subscribeEmailAlert");
}
public subscribeEmailAlert_args getEmptyArgsInstance() {
return new subscribeEmailAlert_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
subscribeEmailAlert_result result = new subscribeEmailAlert_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;
subscribeEmailAlert_result result = new subscribeEmailAlert_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, subscribeEmailAlert_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.subscribeEmailAlert(args.email, args.spaceId,resultHandler);
}
}
public static class unsubscribeEmailAlert<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, unsubscribeEmailAlert_args, Void> {
public unsubscribeEmailAlert() {
super("unsubscribeEmailAlert");
}
public unsubscribeEmailAlert_args getEmptyArgsInstance() {
return new unsubscribeEmailAlert_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
unsubscribeEmailAlert_result result = new unsubscribeEmailAlert_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;
unsubscribeEmailAlert_result result = new unsubscribeEmailAlert_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, unsubscribeEmailAlert_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.unsubscribeEmailAlert(args.email, args.spaceId,resultHandler);
}
}
public static class listSubscribedPhone<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, listSubscribedPhone_args, List<String>> {
public listSubscribedPhone() {
super("listSubscribedPhone");
}
public listSubscribedPhone_args getEmptyArgsInstance() {
return new listSubscribedPhone_args();
}
public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<String>>() {
public void onComplete(List<String> o) {
listSubscribedPhone_result result = new listSubscribedPhone_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;
listSubscribedPhone_result result = new listSubscribedPhone_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, listSubscribedPhone_args args, libthrift091.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
iface.listSubscribedPhone(args.spaceId,resultHandler);
}
}
public static class listSubscribedEmail<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, listSubscribedEmail_args, List<String>> {
public listSubscribedEmail() {
super("listSubscribedEmail");
}
public listSubscribedEmail_args getEmptyArgsInstance() {
return new listSubscribedEmail_args();
}
public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<String>>() {
public void onComplete(List<String> o) {
listSubscribedEmail_result result = new listSubscribedEmail_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;
listSubscribedEmail_result result = new listSubscribedEmail_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, listSubscribedEmail_args args, libthrift091.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
iface.listSubscribedEmail(args.spaceId,resultHandler);
}
}
public static class getTableHistorySize<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getTableHistorySize_args, Map<Long,Long>> {
public getTableHistorySize() {
super("getTableHistorySize");
}
public getTableHistorySize_args getEmptyArgsInstance() {
return new getTableHistorySize_args();
}
public AsyncMethodCallback<Map<Long,Long>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Map<Long,Long>>() {
public void onComplete(Map<Long,Long> o) {
getTableHistorySize_result result = new getTableHistorySize_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;
getTableHistorySize_result result = new getTableHistorySize_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getTableHistorySize_args args, libthrift091.async.AsyncMethodCallback<Map<Long,Long>> resultHandler) throws TException {
iface.getTableHistorySize(args.tableName, args.startDate, args.stopDate,resultHandler);
}
}
public static class renameTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, renameTable_args, Void> {
public renameTable() {
super("renameTable");
}
public renameTable_args getEmptyArgsInstance() {
return new renameTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
renameTable_result result = new renameTable_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;
renameTable_result result = new renameTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, renameTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.renameTable(args.srcName, args.destName,resultHandler);
}
}
public static class listSnapshots<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, listSnapshots_args, TableSnapshots> {
public listSnapshots() {
super("listSnapshots");
}
public listSnapshots_args getEmptyArgsInstance() {
return new listSnapshots_args();
}
public AsyncMethodCallback<TableSnapshots> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<TableSnapshots>() {
public void onComplete(TableSnapshots o) {
listSnapshots_result result = new listSnapshots_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;
listSnapshots_result result = new listSnapshots_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, listSnapshots_args args, libthrift091.async.AsyncMethodCallback<TableSnapshots> resultHandler) throws TException {
iface.listSnapshots(args.tableName,resultHandler);
}
}
public static class snapshotTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, snapshotTable_args, Void> {
public snapshotTable() {
super("snapshotTable");
}
public snapshotTable_args getEmptyArgsInstance() {
return new snapshotTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
snapshotTable_result result = new snapshotTable_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;
snapshotTable_result result = new snapshotTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, snapshotTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.snapshotTable(args.tableName, args.snapshotName,resultHandler);
}
}
public static class deleteSnapshot<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deleteSnapshot_args, Void> {
public deleteSnapshot() {
super("deleteSnapshot");
}
public deleteSnapshot_args getEmptyArgsInstance() {
return new deleteSnapshot_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
deleteSnapshot_result result = new deleteSnapshot_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;
deleteSnapshot_result result = new deleteSnapshot_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, deleteSnapshot_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.deleteSnapshot(args.tableName, args.snapshotName,resultHandler);
}
}
public static class restoreSnapshot<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, restoreSnapshot_args, Void> {
public restoreSnapshot() {
super("restoreSnapshot");
}
public restoreSnapshot_args getEmptyArgsInstance() {
return new restoreSnapshot_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
restoreSnapshot_result result = new restoreSnapshot_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;
restoreSnapshot_result result = new restoreSnapshot_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, restoreSnapshot_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.restoreSnapshot(args.tableName, args.snapshotName, args.destTableName, args.isSystem,resultHandler);
}
}
public static class listAllSnapshots<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, listAllSnapshots_args, List<SnapshotTableView>> {
public listAllSnapshots() {
super("listAllSnapshots");
}
public listAllSnapshots_args getEmptyArgsInstance() {
return new listAllSnapshots_args();
}
public AsyncMethodCallback<List<SnapshotTableView>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<SnapshotTableView>>() {
public void onComplete(List<SnapshotTableView> o) {
listAllSnapshots_result result = new listAllSnapshots_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;
listAllSnapshots_result result = new listAllSnapshots_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, listAllSnapshots_args args, libthrift091.async.AsyncMethodCallback<List<SnapshotTableView>> resultHandler) throws TException {
iface.listAllSnapshots(resultHandler);
}
}
public static class cancelSnapshotTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, cancelSnapshotTable_args, Void> {
public cancelSnapshotTable() {
super("cancelSnapshotTable");
}
public cancelSnapshotTable_args getEmptyArgsInstance() {
return new cancelSnapshotTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
cancelSnapshotTable_result result = new cancelSnapshotTable_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;
cancelSnapshotTable_result result = new cancelSnapshotTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, cancelSnapshotTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.cancelSnapshotTable(args.tableName, args.snapshotName,resultHandler);
}
}
public static class getSnapshotState<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getSnapshotState_args, com.xiaomi.infra.galaxy.sds.thrift.SnapshotState> {
public getSnapshotState() {
super("getSnapshotState");
}
public getSnapshotState_args getEmptyArgsInstance() {
return new getSnapshotState_args();
}
public AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.SnapshotState> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.SnapshotState>() {
public void onComplete(com.xiaomi.infra.galaxy.sds.thrift.SnapshotState o) {
getSnapshotState_result result = new getSnapshotState_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;
getSnapshotState_result result = new getSnapshotState_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getSnapshotState_args args, libthrift091.async.AsyncMethodCallback<com.xiaomi.infra.galaxy.sds.thrift.SnapshotState> resultHandler) throws TException {
iface.getSnapshotState(args.tableName, args.snapshotName,resultHandler);
}
}
public static class getQuotaInfo<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getQuotaInfo_args, QuotaInfo> {
public getQuotaInfo() {
super("getQuotaInfo");
}
public getQuotaInfo_args getEmptyArgsInstance() {
return new getQuotaInfo_args();
}
public AsyncMethodCallback<QuotaInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<QuotaInfo>() {
public void onComplete(QuotaInfo o) {
getQuotaInfo_result result = new getQuotaInfo_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;
getQuotaInfo_result result = new getQuotaInfo_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getQuotaInfo_args args, libthrift091.async.AsyncMethodCallback<QuotaInfo> resultHandler) throws TException {
iface.getQuotaInfo(args.spaceId,resultHandler);
}
}
public static class getLatestStreamCheckpoint<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getLatestStreamCheckpoint_args, StreamCheckpoint> {
public getLatestStreamCheckpoint() {
super("getLatestStreamCheckpoint");
}
public getLatestStreamCheckpoint_args getEmptyArgsInstance() {
return new getLatestStreamCheckpoint_args();
}
public AsyncMethodCallback<StreamCheckpoint> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<StreamCheckpoint>() {
public void onComplete(StreamCheckpoint o) {
getLatestStreamCheckpoint_result result = new getLatestStreamCheckpoint_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;
getLatestStreamCheckpoint_result result = new getLatestStreamCheckpoint_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getLatestStreamCheckpoint_args args, libthrift091.async.AsyncMethodCallback<StreamCheckpoint> resultHandler) throws TException {
iface.getLatestStreamCheckpoint(args.tableName, args.topicName,resultHandler);
}
}
public static class getFloorStreamCheckpoint<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getFloorStreamCheckpoint_args, StreamCheckpoint> {
public getFloorStreamCheckpoint() {
super("getFloorStreamCheckpoint");
}
public getFloorStreamCheckpoint_args getEmptyArgsInstance() {
return new getFloorStreamCheckpoint_args();
}
public AsyncMethodCallback<StreamCheckpoint> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<StreamCheckpoint>() {
public void onComplete(StreamCheckpoint o) {
getFloorStreamCheckpoint_result result = new getFloorStreamCheckpoint_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;
getFloorStreamCheckpoint_result result = new getFloorStreamCheckpoint_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getFloorStreamCheckpoint_args args, libthrift091.async.AsyncMethodCallback<StreamCheckpoint> resultHandler) throws TException {
iface.getFloorStreamCheckpoint(args.tableName, args.topicName, args.timestamp,resultHandler);
}
}
public static class getCeilStreamCheckpoint<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getCeilStreamCheckpoint_args, StreamCheckpoint> {
public getCeilStreamCheckpoint() {
super("getCeilStreamCheckpoint");
}
public getCeilStreamCheckpoint_args getEmptyArgsInstance() {
return new getCeilStreamCheckpoint_args();
}
public AsyncMethodCallback<StreamCheckpoint> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<StreamCheckpoint>() {
public void onComplete(StreamCheckpoint o) {
getCeilStreamCheckpoint_result result = new getCeilStreamCheckpoint_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;
getCeilStreamCheckpoint_result result = new getCeilStreamCheckpoint_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, getCeilStreamCheckpoint_args args, libthrift091.async.AsyncMethodCallback<StreamCheckpoint> resultHandler) throws TException {
iface.getCeilStreamCheckpoint(args.tableName, args.topicName, args.timestamp,resultHandler);
}
}
public static class recoverTable<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, recoverTable_args, Void> {
public recoverTable() {
super("recoverTable");
}
public recoverTable_args getEmptyArgsInstance() {
return new recoverTable_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
recoverTable_result result = new recoverTable_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;
recoverTable_result result = new recoverTable_result();
if (e instanceof com.xiaomi.infra.galaxy.sds.thrift.ServiceException) {
result.se = (com.xiaomi.infra.galaxy.sds.thrift.ServiceException) e;
result.setSeIsSet(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, recoverTable_args args, libthrift091.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.recoverTable(args.srcTableName, args.destTableName, args.topicName, args.timestamp,resultHandler);
}
}
}
public static class saveAppInfo_args implements libthrift091.TBase<saveAppInfo_args, saveAppInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveAppInfo_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("saveAppInfo_args");
private static final libthrift091.protocol.TField APP_INFO_FIELD_DESC = new libthrift091.protocol.TField("appInfo", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new saveAppInfo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new saveAppInfo_argsTupleSchemeFactory());
}
public AppInfo appInfo; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
APP_INFO((short)1, "appInfo");
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: // APP_INFO
return APP_INFO;
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.APP_INFO, new libthrift091.meta_data.FieldMetaData("appInfo", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AppInfo.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(saveAppInfo_args.class, metaDataMap);
}
public saveAppInfo_args() {
}
public saveAppInfo_args(
AppInfo appInfo)
{
this();
this.appInfo = appInfo;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public saveAppInfo_args(saveAppInfo_args other) {
if (other.isSetAppInfo()) {
this.appInfo = new AppInfo(other.appInfo);
}
}
public saveAppInfo_args deepCopy() {
return new saveAppInfo_args(this);
}
@Override
public void clear() {
this.appInfo = null;
}
public AppInfo getAppInfo() {
return this.appInfo;
}
public saveAppInfo_args setAppInfo(AppInfo appInfo) {
this.appInfo = appInfo;
return this;
}
public void unsetAppInfo() {
this.appInfo = null;
}
/** Returns true if field appInfo is set (has been assigned a value) and false otherwise */
public boolean isSetAppInfo() {
return this.appInfo != null;
}
public void setAppInfoIsSet(boolean value) {
if (!value) {
this.appInfo = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_INFO:
if (value == null) {
unsetAppInfo();
} else {
setAppInfo((AppInfo)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_INFO:
return getAppInfo();
}
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_INFO:
return isSetAppInfo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof saveAppInfo_args)
return this.equals((saveAppInfo_args)that);
return false;
}
public boolean equals(saveAppInfo_args that) {
if (that == null)
return false;
boolean this_present_appInfo = true && this.isSetAppInfo();
boolean that_present_appInfo = true && that.isSetAppInfo();
if (this_present_appInfo || that_present_appInfo) {
if (!(this_present_appInfo && that_present_appInfo))
return false;
if (!this.appInfo.equals(that.appInfo))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_appInfo = true && (isSetAppInfo());
list.add(present_appInfo);
if (present_appInfo)
list.add(appInfo);
return list.hashCode();
}
@Override
public int compareTo(saveAppInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetAppInfo()).compareTo(other.isSetAppInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAppInfo()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.appInfo, other.appInfo);
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("saveAppInfo_args(");
boolean first = true;
sb.append("appInfo:");
if (this.appInfo == null) {
sb.append("null");
} else {
sb.append(this.appInfo);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (appInfo != null) {
appInfo.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 saveAppInfo_argsStandardSchemeFactory implements SchemeFactory {
public saveAppInfo_argsStandardScheme getScheme() {
return new saveAppInfo_argsStandardScheme();
}
}
private static class saveAppInfo_argsStandardScheme extends StandardScheme<saveAppInfo_args> {
public void read(libthrift091.protocol.TProtocol iprot, saveAppInfo_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: // APP_INFO
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.appInfo = new AppInfo();
struct.appInfo.read(iprot);
struct.setAppInfoIsSet(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, saveAppInfo_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.appInfo != null) {
oprot.writeFieldBegin(APP_INFO_FIELD_DESC);
struct.appInfo.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class saveAppInfo_argsTupleSchemeFactory implements SchemeFactory {
public saveAppInfo_argsTupleScheme getScheme() {
return new saveAppInfo_argsTupleScheme();
}
}
private static class saveAppInfo_argsTupleScheme extends TupleScheme<saveAppInfo_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, saveAppInfo_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetAppInfo()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetAppInfo()) {
struct.appInfo.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, saveAppInfo_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.appInfo = new AppInfo();
struct.appInfo.read(iprot);
struct.setAppInfoIsSet(true);
}
}
}
}
public static class saveAppInfo_result implements libthrift091.TBase<saveAppInfo_result, saveAppInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveAppInfo_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("saveAppInfo_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new saveAppInfo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new saveAppInfo_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(saveAppInfo_result.class, metaDataMap);
}
public saveAppInfo_result() {
}
public saveAppInfo_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public saveAppInfo_result(saveAppInfo_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public saveAppInfo_result deepCopy() {
return new saveAppInfo_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public saveAppInfo_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof saveAppInfo_result)
return this.equals((saveAppInfo_result)that);
return false;
}
public boolean equals(saveAppInfo_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(saveAppInfo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("saveAppInfo_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 saveAppInfo_resultStandardSchemeFactory implements SchemeFactory {
public saveAppInfo_resultStandardScheme getScheme() {
return new saveAppInfo_resultStandardScheme();
}
}
private static class saveAppInfo_resultStandardScheme extends StandardScheme<saveAppInfo_result> {
public void read(libthrift091.protocol.TProtocol iprot, saveAppInfo_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, saveAppInfo_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class saveAppInfo_resultTupleSchemeFactory implements SchemeFactory {
public saveAppInfo_resultTupleScheme getScheme() {
return new saveAppInfo_resultTupleScheme();
}
}
private static class saveAppInfo_resultTupleScheme extends TupleScheme<saveAppInfo_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, saveAppInfo_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, saveAppInfo_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getAppInfo_args implements libthrift091.TBase<getAppInfo_args, getAppInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAppInfo_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getAppInfo_args");
private static final libthrift091.protocol.TField APP_ID_FIELD_DESC = new libthrift091.protocol.TField("appId", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getAppInfo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getAppInfo_argsTupleSchemeFactory());
}
public String appId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
APP_ID((short)1, "appId");
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: // APP_ID
return APP_ID;
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.APP_ID, new libthrift091.meta_data.FieldMetaData("appId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getAppInfo_args.class, metaDataMap);
}
public getAppInfo_args() {
}
public getAppInfo_args(
String appId)
{
this();
this.appId = appId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAppInfo_args(getAppInfo_args other) {
if (other.isSetAppId()) {
this.appId = other.appId;
}
}
public getAppInfo_args deepCopy() {
return new getAppInfo_args(this);
}
@Override
public void clear() {
this.appId = null;
}
public String getAppId() {
return this.appId;
}
public getAppInfo_args 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;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_ID:
if (value == null) {
unsetAppId();
} else {
setAppId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_ID:
return getAppId();
}
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();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getAppInfo_args)
return this.equals((getAppInfo_args)that);
return false;
}
public boolean equals(getAppInfo_args 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;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_appId = true && (isSetAppId());
list.add(present_appId);
if (present_appId)
list.add(appId);
return list.hashCode();
}
@Override
public int compareTo(getAppInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetAppId()).compareTo(other.isSetAppId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAppId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.appId, other.appId);
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("getAppInfo_args(");
boolean first = true;
sb.append("appId:");
if (this.appId == null) {
sb.append("null");
} else {
sb.append(this.appId);
}
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 getAppInfo_argsStandardSchemeFactory implements SchemeFactory {
public getAppInfo_argsStandardScheme getScheme() {
return new getAppInfo_argsStandardScheme();
}
}
private static class getAppInfo_argsStandardScheme extends StandardScheme<getAppInfo_args> {
public void read(libthrift091.protocol.TProtocol iprot, getAppInfo_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: // APP_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.appId = iprot.readString();
struct.setAppIdIsSet(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, getAppInfo_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.appId != null) {
oprot.writeFieldBegin(APP_ID_FIELD_DESC);
oprot.writeString(struct.appId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAppInfo_argsTupleSchemeFactory implements SchemeFactory {
public getAppInfo_argsTupleScheme getScheme() {
return new getAppInfo_argsTupleScheme();
}
}
private static class getAppInfo_argsTupleScheme extends TupleScheme<getAppInfo_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getAppInfo_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetAppId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetAppId()) {
oprot.writeString(struct.appId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getAppInfo_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.appId = iprot.readString();
struct.setAppIdIsSet(true);
}
}
}
}
public static class getAppInfo_result implements libthrift091.TBase<getAppInfo_result, getAppInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAppInfo_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getAppInfo_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getAppInfo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getAppInfo_resultTupleSchemeFactory());
}
public AppInfo success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, AppInfo.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getAppInfo_result.class, metaDataMap);
}
public getAppInfo_result() {
}
public getAppInfo_result(
AppInfo success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAppInfo_result(getAppInfo_result other) {
if (other.isSetSuccess()) {
this.success = new AppInfo(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getAppInfo_result deepCopy() {
return new getAppInfo_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public AppInfo getSuccess() {
return this.success;
}
public getAppInfo_result setSuccess(AppInfo 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getAppInfo_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((AppInfo)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getAppInfo_result)
return this.equals((getAppInfo_result)that);
return false;
}
public boolean equals(getAppInfo_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getAppInfo_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getAppInfo_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getAppInfo_resultStandardSchemeFactory implements SchemeFactory {
public getAppInfo_resultStandardScheme getScheme() {
return new getAppInfo_resultStandardScheme();
}
}
private static class getAppInfo_resultStandardScheme extends StandardScheme<getAppInfo_result> {
public void read(libthrift091.protocol.TProtocol iprot, getAppInfo_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 AppInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getAppInfo_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAppInfo_resultTupleSchemeFactory implements SchemeFactory {
public getAppInfo_resultTupleScheme getScheme() {
return new getAppInfo_resultTupleScheme();
}
}
private static class getAppInfo_resultTupleScheme extends TupleScheme<getAppInfo_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getAppInfo_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getAppInfo_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new AppInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class findAllApps_args implements libthrift091.TBase<findAllApps_args, findAllApps_args._Fields>, java.io.Serializable, Cloneable, Comparable<findAllApps_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("findAllApps_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findAllApps_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new findAllApps_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<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) {
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(findAllApps_args.class, metaDataMap);
}
public findAllApps_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findAllApps_args(findAllApps_args other) {
}
public findAllApps_args deepCopy() {
return new findAllApps_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 findAllApps_args)
return this.equals((findAllApps_args)that);
return false;
}
public boolean equals(findAllApps_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
return list.hashCode();
}
@Override
public int compareTo(findAllApps_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("findAllApps_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 findAllApps_argsStandardSchemeFactory implements SchemeFactory {
public findAllApps_argsStandardScheme getScheme() {
return new findAllApps_argsStandardScheme();
}
}
private static class findAllApps_argsStandardScheme extends StandardScheme<findAllApps_args> {
public void read(libthrift091.protocol.TProtocol iprot, findAllApps_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, findAllApps_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findAllApps_argsTupleSchemeFactory implements SchemeFactory {
public findAllApps_argsTupleScheme getScheme() {
return new findAllApps_argsTupleScheme();
}
}
private static class findAllApps_argsTupleScheme extends TupleScheme<findAllApps_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, findAllApps_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(libthrift091.protocol.TProtocol prot, findAllApps_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class findAllApps_result implements libthrift091.TBase<findAllApps_result, findAllApps_result._Fields>, java.io.Serializable, Cloneable, Comparable<findAllApps_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("findAllApps_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findAllApps_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new findAllApps_resultTupleSchemeFactory());
}
public List<AppInfo> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AppInfo.class))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(findAllApps_result.class, metaDataMap);
}
public findAllApps_result() {
}
public findAllApps_result(
List<AppInfo> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findAllApps_result(findAllApps_result other) {
if (other.isSetSuccess()) {
List<AppInfo> __this__success = new ArrayList<AppInfo>(other.success.size());
for (AppInfo other_element : other.success) {
__this__success.add(new AppInfo(other_element));
}
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public findAllApps_result deepCopy() {
return new findAllApps_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<AppInfo> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(AppInfo elem) {
if (this.success == null) {
this.success = new ArrayList<AppInfo>();
}
this.success.add(elem);
}
public List<AppInfo> getSuccess() {
return this.success;
}
public findAllApps_result setSuccess(List<AppInfo> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public findAllApps_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<AppInfo>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof findAllApps_result)
return this.equals((findAllApps_result)that);
return false;
}
public boolean equals(findAllApps_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(findAllApps_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("findAllApps_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 findAllApps_resultStandardSchemeFactory implements SchemeFactory {
public findAllApps_resultStandardScheme getScheme() {
return new findAllApps_resultStandardScheme();
}
}
private static class findAllApps_resultStandardScheme extends StandardScheme<findAllApps_result> {
public void read(libthrift091.protocol.TProtocol iprot, findAllApps_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.LIST) {
{
libthrift091.protocol.TList _list70 = iprot.readListBegin();
struct.success = new ArrayList<AppInfo>(_list70.size);
AppInfo _elem71;
for (int _i72 = 0; _i72 < _list70.size; ++_i72)
{
_elem71 = new AppInfo();
_elem71.read(iprot);
struct.success.add(_elem71);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, findAllApps_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (AppInfo _iter73 : struct.success)
{
_iter73.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findAllApps_resultTupleSchemeFactory implements SchemeFactory {
public findAllApps_resultTupleScheme getScheme() {
return new findAllApps_resultTupleScheme();
}
}
private static class findAllApps_resultTupleScheme extends TupleScheme<findAllApps_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, findAllApps_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (AppInfo _iter74 : struct.success)
{
_iter74.write(oprot);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, findAllApps_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list75 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<AppInfo>(_list75.size);
AppInfo _elem76;
for (int _i77 = 0; _i77 < _list75.size; ++_i77)
{
_elem76 = new AppInfo();
_elem76.read(iprot);
struct.success.add(_elem76);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class findAllTables_args implements libthrift091.TBase<findAllTables_args, findAllTables_args._Fields>, java.io.Serializable, Cloneable, Comparable<findAllTables_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("findAllTables_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findAllTables_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new findAllTables_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<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) {
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(findAllTables_args.class, metaDataMap);
}
public findAllTables_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findAllTables_args(findAllTables_args other) {
}
public findAllTables_args deepCopy() {
return new findAllTables_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 findAllTables_args)
return this.equals((findAllTables_args)that);
return false;
}
public boolean equals(findAllTables_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
return list.hashCode();
}
@Override
public int compareTo(findAllTables_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("findAllTables_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 findAllTables_argsStandardSchemeFactory implements SchemeFactory {
public findAllTables_argsStandardScheme getScheme() {
return new findAllTables_argsStandardScheme();
}
}
private static class findAllTables_argsStandardScheme extends StandardScheme<findAllTables_args> {
public void read(libthrift091.protocol.TProtocol iprot, findAllTables_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, findAllTables_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findAllTables_argsTupleSchemeFactory implements SchemeFactory {
public findAllTables_argsTupleScheme getScheme() {
return new findAllTables_argsTupleScheme();
}
}
private static class findAllTables_argsTupleScheme extends TupleScheme<findAllTables_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, findAllTables_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(libthrift091.protocol.TProtocol prot, findAllTables_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class findAllTables_result implements libthrift091.TBase<findAllTables_result, findAllTables_result._Fields>, java.io.Serializable, Cloneable, Comparable<findAllTables_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("findAllTables_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findAllTables_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new findAllTables_resultTupleSchemeFactory());
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, com.xiaomi.infra.galaxy.sds.thrift.TableInfo.class))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(findAllTables_result.class, metaDataMap);
}
public findAllTables_result() {
}
public findAllTables_result(
List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findAllTables_result(findAllTables_result other) {
if (other.isSetSuccess()) {
List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> __this__success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>(other.success.size());
for (com.xiaomi.infra.galaxy.sds.thrift.TableInfo other_element : other.success) {
__this__success.add(new com.xiaomi.infra.galaxy.sds.thrift.TableInfo(other_element));
}
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public findAllTables_result deepCopy() {
return new findAllTables_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(com.xiaomi.infra.galaxy.sds.thrift.TableInfo elem) {
if (this.success == null) {
this.success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>();
}
this.success.add(elem);
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> getSuccess() {
return this.success;
}
public findAllTables_result setSuccess(List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public findAllTables_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof findAllTables_result)
return this.equals((findAllTables_result)that);
return false;
}
public boolean equals(findAllTables_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(findAllTables_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("findAllTables_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 findAllTables_resultStandardSchemeFactory implements SchemeFactory {
public findAllTables_resultStandardScheme getScheme() {
return new findAllTables_resultStandardScheme();
}
}
private static class findAllTables_resultStandardScheme extends StandardScheme<findAllTables_result> {
public void read(libthrift091.protocol.TProtocol iprot, findAllTables_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.LIST) {
{
libthrift091.protocol.TList _list78 = iprot.readListBegin();
struct.success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>(_list78.size);
com.xiaomi.infra.galaxy.sds.thrift.TableInfo _elem79;
for (int _i80 = 0; _i80 < _list78.size; ++_i80)
{
_elem79 = new com.xiaomi.infra.galaxy.sds.thrift.TableInfo();
_elem79.read(iprot);
struct.success.add(_elem79);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, findAllTables_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (com.xiaomi.infra.galaxy.sds.thrift.TableInfo _iter81 : struct.success)
{
_iter81.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findAllTables_resultTupleSchemeFactory implements SchemeFactory {
public findAllTables_resultTupleScheme getScheme() {
return new findAllTables_resultTupleScheme();
}
}
private static class findAllTables_resultTupleScheme extends TupleScheme<findAllTables_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, findAllTables_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (com.xiaomi.infra.galaxy.sds.thrift.TableInfo _iter82 : struct.success)
{
_iter82.write(oprot);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, findAllTables_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list83 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableInfo>(_list83.size);
com.xiaomi.infra.galaxy.sds.thrift.TableInfo _elem84;
for (int _i85 = 0; _i85 < _list83.size; ++_i85)
{
_elem84 = new com.xiaomi.infra.galaxy.sds.thrift.TableInfo();
_elem84.read(iprot);
struct.success.add(_elem84);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class createTable_args implements libthrift091.TBase<createTable_args, createTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField TABLE_SPEC_FIELD_DESC = new libthrift091.protocol.TField("tableSpec", libthrift091.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new createTable_argsTupleSchemeFactory());
}
public String tableName; // required
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
TABLE_SPEC((short)2, "tableSpec");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // TABLE_SPEC
return TABLE_SPEC;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_SPEC, new libthrift091.meta_data.FieldMetaData("tableSpec", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, com.xiaomi.infra.galaxy.sds.thrift.TableSpec.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap);
}
public createTable_args() {
}
public createTable_args(
String tableName,
com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec)
{
this();
this.tableName = tableName;
this.tableSpec = tableSpec;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createTable_args(createTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetTableSpec()) {
this.tableSpec = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec(other.tableSpec);
}
}
public createTable_args deepCopy() {
return new createTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.tableSpec = null;
}
public String getTableName() {
return this.tableName;
}
public createTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec getTableSpec() {
return this.tableSpec;
}
public createTable_args setTableSpec(com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) {
this.tableSpec = tableSpec;
return this;
}
public void unsetTableSpec() {
this.tableSpec = null;
}
/** Returns true if field tableSpec is set (has been assigned a value) and false otherwise */
public boolean isSetTableSpec() {
return this.tableSpec != null;
}
public void setTableSpecIsSet(boolean value) {
if (!value) {
this.tableSpec = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case TABLE_SPEC:
if (value == null) {
unsetTableSpec();
} else {
setTableSpec((com.xiaomi.infra.galaxy.sds.thrift.TableSpec)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case TABLE_SPEC:
return getTableSpec();
}
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 TABLE_NAME:
return isSetTableName();
case TABLE_SPEC:
return isSetTableSpec();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createTable_args)
return this.equals((createTable_args)that);
return false;
}
public boolean equals(createTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_tableSpec = true && this.isSetTableSpec();
boolean that_present_tableSpec = true && that.isSetTableSpec();
if (this_present_tableSpec || that_present_tableSpec) {
if (!(this_present_tableSpec && that_present_tableSpec))
return false;
if (!this.tableSpec.equals(that.tableSpec))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_tableSpec = true && (isSetTableSpec());
list.add(present_tableSpec);
if (present_tableSpec)
list.add(tableSpec);
return list.hashCode();
}
@Override
public int compareTo(createTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTableSpec()).compareTo(other.isSetTableSpec());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableSpec()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableSpec, other.tableSpec);
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("createTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("tableSpec:");
if (this.tableSpec == null) {
sb.append("null");
} else {
sb.append(this.tableSpec);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (tableSpec != null) {
tableSpec.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 createTable_argsStandardSchemeFactory implements SchemeFactory {
public createTable_argsStandardScheme getScheme() {
return new createTable_argsStandardScheme();
}
}
private static class createTable_argsStandardScheme extends StandardScheme<createTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, createTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TABLE_SPEC
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.tableSpec = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec();
struct.tableSpec.read(iprot);
struct.setTableSpecIsSet(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, createTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.tableSpec != null) {
oprot.writeFieldBegin(TABLE_SPEC_FIELD_DESC);
struct.tableSpec.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTable_argsTupleSchemeFactory implements SchemeFactory {
public createTable_argsTupleScheme getScheme() {
return new createTable_argsTupleScheme();
}
}
private static class createTable_argsTupleScheme extends TupleScheme<createTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, createTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetTableSpec()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetTableSpec()) {
struct.tableSpec.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, createTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.tableSpec = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec();
struct.tableSpec.read(iprot);
struct.setTableSpecIsSet(true);
}
}
}
}
public static class createTable_result implements libthrift091.TBase<createTable_result, createTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createTable_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new createTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.TableInfo success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, com.xiaomi.infra.galaxy.sds.thrift.TableInfo.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createTable_result.class, metaDataMap);
}
public createTable_result() {
}
public createTable_result(
com.xiaomi.infra.galaxy.sds.thrift.TableInfo success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createTable_result(createTable_result other) {
if (other.isSetSuccess()) {
this.success = new com.xiaomi.infra.galaxy.sds.thrift.TableInfo(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public createTable_result deepCopy() {
return new createTable_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.TableInfo getSuccess() {
return this.success;
}
public createTable_result setSuccess(com.xiaomi.infra.galaxy.sds.thrift.TableInfo 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public createTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((com.xiaomi.infra.galaxy.sds.thrift.TableInfo)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createTable_result)
return this.equals((createTable_result)that);
return false;
}
public boolean equals(createTable_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(createTable_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("createTable_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 createTable_resultStandardSchemeFactory implements SchemeFactory {
public createTable_resultStandardScheme getScheme() {
return new createTable_resultStandardScheme();
}
}
private static class createTable_resultStandardScheme extends StandardScheme<createTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, createTable_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 com.xiaomi.infra.galaxy.sds.thrift.TableInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, createTable_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTable_resultTupleSchemeFactory implements SchemeFactory {
public createTable_resultTupleScheme getScheme() {
return new createTable_resultTupleScheme();
}
}
private static class createTable_resultTupleScheme extends TupleScheme<createTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, createTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, createTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new com.xiaomi.infra.galaxy.sds.thrift.TableInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class dropTable_args implements libthrift091.TBase<dropTable_args, dropTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<dropTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("dropTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new dropTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new dropTable_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(dropTable_args.class, metaDataMap);
}
public dropTable_args() {
}
public dropTable_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public dropTable_args(dropTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public dropTable_args deepCopy() {
return new dropTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public dropTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof dropTable_args)
return this.equals((dropTable_args)that);
return false;
}
public boolean equals(dropTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(dropTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("dropTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 dropTable_argsStandardSchemeFactory implements SchemeFactory {
public dropTable_argsStandardScheme getScheme() {
return new dropTable_argsStandardScheme();
}
}
private static class dropTable_argsStandardScheme extends StandardScheme<dropTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, dropTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, dropTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class dropTable_argsTupleSchemeFactory implements SchemeFactory {
public dropTable_argsTupleScheme getScheme() {
return new dropTable_argsTupleScheme();
}
}
private static class dropTable_argsTupleScheme extends TupleScheme<dropTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, dropTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, dropTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class dropTable_result implements libthrift091.TBase<dropTable_result, dropTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<dropTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("dropTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new dropTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new dropTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(dropTable_result.class, metaDataMap);
}
public dropTable_result() {
}
public dropTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public dropTable_result(dropTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public dropTable_result deepCopy() {
return new dropTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public dropTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof dropTable_result)
return this.equals((dropTable_result)that);
return false;
}
public boolean equals(dropTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(dropTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("dropTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 dropTable_resultStandardSchemeFactory implements SchemeFactory {
public dropTable_resultStandardScheme getScheme() {
return new dropTable_resultStandardScheme();
}
}
private static class dropTable_resultStandardScheme extends StandardScheme<dropTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, dropTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, dropTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class dropTable_resultTupleSchemeFactory implements SchemeFactory {
public dropTable_resultTupleScheme getScheme() {
return new dropTable_resultTupleScheme();
}
}
private static class dropTable_resultTupleScheme extends TupleScheme<dropTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, dropTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, dropTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class alterTable_args implements libthrift091.TBase<alterTable_args, alterTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<alterTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("alterTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField TABLE_SPEC_FIELD_DESC = new libthrift091.protocol.TField("tableSpec", libthrift091.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new alterTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new alterTable_argsTupleSchemeFactory());
}
public String tableName; // required
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
TABLE_SPEC((short)2, "tableSpec");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // TABLE_SPEC
return TABLE_SPEC;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_SPEC, new libthrift091.meta_data.FieldMetaData("tableSpec", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, com.xiaomi.infra.galaxy.sds.thrift.TableSpec.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(alterTable_args.class, metaDataMap);
}
public alterTable_args() {
}
public alterTable_args(
String tableName,
com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec)
{
this();
this.tableName = tableName;
this.tableSpec = tableSpec;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public alterTable_args(alterTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetTableSpec()) {
this.tableSpec = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec(other.tableSpec);
}
}
public alterTable_args deepCopy() {
return new alterTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.tableSpec = null;
}
public String getTableName() {
return this.tableName;
}
public alterTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec getTableSpec() {
return this.tableSpec;
}
public alterTable_args setTableSpec(com.xiaomi.infra.galaxy.sds.thrift.TableSpec tableSpec) {
this.tableSpec = tableSpec;
return this;
}
public void unsetTableSpec() {
this.tableSpec = null;
}
/** Returns true if field tableSpec is set (has been assigned a value) and false otherwise */
public boolean isSetTableSpec() {
return this.tableSpec != null;
}
public void setTableSpecIsSet(boolean value) {
if (!value) {
this.tableSpec = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case TABLE_SPEC:
if (value == null) {
unsetTableSpec();
} else {
setTableSpec((com.xiaomi.infra.galaxy.sds.thrift.TableSpec)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case TABLE_SPEC:
return getTableSpec();
}
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 TABLE_NAME:
return isSetTableName();
case TABLE_SPEC:
return isSetTableSpec();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof alterTable_args)
return this.equals((alterTable_args)that);
return false;
}
public boolean equals(alterTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_tableSpec = true && this.isSetTableSpec();
boolean that_present_tableSpec = true && that.isSetTableSpec();
if (this_present_tableSpec || that_present_tableSpec) {
if (!(this_present_tableSpec && that_present_tableSpec))
return false;
if (!this.tableSpec.equals(that.tableSpec))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_tableSpec = true && (isSetTableSpec());
list.add(present_tableSpec);
if (present_tableSpec)
list.add(tableSpec);
return list.hashCode();
}
@Override
public int compareTo(alterTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTableSpec()).compareTo(other.isSetTableSpec());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableSpec()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableSpec, other.tableSpec);
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("alterTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("tableSpec:");
if (this.tableSpec == null) {
sb.append("null");
} else {
sb.append(this.tableSpec);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (tableSpec != null) {
tableSpec.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 alterTable_argsStandardSchemeFactory implements SchemeFactory {
public alterTable_argsStandardScheme getScheme() {
return new alterTable_argsStandardScheme();
}
}
private static class alterTable_argsStandardScheme extends StandardScheme<alterTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, alterTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TABLE_SPEC
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.tableSpec = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec();
struct.tableSpec.read(iprot);
struct.setTableSpecIsSet(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, alterTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.tableSpec != null) {
oprot.writeFieldBegin(TABLE_SPEC_FIELD_DESC);
struct.tableSpec.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class alterTable_argsTupleSchemeFactory implements SchemeFactory {
public alterTable_argsTupleScheme getScheme() {
return new alterTable_argsTupleScheme();
}
}
private static class alterTable_argsTupleScheme extends TupleScheme<alterTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, alterTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetTableSpec()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetTableSpec()) {
struct.tableSpec.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, alterTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.tableSpec = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec();
struct.tableSpec.read(iprot);
struct.setTableSpecIsSet(true);
}
}
}
}
public static class alterTable_result implements libthrift091.TBase<alterTable_result, alterTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<alterTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("alterTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new alterTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new alterTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(alterTable_result.class, metaDataMap);
}
public alterTable_result() {
}
public alterTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public alterTable_result(alterTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public alterTable_result deepCopy() {
return new alterTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public alterTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof alterTable_result)
return this.equals((alterTable_result)that);
return false;
}
public boolean equals(alterTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(alterTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("alterTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 alterTable_resultStandardSchemeFactory implements SchemeFactory {
public alterTable_resultStandardScheme getScheme() {
return new alterTable_resultStandardScheme();
}
}
private static class alterTable_resultStandardScheme extends StandardScheme<alterTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, alterTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, alterTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class alterTable_resultTupleSchemeFactory implements SchemeFactory {
public alterTable_resultTupleScheme getScheme() {
return new alterTable_resultTupleScheme();
}
}
private static class alterTable_resultTupleScheme extends TupleScheme<alterTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, alterTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, alterTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class cloneTable_args implements libthrift091.TBase<cloneTable_args, cloneTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<cloneTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("cloneTable_args");
private static final libthrift091.protocol.TField SRC_TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("srcTableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("destTableName", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField FLUSH_TABLE_FIELD_DESC = new libthrift091.protocol.TField("flushTable", libthrift091.protocol.TType.BOOL, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new cloneTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new cloneTable_argsTupleSchemeFactory());
}
public String srcTableName; // required
public String destTableName; // required
public boolean flushTable; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SRC_TABLE_NAME((short)1, "srcTableName"),
DEST_TABLE_NAME((short)2, "destTableName"),
FLUSH_TABLE((short)3, "flushTable");
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: // SRC_TABLE_NAME
return SRC_TABLE_NAME;
case 2: // DEST_TABLE_NAME
return DEST_TABLE_NAME;
case 3: // FLUSH_TABLE
return FLUSH_TABLE;
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 __FLUSHTABLE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.SRC_TABLE_NAME, new libthrift091.meta_data.FieldMetaData("srcTableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.DEST_TABLE_NAME, new libthrift091.meta_data.FieldMetaData("destTableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.FLUSH_TABLE, new libthrift091.meta_data.FieldMetaData("flushTable", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(cloneTable_args.class, metaDataMap);
}
public cloneTable_args() {
}
public cloneTable_args(
String srcTableName,
String destTableName,
boolean flushTable)
{
this();
this.srcTableName = srcTableName;
this.destTableName = destTableName;
this.flushTable = flushTable;
setFlushTableIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cloneTable_args(cloneTable_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetSrcTableName()) {
this.srcTableName = other.srcTableName;
}
if (other.isSetDestTableName()) {
this.destTableName = other.destTableName;
}
this.flushTable = other.flushTable;
}
public cloneTable_args deepCopy() {
return new cloneTable_args(this);
}
@Override
public void clear() {
this.srcTableName = null;
this.destTableName = null;
setFlushTableIsSet(false);
this.flushTable = false;
}
public String getSrcTableName() {
return this.srcTableName;
}
public cloneTable_args setSrcTableName(String srcTableName) {
this.srcTableName = srcTableName;
return this;
}
public void unsetSrcTableName() {
this.srcTableName = null;
}
/** Returns true if field srcTableName is set (has been assigned a value) and false otherwise */
public boolean isSetSrcTableName() {
return this.srcTableName != null;
}
public void setSrcTableNameIsSet(boolean value) {
if (!value) {
this.srcTableName = null;
}
}
public String getDestTableName() {
return this.destTableName;
}
public cloneTable_args setDestTableName(String destTableName) {
this.destTableName = destTableName;
return this;
}
public void unsetDestTableName() {
this.destTableName = null;
}
/** Returns true if field destTableName is set (has been assigned a value) and false otherwise */
public boolean isSetDestTableName() {
return this.destTableName != null;
}
public void setDestTableNameIsSet(boolean value) {
if (!value) {
this.destTableName = null;
}
}
public boolean isFlushTable() {
return this.flushTable;
}
public cloneTable_args setFlushTable(boolean flushTable) {
this.flushTable = flushTable;
setFlushTableIsSet(true);
return this;
}
public void unsetFlushTable() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FLUSHTABLE_ISSET_ID);
}
/** Returns true if field flushTable is set (has been assigned a value) and false otherwise */
public boolean isSetFlushTable() {
return EncodingUtils.testBit(__isset_bitfield, __FLUSHTABLE_ISSET_ID);
}
public void setFlushTableIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FLUSHTABLE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SRC_TABLE_NAME:
if (value == null) {
unsetSrcTableName();
} else {
setSrcTableName((String)value);
}
break;
case DEST_TABLE_NAME:
if (value == null) {
unsetDestTableName();
} else {
setDestTableName((String)value);
}
break;
case FLUSH_TABLE:
if (value == null) {
unsetFlushTable();
} else {
setFlushTable((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SRC_TABLE_NAME:
return getSrcTableName();
case DEST_TABLE_NAME:
return getDestTableName();
case FLUSH_TABLE:
return Boolean.valueOf(isFlushTable());
}
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 SRC_TABLE_NAME:
return isSetSrcTableName();
case DEST_TABLE_NAME:
return isSetDestTableName();
case FLUSH_TABLE:
return isSetFlushTable();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof cloneTable_args)
return this.equals((cloneTable_args)that);
return false;
}
public boolean equals(cloneTable_args that) {
if (that == null)
return false;
boolean this_present_srcTableName = true && this.isSetSrcTableName();
boolean that_present_srcTableName = true && that.isSetSrcTableName();
if (this_present_srcTableName || that_present_srcTableName) {
if (!(this_present_srcTableName && that_present_srcTableName))
return false;
if (!this.srcTableName.equals(that.srcTableName))
return false;
}
boolean this_present_destTableName = true && this.isSetDestTableName();
boolean that_present_destTableName = true && that.isSetDestTableName();
if (this_present_destTableName || that_present_destTableName) {
if (!(this_present_destTableName && that_present_destTableName))
return false;
if (!this.destTableName.equals(that.destTableName))
return false;
}
boolean this_present_flushTable = true;
boolean that_present_flushTable = true;
if (this_present_flushTable || that_present_flushTable) {
if (!(this_present_flushTable && that_present_flushTable))
return false;
if (this.flushTable != that.flushTable)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_srcTableName = true && (isSetSrcTableName());
list.add(present_srcTableName);
if (present_srcTableName)
list.add(srcTableName);
boolean present_destTableName = true && (isSetDestTableName());
list.add(present_destTableName);
if (present_destTableName)
list.add(destTableName);
boolean present_flushTable = true;
list.add(present_flushTable);
if (present_flushTable)
list.add(flushTable);
return list.hashCode();
}
@Override
public int compareTo(cloneTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSrcTableName()).compareTo(other.isSetSrcTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSrcTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.srcTableName, other.srcTableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDestTableName()).compareTo(other.isSetDestTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDestTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.destTableName, other.destTableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFlushTable()).compareTo(other.isSetFlushTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFlushTable()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.flushTable, other.flushTable);
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("cloneTable_args(");
boolean first = true;
sb.append("srcTableName:");
if (this.srcTableName == null) {
sb.append("null");
} else {
sb.append(this.srcTableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("destTableName:");
if (this.destTableName == null) {
sb.append("null");
} else {
sb.append(this.destTableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("flushTable:");
sb.append(this.flushTable);
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class cloneTable_argsStandardSchemeFactory implements SchemeFactory {
public cloneTable_argsStandardScheme getScheme() {
return new cloneTable_argsStandardScheme();
}
}
private static class cloneTable_argsStandardScheme extends StandardScheme<cloneTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, cloneTable_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: // SRC_TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.srcTableName = iprot.readString();
struct.setSrcTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DEST_TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.destTableName = iprot.readString();
struct.setDestTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FLUSH_TABLE
if (schemeField.type == libthrift091.protocol.TType.BOOL) {
struct.flushTable = iprot.readBool();
struct.setFlushTableIsSet(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, cloneTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.srcTableName != null) {
oprot.writeFieldBegin(SRC_TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.srcTableName);
oprot.writeFieldEnd();
}
if (struct.destTableName != null) {
oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.destTableName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(FLUSH_TABLE_FIELD_DESC);
oprot.writeBool(struct.flushTable);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class cloneTable_argsTupleSchemeFactory implements SchemeFactory {
public cloneTable_argsTupleScheme getScheme() {
return new cloneTable_argsTupleScheme();
}
}
private static class cloneTable_argsTupleScheme extends TupleScheme<cloneTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, cloneTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSrcTableName()) {
optionals.set(0);
}
if (struct.isSetDestTableName()) {
optionals.set(1);
}
if (struct.isSetFlushTable()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSrcTableName()) {
oprot.writeString(struct.srcTableName);
}
if (struct.isSetDestTableName()) {
oprot.writeString(struct.destTableName);
}
if (struct.isSetFlushTable()) {
oprot.writeBool(struct.flushTable);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, cloneTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.srcTableName = iprot.readString();
struct.setSrcTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.destTableName = iprot.readString();
struct.setDestTableNameIsSet(true);
}
if (incoming.get(2)) {
struct.flushTable = iprot.readBool();
struct.setFlushTableIsSet(true);
}
}
}
}
public static class cloneTable_result implements libthrift091.TBase<cloneTable_result, cloneTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<cloneTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("cloneTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new cloneTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new cloneTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(cloneTable_result.class, metaDataMap);
}
public cloneTable_result() {
}
public cloneTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cloneTable_result(cloneTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public cloneTable_result deepCopy() {
return new cloneTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public cloneTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof cloneTable_result)
return this.equals((cloneTable_result)that);
return false;
}
public boolean equals(cloneTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(cloneTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("cloneTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 cloneTable_resultStandardSchemeFactory implements SchemeFactory {
public cloneTable_resultStandardScheme getScheme() {
return new cloneTable_resultStandardScheme();
}
}
private static class cloneTable_resultStandardScheme extends StandardScheme<cloneTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, cloneTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, cloneTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class cloneTable_resultTupleSchemeFactory implements SchemeFactory {
public cloneTable_resultTupleScheme getScheme() {
return new cloneTable_resultTupleScheme();
}
}
private static class cloneTable_resultTupleScheme extends TupleScheme<cloneTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, cloneTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, cloneTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class disableTable_args implements libthrift091.TBase<disableTable_args, disableTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<disableTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("disableTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new disableTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableTable_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap);
}
public disableTable_args() {
}
public disableTable_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public disableTable_args(disableTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public disableTable_args deepCopy() {
return new disableTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public disableTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof disableTable_args)
return this.equals((disableTable_args)that);
return false;
}
public boolean equals(disableTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(disableTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("disableTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 disableTable_argsStandardSchemeFactory implements SchemeFactory {
public disableTable_argsStandardScheme getScheme() {
return new disableTable_argsStandardScheme();
}
}
private static class disableTable_argsStandardScheme extends StandardScheme<disableTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, disableTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, disableTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class disableTable_argsTupleSchemeFactory implements SchemeFactory {
public disableTable_argsTupleScheme getScheme() {
return new disableTable_argsTupleScheme();
}
}
private static class disableTable_argsTupleScheme extends TupleScheme<disableTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, disableTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, disableTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class disableTable_result implements libthrift091.TBase<disableTable_result, disableTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<disableTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("disableTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new disableTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap);
}
public disableTable_result() {
}
public disableTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public disableTable_result(disableTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public disableTable_result deepCopy() {
return new disableTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public disableTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof disableTable_result)
return this.equals((disableTable_result)that);
return false;
}
public boolean equals(disableTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(disableTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("disableTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 disableTable_resultStandardSchemeFactory implements SchemeFactory {
public disableTable_resultStandardScheme getScheme() {
return new disableTable_resultStandardScheme();
}
}
private static class disableTable_resultStandardScheme extends StandardScheme<disableTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, disableTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, disableTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class disableTable_resultTupleSchemeFactory implements SchemeFactory {
public disableTable_resultTupleScheme getScheme() {
return new disableTable_resultTupleScheme();
}
}
private static class disableTable_resultTupleScheme extends TupleScheme<disableTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, disableTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, disableTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class enableTable_args implements libthrift091.TBase<enableTable_args, enableTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<enableTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("enableTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new enableTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableTable_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_args.class, metaDataMap);
}
public enableTable_args() {
}
public enableTable_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public enableTable_args(enableTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public enableTable_args deepCopy() {
return new enableTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public enableTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof enableTable_args)
return this.equals((enableTable_args)that);
return false;
}
public boolean equals(enableTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(enableTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("enableTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 enableTable_argsStandardSchemeFactory implements SchemeFactory {
public enableTable_argsStandardScheme getScheme() {
return new enableTable_argsStandardScheme();
}
}
private static class enableTable_argsStandardScheme extends StandardScheme<enableTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, enableTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, enableTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class enableTable_argsTupleSchemeFactory implements SchemeFactory {
public enableTable_argsTupleScheme getScheme() {
return new enableTable_argsTupleScheme();
}
}
private static class enableTable_argsTupleScheme extends TupleScheme<enableTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, enableTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, enableTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class enableTable_result implements libthrift091.TBase<enableTable_result, enableTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<enableTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("enableTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new enableTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_result.class, metaDataMap);
}
public enableTable_result() {
}
public enableTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public enableTable_result(enableTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public enableTable_result deepCopy() {
return new enableTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public enableTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof enableTable_result)
return this.equals((enableTable_result)that);
return false;
}
public boolean equals(enableTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(enableTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("enableTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 enableTable_resultStandardSchemeFactory implements SchemeFactory {
public enableTable_resultStandardScheme getScheme() {
return new enableTable_resultStandardScheme();
}
}
private static class enableTable_resultStandardScheme extends StandardScheme<enableTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, enableTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, enableTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class enableTable_resultTupleSchemeFactory implements SchemeFactory {
public enableTable_resultTupleScheme getScheme() {
return new enableTable_resultTupleScheme();
}
}
private static class enableTable_resultTupleScheme extends TupleScheme<enableTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, enableTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, enableTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class describeTable_args implements libthrift091.TBase<describeTable_args, describeTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<describeTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new describeTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new describeTable_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeTable_args.class, metaDataMap);
}
public describeTable_args() {
}
public describeTable_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public describeTable_args(describeTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public describeTable_args deepCopy() {
return new describeTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public describeTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof describeTable_args)
return this.equals((describeTable_args)that);
return false;
}
public boolean equals(describeTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(describeTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("describeTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 describeTable_argsStandardSchemeFactory implements SchemeFactory {
public describeTable_argsStandardScheme getScheme() {
return new describeTable_argsStandardScheme();
}
}
private static class describeTable_argsStandardScheme extends StandardScheme<describeTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, describeTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, describeTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class describeTable_argsTupleSchemeFactory implements SchemeFactory {
public describeTable_argsTupleScheme getScheme() {
return new describeTable_argsTupleScheme();
}
}
private static class describeTable_argsTupleScheme extends TupleScheme<describeTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, describeTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, describeTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class describeTable_result implements libthrift091.TBase<describeTable_result, describeTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<describeTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeTable_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new describeTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new describeTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, com.xiaomi.infra.galaxy.sds.thrift.TableSpec.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeTable_result.class, metaDataMap);
}
public describeTable_result() {
}
public describeTable_result(
com.xiaomi.infra.galaxy.sds.thrift.TableSpec success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public describeTable_result(describeTable_result other) {
if (other.isSetSuccess()) {
this.success = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public describeTable_result deepCopy() {
return new describeTable_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.TableSpec getSuccess() {
return this.success;
}
public describeTable_result setSuccess(com.xiaomi.infra.galaxy.sds.thrift.TableSpec 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public describeTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((com.xiaomi.infra.galaxy.sds.thrift.TableSpec)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof describeTable_result)
return this.equals((describeTable_result)that);
return false;
}
public boolean equals(describeTable_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(describeTable_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("describeTable_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 describeTable_resultStandardSchemeFactory implements SchemeFactory {
public describeTable_resultStandardScheme getScheme() {
return new describeTable_resultStandardScheme();
}
}
private static class describeTable_resultStandardScheme extends StandardScheme<describeTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, describeTable_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 com.xiaomi.infra.galaxy.sds.thrift.TableSpec();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, describeTable_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class describeTable_resultTupleSchemeFactory implements SchemeFactory {
public describeTable_resultTupleScheme getScheme() {
return new describeTable_resultTupleScheme();
}
}
private static class describeTable_resultTupleScheme extends TupleScheme<describeTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, describeTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, describeTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new com.xiaomi.infra.galaxy.sds.thrift.TableSpec();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getTableStatus_args implements libthrift091.TBase<getTableStatus_args, getTableStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTableStatus_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableStatus_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableStatus_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableStatus_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableStatus_args.class, metaDataMap);
}
public getTableStatus_args() {
}
public getTableStatus_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableStatus_args(getTableStatus_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public getTableStatus_args deepCopy() {
return new getTableStatus_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public getTableStatus_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableStatus_args)
return this.equals((getTableStatus_args)that);
return false;
}
public boolean equals(getTableStatus_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(getTableStatus_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("getTableStatus_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 getTableStatus_argsStandardSchemeFactory implements SchemeFactory {
public getTableStatus_argsStandardScheme getScheme() {
return new getTableStatus_argsStandardScheme();
}
}
private static class getTableStatus_argsStandardScheme extends StandardScheme<getTableStatus_args> {
public void read(libthrift091.protocol.TProtocol iprot, getTableStatus_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, getTableStatus_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableStatus_argsTupleSchemeFactory implements SchemeFactory {
public getTableStatus_argsTupleScheme getScheme() {
return new getTableStatus_argsTupleScheme();
}
}
private static class getTableStatus_argsTupleScheme extends TupleScheme<getTableStatus_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableStatus_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableStatus_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class getTableStatus_result implements libthrift091.TBase<getTableStatus_result, getTableStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTableStatus_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableStatus_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableStatus_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableStatus_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.TableStatus success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, com.xiaomi.infra.galaxy.sds.thrift.TableStatus.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableStatus_result.class, metaDataMap);
}
public getTableStatus_result() {
}
public getTableStatus_result(
com.xiaomi.infra.galaxy.sds.thrift.TableStatus success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableStatus_result(getTableStatus_result other) {
if (other.isSetSuccess()) {
this.success = new com.xiaomi.infra.galaxy.sds.thrift.TableStatus(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getTableStatus_result deepCopy() {
return new getTableStatus_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.TableStatus getSuccess() {
return this.success;
}
public getTableStatus_result setSuccess(com.xiaomi.infra.galaxy.sds.thrift.TableStatus 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getTableStatus_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((com.xiaomi.infra.galaxy.sds.thrift.TableStatus)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableStatus_result)
return this.equals((getTableStatus_result)that);
return false;
}
public boolean equals(getTableStatus_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getTableStatus_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getTableStatus_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getTableStatus_resultStandardSchemeFactory implements SchemeFactory {
public getTableStatus_resultStandardScheme getScheme() {
return new getTableStatus_resultStandardScheme();
}
}
private static class getTableStatus_resultStandardScheme extends StandardScheme<getTableStatus_result> {
public void read(libthrift091.protocol.TProtocol iprot, getTableStatus_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 com.xiaomi.infra.galaxy.sds.thrift.TableStatus();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getTableStatus_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableStatus_resultTupleSchemeFactory implements SchemeFactory {
public getTableStatus_resultTupleScheme getScheme() {
return new getTableStatus_resultTupleScheme();
}
}
private static class getTableStatus_resultTupleScheme extends TupleScheme<getTableStatus_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableStatus_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableStatus_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new com.xiaomi.infra.galaxy.sds.thrift.TableStatus();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getTableState_args implements libthrift091.TBase<getTableState_args, getTableState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTableState_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableState_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableState_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableState_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableState_args.class, metaDataMap);
}
public getTableState_args() {
}
public getTableState_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableState_args(getTableState_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public getTableState_args deepCopy() {
return new getTableState_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public getTableState_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableState_args)
return this.equals((getTableState_args)that);
return false;
}
public boolean equals(getTableState_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(getTableState_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("getTableState_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 getTableState_argsStandardSchemeFactory implements SchemeFactory {
public getTableState_argsStandardScheme getScheme() {
return new getTableState_argsStandardScheme();
}
}
private static class getTableState_argsStandardScheme extends StandardScheme<getTableState_args> {
public void read(libthrift091.protocol.TProtocol iprot, getTableState_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, getTableState_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableState_argsTupleSchemeFactory implements SchemeFactory {
public getTableState_argsTupleScheme getScheme() {
return new getTableState_argsTupleScheme();
}
}
private static class getTableState_argsTupleScheme extends TupleScheme<getTableState_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableState_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableState_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class getTableState_result implements libthrift091.TBase<getTableState_result, getTableState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTableState_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableState_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.I32, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableState_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableState_resultTupleSchemeFactory());
}
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.TableState
*/
public com.xiaomi.infra.galaxy.sds.thrift.TableState success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.TableState
*/
SUCCESS((short)0, "success"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.EnumMetaData(libthrift091.protocol.TType.ENUM, com.xiaomi.infra.galaxy.sds.thrift.TableState.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableState_result.class, metaDataMap);
}
public getTableState_result() {
}
public getTableState_result(
com.xiaomi.infra.galaxy.sds.thrift.TableState success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableState_result(getTableState_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getTableState_result deepCopy() {
return new getTableState_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.TableState
*/
public com.xiaomi.infra.galaxy.sds.thrift.TableState getSuccess() {
return this.success;
}
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.TableState
*/
public getTableState_result setSuccess(com.xiaomi.infra.galaxy.sds.thrift.TableState 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getTableState_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((com.xiaomi.infra.galaxy.sds.thrift.TableState)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableState_result)
return this.equals((getTableState_result)that);
return false;
}
public boolean equals(getTableState_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success.getValue());
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getTableState_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getTableState_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getTableState_resultStandardSchemeFactory implements SchemeFactory {
public getTableState_resultStandardScheme getScheme() {
return new getTableState_resultStandardScheme();
}
}
private static class getTableState_resultStandardScheme extends StandardScheme<getTableState_result> {
public void read(libthrift091.protocol.TProtocol iprot, getTableState_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.I32) {
struct.success = com.xiaomi.infra.galaxy.sds.thrift.TableState.findByValue(iprot.readI32());
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getTableState_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success.getValue());
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableState_resultTupleSchemeFactory implements SchemeFactory {
public getTableState_resultTupleScheme getScheme() {
return new getTableState_resultTupleScheme();
}
}
private static class getTableState_resultTupleScheme extends TupleScheme<getTableState_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableState_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeI32(struct.success.getValue());
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableState_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = com.xiaomi.infra.galaxy.sds.thrift.TableState.findByValue(iprot.readI32());
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getTableSplits_args implements libthrift091.TBase<getTableSplits_args, getTableSplits_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTableSplits_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableSplits_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField START_KEY_FIELD_DESC = new libthrift091.protocol.TField("startKey", libthrift091.protocol.TType.MAP, (short)2);
private static final libthrift091.protocol.TField STOP_KEY_FIELD_DESC = new libthrift091.protocol.TField("stopKey", libthrift091.protocol.TType.MAP, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableSplits_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableSplits_argsTupleSchemeFactory());
}
public String tableName; // required
public Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey; // required
public Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
START_KEY((short)2, "startKey"),
STOP_KEY((short)3, "stopKey");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // START_KEY
return START_KEY;
case 3: // STOP_KEY
return STOP_KEY;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.START_KEY, new libthrift091.meta_data.FieldMetaData("startKey", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.MAP , "Dictionary")));
tmpMap.put(_Fields.STOP_KEY, new libthrift091.meta_data.FieldMetaData("stopKey", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.MAP , "Dictionary")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableSplits_args.class, metaDataMap);
}
public getTableSplits_args() {
}
public getTableSplits_args(
String tableName,
Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey,
Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey)
{
this();
this.tableName = tableName;
this.startKey = startKey;
this.stopKey = stopKey;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableSplits_args(getTableSplits_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetStartKey()) {
this.startKey = other.startKey;
}
if (other.isSetStopKey()) {
this.stopKey = other.stopKey;
}
}
public getTableSplits_args deepCopy() {
return new getTableSplits_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.startKey = null;
this.stopKey = null;
}
public String getTableName() {
return this.tableName;
}
public getTableSplits_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getStartKeySize() {
return (this.startKey == null) ? 0 : this.startKey.size();
}
public void putToStartKey(String key, com.xiaomi.infra.galaxy.sds.thrift.Datum val) {
if (this.startKey == null) {
this.startKey = new HashMap<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>();
}
this.startKey.put(key, val);
}
public Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> getStartKey() {
return this.startKey;
}
public getTableSplits_args setStartKey(Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> startKey) {
this.startKey = startKey;
return this;
}
public void unsetStartKey() {
this.startKey = null;
}
/** Returns true if field startKey is set (has been assigned a value) and false otherwise */
public boolean isSetStartKey() {
return this.startKey != null;
}
public void setStartKeyIsSet(boolean value) {
if (!value) {
this.startKey = null;
}
}
public int getStopKeySize() {
return (this.stopKey == null) ? 0 : this.stopKey.size();
}
public void putToStopKey(String key, com.xiaomi.infra.galaxy.sds.thrift.Datum val) {
if (this.stopKey == null) {
this.stopKey = new HashMap<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>();
}
this.stopKey.put(key, val);
}
public Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> getStopKey() {
return this.stopKey;
}
public getTableSplits_args setStopKey(Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum> stopKey) {
this.stopKey = stopKey;
return this;
}
public void unsetStopKey() {
this.stopKey = null;
}
/** Returns true if field stopKey is set (has been assigned a value) and false otherwise */
public boolean isSetStopKey() {
return this.stopKey != null;
}
public void setStopKeyIsSet(boolean value) {
if (!value) {
this.stopKey = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case START_KEY:
if (value == null) {
unsetStartKey();
} else {
setStartKey((Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>)value);
}
break;
case STOP_KEY:
if (value == null) {
unsetStopKey();
} else {
setStopKey((Map<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_KEY:
return getStartKey();
case STOP_KEY:
return getStopKey();
}
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 TABLE_NAME:
return isSetTableName();
case START_KEY:
return isSetStartKey();
case STOP_KEY:
return isSetStopKey();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableSplits_args)
return this.equals((getTableSplits_args)that);
return false;
}
public boolean equals(getTableSplits_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startKey = true && this.isSetStartKey();
boolean that_present_startKey = true && that.isSetStartKey();
if (this_present_startKey || that_present_startKey) {
if (!(this_present_startKey && that_present_startKey))
return false;
if (!this.startKey.equals(that.startKey))
return false;
}
boolean this_present_stopKey = true && this.isSetStopKey();
boolean that_present_stopKey = true && that.isSetStopKey();
if (this_present_stopKey || that_present_stopKey) {
if (!(this_present_stopKey && that_present_stopKey))
return false;
if (!this.stopKey.equals(that.stopKey))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_startKey = true && (isSetStartKey());
list.add(present_startKey);
if (present_startKey)
list.add(startKey);
boolean present_stopKey = true && (isSetStopKey());
list.add(present_stopKey);
if (present_stopKey)
list.add(stopKey);
return list.hashCode();
}
@Override
public int compareTo(getTableSplits_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartKey()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.startKey, other.startKey);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStopKey()).compareTo(other.isSetStopKey());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStopKey()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.stopKey, other.stopKey);
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("getTableSplits_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startKey:");
if (this.startKey == null) {
sb.append("null");
} else {
sb.append(this.startKey);
}
first = false;
if (!first) sb.append(", ");
sb.append("stopKey:");
if (this.stopKey == null) {
sb.append("null");
} else {
sb.append(this.stopKey);
}
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 getTableSplits_argsStandardSchemeFactory implements SchemeFactory {
public getTableSplits_argsStandardScheme getScheme() {
return new getTableSplits_argsStandardScheme();
}
}
private static class getTableSplits_argsStandardScheme extends StandardScheme<getTableSplits_args> {
public void read(libthrift091.protocol.TProtocol iprot, getTableSplits_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_KEY
if (schemeField.type == libthrift091.protocol.TType.MAP) {
{
libthrift091.protocol.TMap _map86 = iprot.readMapBegin();
struct.startKey = new HashMap<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>(2*_map86.size);
String _key87;
com.xiaomi.infra.galaxy.sds.thrift.Datum _val88;
for (int _i89 = 0; _i89 < _map86.size; ++_i89)
{
_key87 = iprot.readString();
_val88 = new com.xiaomi.infra.galaxy.sds.thrift.Datum();
_val88.read(iprot);
struct.startKey.put(_key87, _val88);
}
iprot.readMapEnd();
}
struct.setStartKeyIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STOP_KEY
if (schemeField.type == libthrift091.protocol.TType.MAP) {
{
libthrift091.protocol.TMap _map90 = iprot.readMapBegin();
struct.stopKey = new HashMap<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>(2*_map90.size);
String _key91;
com.xiaomi.infra.galaxy.sds.thrift.Datum _val92;
for (int _i93 = 0; _i93 < _map90.size; ++_i93)
{
_key91 = iprot.readString();
_val92 = new com.xiaomi.infra.galaxy.sds.thrift.Datum();
_val92.read(iprot);
struct.stopKey.put(_key91, _val92);
}
iprot.readMapEnd();
}
struct.setStopKeyIsSet(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, getTableSplits_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.startKey != null) {
oprot.writeFieldBegin(START_KEY_FIELD_DESC);
{
oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, struct.startKey.size()));
for (Map.Entry<String, com.xiaomi.infra.galaxy.sds.thrift.Datum> _iter94 : struct.startKey.entrySet())
{
oprot.writeString(_iter94.getKey());
_iter94.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (struct.stopKey != null) {
oprot.writeFieldBegin(STOP_KEY_FIELD_DESC);
{
oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, struct.stopKey.size()));
for (Map.Entry<String, com.xiaomi.infra.galaxy.sds.thrift.Datum> _iter95 : struct.stopKey.entrySet())
{
oprot.writeString(_iter95.getKey());
_iter95.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableSplits_argsTupleSchemeFactory implements SchemeFactory {
public getTableSplits_argsTupleScheme getScheme() {
return new getTableSplits_argsTupleScheme();
}
}
private static class getTableSplits_argsTupleScheme extends TupleScheme<getTableSplits_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableSplits_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartKey()) {
optionals.set(1);
}
if (struct.isSetStopKey()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetStartKey()) {
{
oprot.writeI32(struct.startKey.size());
for (Map.Entry<String, com.xiaomi.infra.galaxy.sds.thrift.Datum> _iter96 : struct.startKey.entrySet())
{
oprot.writeString(_iter96.getKey());
_iter96.getValue().write(oprot);
}
}
}
if (struct.isSetStopKey()) {
{
oprot.writeI32(struct.stopKey.size());
for (Map.Entry<String, com.xiaomi.infra.galaxy.sds.thrift.Datum> _iter97 : struct.stopKey.entrySet())
{
oprot.writeString(_iter97.getKey());
_iter97.getValue().write(oprot);
}
}
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableSplits_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
libthrift091.protocol.TMap _map98 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.startKey = new HashMap<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>(2*_map98.size);
String _key99;
com.xiaomi.infra.galaxy.sds.thrift.Datum _val100;
for (int _i101 = 0; _i101 < _map98.size; ++_i101)
{
_key99 = iprot.readString();
_val100 = new com.xiaomi.infra.galaxy.sds.thrift.Datum();
_val100.read(iprot);
struct.startKey.put(_key99, _val100);
}
}
struct.setStartKeyIsSet(true);
}
if (incoming.get(2)) {
{
libthrift091.protocol.TMap _map102 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.stopKey = new HashMap<String,com.xiaomi.infra.galaxy.sds.thrift.Datum>(2*_map102.size);
String _key103;
com.xiaomi.infra.galaxy.sds.thrift.Datum _val104;
for (int _i105 = 0; _i105 < _map102.size; ++_i105)
{
_key103 = iprot.readString();
_val104 = new com.xiaomi.infra.galaxy.sds.thrift.Datum();
_val104.read(iprot);
struct.stopKey.put(_key103, _val104);
}
}
struct.setStopKeyIsSet(true);
}
}
}
}
public static class getTableSplits_result implements libthrift091.TBase<getTableSplits_result, getTableSplits_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTableSplits_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableSplits_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableSplits_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableSplits_resultTupleSchemeFactory());
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, com.xiaomi.infra.galaxy.sds.thrift.TableSplit.class))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableSplits_result.class, metaDataMap);
}
public getTableSplits_result() {
}
public getTableSplits_result(
List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableSplits_result(getTableSplits_result other) {
if (other.isSetSuccess()) {
List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> __this__success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>(other.success.size());
for (com.xiaomi.infra.galaxy.sds.thrift.TableSplit other_element : other.success) {
__this__success.add(new com.xiaomi.infra.galaxy.sds.thrift.TableSplit(other_element));
}
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getTableSplits_result deepCopy() {
return new getTableSplits_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(com.xiaomi.infra.galaxy.sds.thrift.TableSplit elem) {
if (this.success == null) {
this.success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>();
}
this.success.add(elem);
}
public List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> getSuccess() {
return this.success;
}
public getTableSplits_result setSuccess(List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getTableSplits_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableSplits_result)
return this.equals((getTableSplits_result)that);
return false;
}
public boolean equals(getTableSplits_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getTableSplits_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getTableSplits_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getTableSplits_resultStandardSchemeFactory implements SchemeFactory {
public getTableSplits_resultStandardScheme getScheme() {
return new getTableSplits_resultStandardScheme();
}
}
private static class getTableSplits_resultStandardScheme extends StandardScheme<getTableSplits_result> {
public void read(libthrift091.protocol.TProtocol iprot, getTableSplits_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.LIST) {
{
libthrift091.protocol.TList _list106 = iprot.readListBegin();
struct.success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>(_list106.size);
com.xiaomi.infra.galaxy.sds.thrift.TableSplit _elem107;
for (int _i108 = 0; _i108 < _list106.size; ++_i108)
{
_elem107 = new com.xiaomi.infra.galaxy.sds.thrift.TableSplit();
_elem107.read(iprot);
struct.success.add(_elem107);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getTableSplits_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (com.xiaomi.infra.galaxy.sds.thrift.TableSplit _iter109 : struct.success)
{
_iter109.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableSplits_resultTupleSchemeFactory implements SchemeFactory {
public getTableSplits_resultTupleScheme getScheme() {
return new getTableSplits_resultTupleScheme();
}
}
private static class getTableSplits_resultTupleScheme extends TupleScheme<getTableSplits_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableSplits_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (com.xiaomi.infra.galaxy.sds.thrift.TableSplit _iter110 : struct.success)
{
_iter110.write(oprot);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableSplits_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list111 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<com.xiaomi.infra.galaxy.sds.thrift.TableSplit>(_list111.size);
com.xiaomi.infra.galaxy.sds.thrift.TableSplit _elem112;
for (int _i113 = 0; _i113 < _list111.size; ++_i113)
{
_elem112 = new com.xiaomi.infra.galaxy.sds.thrift.TableSplit();
_elem112.read(iprot);
struct.success.add(_elem112);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class queryMetric_args implements libthrift091.TBase<queryMetric_args, queryMetric_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryMetric_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryMetric_args");
private static final libthrift091.protocol.TField QUERY_FIELD_DESC = new libthrift091.protocol.TField("query", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new queryMetric_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new queryMetric_argsTupleSchemeFactory());
}
public MetricQueryRequest query; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
QUERY((short)1, "query");
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: // QUERY
return QUERY;
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.QUERY, new libthrift091.meta_data.FieldMetaData("query", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, MetricQueryRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryMetric_args.class, metaDataMap);
}
public queryMetric_args() {
}
public queryMetric_args(
MetricQueryRequest query)
{
this();
this.query = query;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public queryMetric_args(queryMetric_args other) {
if (other.isSetQuery()) {
this.query = new MetricQueryRequest(other.query);
}
}
public queryMetric_args deepCopy() {
return new queryMetric_args(this);
}
@Override
public void clear() {
this.query = null;
}
public MetricQueryRequest getQuery() {
return this.query;
}
public queryMetric_args setQuery(MetricQueryRequest query) {
this.query = query;
return this;
}
public void unsetQuery() {
this.query = null;
}
/** Returns true if field query is set (has been assigned a value) and false otherwise */
public boolean isSetQuery() {
return this.query != null;
}
public void setQueryIsSet(boolean value) {
if (!value) {
this.query = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case QUERY:
if (value == null) {
unsetQuery();
} else {
setQuery((MetricQueryRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case QUERY:
return getQuery();
}
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 QUERY:
return isSetQuery();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof queryMetric_args)
return this.equals((queryMetric_args)that);
return false;
}
public boolean equals(queryMetric_args that) {
if (that == null)
return false;
boolean this_present_query = true && this.isSetQuery();
boolean that_present_query = true && that.isSetQuery();
if (this_present_query || that_present_query) {
if (!(this_present_query && that_present_query))
return false;
if (!this.query.equals(that.query))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_query = true && (isSetQuery());
list.add(present_query);
if (present_query)
list.add(query);
return list.hashCode();
}
@Override
public int compareTo(queryMetric_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQuery()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.query, other.query);
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("queryMetric_args(");
boolean first = true;
sb.append("query:");
if (this.query == null) {
sb.append("null");
} else {
sb.append(this.query);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (query != null) {
query.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 queryMetric_argsStandardSchemeFactory implements SchemeFactory {
public queryMetric_argsStandardScheme getScheme() {
return new queryMetric_argsStandardScheme();
}
}
private static class queryMetric_argsStandardScheme extends StandardScheme<queryMetric_args> {
public void read(libthrift091.protocol.TProtocol iprot, queryMetric_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: // QUERY
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.query = new MetricQueryRequest();
struct.query.read(iprot);
struct.setQueryIsSet(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, queryMetric_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.query != null) {
oprot.writeFieldBegin(QUERY_FIELD_DESC);
struct.query.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class queryMetric_argsTupleSchemeFactory implements SchemeFactory {
public queryMetric_argsTupleScheme getScheme() {
return new queryMetric_argsTupleScheme();
}
}
private static class queryMetric_argsTupleScheme extends TupleScheme<queryMetric_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, queryMetric_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetQuery()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetQuery()) {
struct.query.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, queryMetric_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.query = new MetricQueryRequest();
struct.query.read(iprot);
struct.setQueryIsSet(true);
}
}
}
}
public static class queryMetric_result implements libthrift091.TBase<queryMetric_result, queryMetric_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryMetric_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryMetric_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new queryMetric_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new queryMetric_resultTupleSchemeFactory());
}
public TimeSeriesData success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, TimeSeriesData.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryMetric_result.class, metaDataMap);
}
public queryMetric_result() {
}
public queryMetric_result(
TimeSeriesData success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public queryMetric_result(queryMetric_result other) {
if (other.isSetSuccess()) {
this.success = new TimeSeriesData(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public queryMetric_result deepCopy() {
return new queryMetric_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public TimeSeriesData getSuccess() {
return this.success;
}
public queryMetric_result setSuccess(TimeSeriesData 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public queryMetric_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TimeSeriesData)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof queryMetric_result)
return this.equals((queryMetric_result)that);
return false;
}
public boolean equals(queryMetric_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(queryMetric_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("queryMetric_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 queryMetric_resultStandardSchemeFactory implements SchemeFactory {
public queryMetric_resultStandardScheme getScheme() {
return new queryMetric_resultStandardScheme();
}
}
private static class queryMetric_resultStandardScheme extends StandardScheme<queryMetric_result> {
public void read(libthrift091.protocol.TProtocol iprot, queryMetric_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 TimeSeriesData();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, queryMetric_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class queryMetric_resultTupleSchemeFactory implements SchemeFactory {
public queryMetric_resultTupleScheme getScheme() {
return new queryMetric_resultTupleScheme();
}
}
private static class queryMetric_resultTupleScheme extends TupleScheme<queryMetric_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, queryMetric_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, queryMetric_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TimeSeriesData();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class queryMetrics_args implements libthrift091.TBase<queryMetrics_args, queryMetrics_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryMetrics_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryMetrics_args");
private static final libthrift091.protocol.TField QUERIES_FIELD_DESC = new libthrift091.protocol.TField("queries", libthrift091.protocol.TType.LIST, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new queryMetrics_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new queryMetrics_argsTupleSchemeFactory());
}
public List<MetricQueryRequest> queries; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
QUERIES((short)1, "queries");
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: // QUERIES
return QUERIES;
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.QUERIES, new libthrift091.meta_data.FieldMetaData("queries", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, MetricQueryRequest.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryMetrics_args.class, metaDataMap);
}
public queryMetrics_args() {
}
public queryMetrics_args(
List<MetricQueryRequest> queries)
{
this();
this.queries = queries;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public queryMetrics_args(queryMetrics_args other) {
if (other.isSetQueries()) {
List<MetricQueryRequest> __this__queries = new ArrayList<MetricQueryRequest>(other.queries.size());
for (MetricQueryRequest other_element : other.queries) {
__this__queries.add(new MetricQueryRequest(other_element));
}
this.queries = __this__queries;
}
}
public queryMetrics_args deepCopy() {
return new queryMetrics_args(this);
}
@Override
public void clear() {
this.queries = null;
}
public int getQueriesSize() {
return (this.queries == null) ? 0 : this.queries.size();
}
public java.util.Iterator<MetricQueryRequest> getQueriesIterator() {
return (this.queries == null) ? null : this.queries.iterator();
}
public void addToQueries(MetricQueryRequest elem) {
if (this.queries == null) {
this.queries = new ArrayList<MetricQueryRequest>();
}
this.queries.add(elem);
}
public List<MetricQueryRequest> getQueries() {
return this.queries;
}
public queryMetrics_args setQueries(List<MetricQueryRequest> queries) {
this.queries = queries;
return this;
}
public void unsetQueries() {
this.queries = null;
}
/** Returns true if field queries is set (has been assigned a value) and false otherwise */
public boolean isSetQueries() {
return this.queries != null;
}
public void setQueriesIsSet(boolean value) {
if (!value) {
this.queries = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case QUERIES:
if (value == null) {
unsetQueries();
} else {
setQueries((List<MetricQueryRequest>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case QUERIES:
return getQueries();
}
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 QUERIES:
return isSetQueries();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof queryMetrics_args)
return this.equals((queryMetrics_args)that);
return false;
}
public boolean equals(queryMetrics_args that) {
if (that == null)
return false;
boolean this_present_queries = true && this.isSetQueries();
boolean that_present_queries = true && that.isSetQueries();
if (this_present_queries || that_present_queries) {
if (!(this_present_queries && that_present_queries))
return false;
if (!this.queries.equals(that.queries))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_queries = true && (isSetQueries());
list.add(present_queries);
if (present_queries)
list.add(queries);
return list.hashCode();
}
@Override
public int compareTo(queryMetrics_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetQueries()).compareTo(other.isSetQueries());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueries()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.queries, other.queries);
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("queryMetrics_args(");
boolean first = true;
sb.append("queries:");
if (this.queries == null) {
sb.append("null");
} else {
sb.append(this.queries);
}
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 queryMetrics_argsStandardSchemeFactory implements SchemeFactory {
public queryMetrics_argsStandardScheme getScheme() {
return new queryMetrics_argsStandardScheme();
}
}
private static class queryMetrics_argsStandardScheme extends StandardScheme<queryMetrics_args> {
public void read(libthrift091.protocol.TProtocol iprot, queryMetrics_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: // QUERIES
if (schemeField.type == libthrift091.protocol.TType.LIST) {
{
libthrift091.protocol.TList _list114 = iprot.readListBegin();
struct.queries = new ArrayList<MetricQueryRequest>(_list114.size);
MetricQueryRequest _elem115;
for (int _i116 = 0; _i116 < _list114.size; ++_i116)
{
_elem115 = new MetricQueryRequest();
_elem115.read(iprot);
struct.queries.add(_elem115);
}
iprot.readListEnd();
}
struct.setQueriesIsSet(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, queryMetrics_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.queries != null) {
oprot.writeFieldBegin(QUERIES_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.queries.size()));
for (MetricQueryRequest _iter117 : struct.queries)
{
_iter117.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class queryMetrics_argsTupleSchemeFactory implements SchemeFactory {
public queryMetrics_argsTupleScheme getScheme() {
return new queryMetrics_argsTupleScheme();
}
}
private static class queryMetrics_argsTupleScheme extends TupleScheme<queryMetrics_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, queryMetrics_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetQueries()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetQueries()) {
{
oprot.writeI32(struct.queries.size());
for (MetricQueryRequest _iter118 : struct.queries)
{
_iter118.write(oprot);
}
}
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, queryMetrics_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list119 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.queries = new ArrayList<MetricQueryRequest>(_list119.size);
MetricQueryRequest _elem120;
for (int _i121 = 0; _i121 < _list119.size; ++_i121)
{
_elem120 = new MetricQueryRequest();
_elem120.read(iprot);
struct.queries.add(_elem120);
}
}
struct.setQueriesIsSet(true);
}
}
}
}
public static class queryMetrics_result implements libthrift091.TBase<queryMetrics_result, queryMetrics_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryMetrics_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryMetrics_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new queryMetrics_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new queryMetrics_resultTupleSchemeFactory());
}
public List<TimeSeriesData> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, TimeSeriesData.class))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryMetrics_result.class, metaDataMap);
}
public queryMetrics_result() {
}
public queryMetrics_result(
List<TimeSeriesData> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public queryMetrics_result(queryMetrics_result other) {
if (other.isSetSuccess()) {
List<TimeSeriesData> __this__success = new ArrayList<TimeSeriesData>(other.success.size());
for (TimeSeriesData other_element : other.success) {
__this__success.add(new TimeSeriesData(other_element));
}
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public queryMetrics_result deepCopy() {
return new queryMetrics_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<TimeSeriesData> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TimeSeriesData elem) {
if (this.success == null) {
this.success = new ArrayList<TimeSeriesData>();
}
this.success.add(elem);
}
public List<TimeSeriesData> getSuccess() {
return this.success;
}
public queryMetrics_result setSuccess(List<TimeSeriesData> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public queryMetrics_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<TimeSeriesData>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof queryMetrics_result)
return this.equals((queryMetrics_result)that);
return false;
}
public boolean equals(queryMetrics_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(queryMetrics_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("queryMetrics_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 queryMetrics_resultStandardSchemeFactory implements SchemeFactory {
public queryMetrics_resultStandardScheme getScheme() {
return new queryMetrics_resultStandardScheme();
}
}
private static class queryMetrics_resultStandardScheme extends StandardScheme<queryMetrics_result> {
public void read(libthrift091.protocol.TProtocol iprot, queryMetrics_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.LIST) {
{
libthrift091.protocol.TList _list122 = iprot.readListBegin();
struct.success = new ArrayList<TimeSeriesData>(_list122.size);
TimeSeriesData _elem123;
for (int _i124 = 0; _i124 < _list122.size; ++_i124)
{
_elem123 = new TimeSeriesData();
_elem123.read(iprot);
struct.success.add(_elem123);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, queryMetrics_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (TimeSeriesData _iter125 : struct.success)
{
_iter125.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class queryMetrics_resultTupleSchemeFactory implements SchemeFactory {
public queryMetrics_resultTupleScheme getScheme() {
return new queryMetrics_resultTupleScheme();
}
}
private static class queryMetrics_resultTupleScheme extends TupleScheme<queryMetrics_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, queryMetrics_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TimeSeriesData _iter126 : struct.success)
{
_iter126.write(oprot);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, queryMetrics_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list127 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TimeSeriesData>(_list127.size);
TimeSeriesData _elem128;
for (int _i129 = 0; _i129 < _list127.size; ++_i129)
{
_elem128 = new TimeSeriesData();
_elem128.read(iprot);
struct.success.add(_elem128);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class findAllAppInfo_args implements libthrift091.TBase<findAllAppInfo_args, findAllAppInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<findAllAppInfo_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("findAllAppInfo_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findAllAppInfo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new findAllAppInfo_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<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) {
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(findAllAppInfo_args.class, metaDataMap);
}
public findAllAppInfo_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findAllAppInfo_args(findAllAppInfo_args other) {
}
public findAllAppInfo_args deepCopy() {
return new findAllAppInfo_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 findAllAppInfo_args)
return this.equals((findAllAppInfo_args)that);
return false;
}
public boolean equals(findAllAppInfo_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
return list.hashCode();
}
@Override
public int compareTo(findAllAppInfo_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("findAllAppInfo_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 findAllAppInfo_argsStandardSchemeFactory implements SchemeFactory {
public findAllAppInfo_argsStandardScheme getScheme() {
return new findAllAppInfo_argsStandardScheme();
}
}
private static class findAllAppInfo_argsStandardScheme extends StandardScheme<findAllAppInfo_args> {
public void read(libthrift091.protocol.TProtocol iprot, findAllAppInfo_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, findAllAppInfo_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findAllAppInfo_argsTupleSchemeFactory implements SchemeFactory {
public findAllAppInfo_argsTupleScheme getScheme() {
return new findAllAppInfo_argsTupleScheme();
}
}
private static class findAllAppInfo_argsTupleScheme extends TupleScheme<findAllAppInfo_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, findAllAppInfo_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(libthrift091.protocol.TProtocol prot, findAllAppInfo_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class findAllAppInfo_result implements libthrift091.TBase<findAllAppInfo_result, findAllAppInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<findAllAppInfo_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("findAllAppInfo_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findAllAppInfo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new findAllAppInfo_resultTupleSchemeFactory());
}
public List<AppInfo> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AppInfo.class))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(findAllAppInfo_result.class, metaDataMap);
}
public findAllAppInfo_result() {
}
public findAllAppInfo_result(
List<AppInfo> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findAllAppInfo_result(findAllAppInfo_result other) {
if (other.isSetSuccess()) {
List<AppInfo> __this__success = new ArrayList<AppInfo>(other.success.size());
for (AppInfo other_element : other.success) {
__this__success.add(new AppInfo(other_element));
}
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public findAllAppInfo_result deepCopy() {
return new findAllAppInfo_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<AppInfo> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(AppInfo elem) {
if (this.success == null) {
this.success = new ArrayList<AppInfo>();
}
this.success.add(elem);
}
public List<AppInfo> getSuccess() {
return this.success;
}
public findAllAppInfo_result setSuccess(List<AppInfo> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public findAllAppInfo_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<AppInfo>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof findAllAppInfo_result)
return this.equals((findAllAppInfo_result)that);
return false;
}
public boolean equals(findAllAppInfo_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(findAllAppInfo_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("findAllAppInfo_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 findAllAppInfo_resultStandardSchemeFactory implements SchemeFactory {
public findAllAppInfo_resultStandardScheme getScheme() {
return new findAllAppInfo_resultStandardScheme();
}
}
private static class findAllAppInfo_resultStandardScheme extends StandardScheme<findAllAppInfo_result> {
public void read(libthrift091.protocol.TProtocol iprot, findAllAppInfo_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.LIST) {
{
libthrift091.protocol.TList _list130 = iprot.readListBegin();
struct.success = new ArrayList<AppInfo>(_list130.size);
AppInfo _elem131;
for (int _i132 = 0; _i132 < _list130.size; ++_i132)
{
_elem131 = new AppInfo();
_elem131.read(iprot);
struct.success.add(_elem131);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, findAllAppInfo_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (AppInfo _iter133 : struct.success)
{
_iter133.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findAllAppInfo_resultTupleSchemeFactory implements SchemeFactory {
public findAllAppInfo_resultTupleScheme getScheme() {
return new findAllAppInfo_resultTupleScheme();
}
}
private static class findAllAppInfo_resultTupleScheme extends TupleScheme<findAllAppInfo_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, findAllAppInfo_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (AppInfo _iter134 : struct.success)
{
_iter134.write(oprot);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, findAllAppInfo_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list135 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<AppInfo>(_list135.size);
AppInfo _elem136;
for (int _i137 = 0; _i137 < _list135.size; ++_i137)
{
_elem136 = new AppInfo();
_elem136.read(iprot);
struct.success.add(_elem136);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getTableSize_args implements libthrift091.TBase<getTableSize_args, getTableSize_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTableSize_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableSize_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableSize_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableSize_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableSize_args.class, metaDataMap);
}
public getTableSize_args() {
}
public getTableSize_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableSize_args(getTableSize_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public getTableSize_args deepCopy() {
return new getTableSize_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public getTableSize_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableSize_args)
return this.equals((getTableSize_args)that);
return false;
}
public boolean equals(getTableSize_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(getTableSize_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("getTableSize_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 getTableSize_argsStandardSchemeFactory implements SchemeFactory {
public getTableSize_argsStandardScheme getScheme() {
return new getTableSize_argsStandardScheme();
}
}
private static class getTableSize_argsStandardScheme extends StandardScheme<getTableSize_args> {
public void read(libthrift091.protocol.TProtocol iprot, getTableSize_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, getTableSize_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableSize_argsTupleSchemeFactory implements SchemeFactory {
public getTableSize_argsTupleScheme getScheme() {
return new getTableSize_argsTupleScheme();
}
}
private static class getTableSize_argsTupleScheme extends TupleScheme<getTableSize_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableSize_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableSize_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class getTableSize_result implements libthrift091.TBase<getTableSize_result, getTableSize_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTableSize_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableSize_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.I64, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableSize_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableSize_resultTupleSchemeFactory());
}
public long success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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 __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableSize_result.class, metaDataMap);
}
public getTableSize_result() {
}
public getTableSize_result(
long success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
setSuccessIsSet(true);
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableSize_result(getTableSize_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getTableSize_result deepCopy() {
return new getTableSize_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.se = null;
}
public long getSuccess() {
return this.success;
}
public getTableSize_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getTableSize_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Long)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Long.valueOf(getSuccess());
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableSize_result)
return this.equals((getTableSize_result)that);
return false;
}
public boolean equals(getTableSize_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getTableSize_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getTableSize_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class getTableSize_resultStandardSchemeFactory implements SchemeFactory {
public getTableSize_resultStandardScheme getScheme() {
return new getTableSize_resultStandardScheme();
}
}
private static class getTableSize_resultStandardScheme extends StandardScheme<getTableSize_result> {
public void read(libthrift091.protocol.TProtocol iprot, getTableSize_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.I64) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getTableSize_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI64(struct.success);
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableSize_resultTupleSchemeFactory implements SchemeFactory {
public getTableSize_resultTupleScheme getScheme() {
return new getTableSize_resultTupleScheme();
}
}
private static class getTableSize_resultTupleScheme extends TupleScheme<getTableSize_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableSize_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeI64(struct.success);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableSize_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class putClientMetrics_args implements libthrift091.TBase<putClientMetrics_args, putClientMetrics_args._Fields>, java.io.Serializable, Cloneable, Comparable<putClientMetrics_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("putClientMetrics_args");
private static final libthrift091.protocol.TField CLIENT_METRICS_FIELD_DESC = new libthrift091.protocol.TField("clientMetrics", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new putClientMetrics_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new putClientMetrics_argsTupleSchemeFactory());
}
public ClientMetrics clientMetrics; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
CLIENT_METRICS((short)1, "clientMetrics");
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: // CLIENT_METRICS
return CLIENT_METRICS;
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_METRICS, new libthrift091.meta_data.FieldMetaData("clientMetrics", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ClientMetrics.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(putClientMetrics_args.class, metaDataMap);
}
public putClientMetrics_args() {
}
public putClientMetrics_args(
ClientMetrics clientMetrics)
{
this();
this.clientMetrics = clientMetrics;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putClientMetrics_args(putClientMetrics_args other) {
if (other.isSetClientMetrics()) {
this.clientMetrics = new ClientMetrics(other.clientMetrics);
}
}
public putClientMetrics_args deepCopy() {
return new putClientMetrics_args(this);
}
@Override
public void clear() {
this.clientMetrics = null;
}
public ClientMetrics getClientMetrics() {
return this.clientMetrics;
}
public putClientMetrics_args setClientMetrics(ClientMetrics clientMetrics) {
this.clientMetrics = clientMetrics;
return this;
}
public void unsetClientMetrics() {
this.clientMetrics = null;
}
/** Returns true if field clientMetrics is set (has been assigned a value) and false otherwise */
public boolean isSetClientMetrics() {
return this.clientMetrics != null;
}
public void setClientMetricsIsSet(boolean value) {
if (!value) {
this.clientMetrics = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CLIENT_METRICS:
if (value == null) {
unsetClientMetrics();
} else {
setClientMetrics((ClientMetrics)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CLIENT_METRICS:
return getClientMetrics();
}
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_METRICS:
return isSetClientMetrics();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof putClientMetrics_args)
return this.equals((putClientMetrics_args)that);
return false;
}
public boolean equals(putClientMetrics_args that) {
if (that == null)
return false;
boolean this_present_clientMetrics = true && this.isSetClientMetrics();
boolean that_present_clientMetrics = true && that.isSetClientMetrics();
if (this_present_clientMetrics || that_present_clientMetrics) {
if (!(this_present_clientMetrics && that_present_clientMetrics))
return false;
if (!this.clientMetrics.equals(that.clientMetrics))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_clientMetrics = true && (isSetClientMetrics());
list.add(present_clientMetrics);
if (present_clientMetrics)
list.add(clientMetrics);
return list.hashCode();
}
@Override
public int compareTo(putClientMetrics_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetClientMetrics()).compareTo(other.isSetClientMetrics());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientMetrics()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.clientMetrics, other.clientMetrics);
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("putClientMetrics_args(");
boolean first = true;
sb.append("clientMetrics:");
if (this.clientMetrics == null) {
sb.append("null");
} else {
sb.append(this.clientMetrics);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (clientMetrics != null) {
clientMetrics.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 putClientMetrics_argsStandardSchemeFactory implements SchemeFactory {
public putClientMetrics_argsStandardScheme getScheme() {
return new putClientMetrics_argsStandardScheme();
}
}
private static class putClientMetrics_argsStandardScheme extends StandardScheme<putClientMetrics_args> {
public void read(libthrift091.protocol.TProtocol iprot, putClientMetrics_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_METRICS
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.clientMetrics = new ClientMetrics();
struct.clientMetrics.read(iprot);
struct.setClientMetricsIsSet(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, putClientMetrics_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.clientMetrics != null) {
oprot.writeFieldBegin(CLIENT_METRICS_FIELD_DESC);
struct.clientMetrics.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putClientMetrics_argsTupleSchemeFactory implements SchemeFactory {
public putClientMetrics_argsTupleScheme getScheme() {
return new putClientMetrics_argsTupleScheme();
}
}
private static class putClientMetrics_argsTupleScheme extends TupleScheme<putClientMetrics_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, putClientMetrics_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetClientMetrics()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetClientMetrics()) {
struct.clientMetrics.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, putClientMetrics_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.clientMetrics = new ClientMetrics();
struct.clientMetrics.read(iprot);
struct.setClientMetricsIsSet(true);
}
}
}
}
public static class putClientMetrics_result implements libthrift091.TBase<putClientMetrics_result, putClientMetrics_result._Fields>, java.io.Serializable, Cloneable, Comparable<putClientMetrics_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("putClientMetrics_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new putClientMetrics_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new putClientMetrics_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(putClientMetrics_result.class, metaDataMap);
}
public putClientMetrics_result() {
}
public putClientMetrics_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putClientMetrics_result(putClientMetrics_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public putClientMetrics_result deepCopy() {
return new putClientMetrics_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public putClientMetrics_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof putClientMetrics_result)
return this.equals((putClientMetrics_result)that);
return false;
}
public boolean equals(putClientMetrics_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(putClientMetrics_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("putClientMetrics_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 putClientMetrics_resultStandardSchemeFactory implements SchemeFactory {
public putClientMetrics_resultStandardScheme getScheme() {
return new putClientMetrics_resultStandardScheme();
}
}
private static class putClientMetrics_resultStandardScheme extends StandardScheme<putClientMetrics_result> {
public void read(libthrift091.protocol.TProtocol iprot, putClientMetrics_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, putClientMetrics_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putClientMetrics_resultTupleSchemeFactory implements SchemeFactory {
public putClientMetrics_resultTupleScheme getScheme() {
return new putClientMetrics_resultTupleScheme();
}
}
private static class putClientMetrics_resultTupleScheme extends TupleScheme<putClientMetrics_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, putClientMetrics_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, putClientMetrics_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class subscribePhoneAlert_args implements libthrift091.TBase<subscribePhoneAlert_args, subscribePhoneAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<subscribePhoneAlert_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("subscribePhoneAlert_args");
private static final libthrift091.protocol.TField PHONE_NUMBER_FIELD_DESC = new libthrift091.protocol.TField("phoneNumber", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new subscribePhoneAlert_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new subscribePhoneAlert_argsTupleSchemeFactory());
}
public String phoneNumber; // required
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
PHONE_NUMBER((short)1, "phoneNumber"),
SPACE_ID((short)2, "spaceId");
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: // PHONE_NUMBER
return PHONE_NUMBER;
case 2: // SPACE_ID
return SPACE_ID;
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.PHONE_NUMBER, new libthrift091.meta_data.FieldMetaData("phoneNumber", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(subscribePhoneAlert_args.class, metaDataMap);
}
public subscribePhoneAlert_args() {
}
public subscribePhoneAlert_args(
String phoneNumber,
String spaceId)
{
this();
this.phoneNumber = phoneNumber;
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subscribePhoneAlert_args(subscribePhoneAlert_args other) {
if (other.isSetPhoneNumber()) {
this.phoneNumber = other.phoneNumber;
}
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public subscribePhoneAlert_args deepCopy() {
return new subscribePhoneAlert_args(this);
}
@Override
public void clear() {
this.phoneNumber = null;
this.spaceId = null;
}
public String getPhoneNumber() {
return this.phoneNumber;
}
public subscribePhoneAlert_args setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
return this;
}
public void unsetPhoneNumber() {
this.phoneNumber = null;
}
/** Returns true if field phoneNumber is set (has been assigned a value) and false otherwise */
public boolean isSetPhoneNumber() {
return this.phoneNumber != null;
}
public void setPhoneNumberIsSet(boolean value) {
if (!value) {
this.phoneNumber = null;
}
}
public String getSpaceId() {
return this.spaceId;
}
public subscribePhoneAlert_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PHONE_NUMBER:
if (value == null) {
unsetPhoneNumber();
} else {
setPhoneNumber((String)value);
}
break;
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PHONE_NUMBER:
return getPhoneNumber();
case SPACE_ID:
return getSpaceId();
}
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 PHONE_NUMBER:
return isSetPhoneNumber();
case SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof subscribePhoneAlert_args)
return this.equals((subscribePhoneAlert_args)that);
return false;
}
public boolean equals(subscribePhoneAlert_args that) {
if (that == null)
return false;
boolean this_present_phoneNumber = true && this.isSetPhoneNumber();
boolean that_present_phoneNumber = true && that.isSetPhoneNumber();
if (this_present_phoneNumber || that_present_phoneNumber) {
if (!(this_present_phoneNumber && that_present_phoneNumber))
return false;
if (!this.phoneNumber.equals(that.phoneNumber))
return false;
}
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_phoneNumber = true && (isSetPhoneNumber());
list.add(present_phoneNumber);
if (present_phoneNumber)
list.add(phoneNumber);
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(subscribePhoneAlert_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPhoneNumber()).compareTo(other.isSetPhoneNumber());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPhoneNumber()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.phoneNumber, other.phoneNumber);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("subscribePhoneAlert_args(");
boolean first = true;
sb.append("phoneNumber:");
if (this.phoneNumber == null) {
sb.append("null");
} else {
sb.append(this.phoneNumber);
}
first = false;
if (!first) sb.append(", ");
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 subscribePhoneAlert_argsStandardSchemeFactory implements SchemeFactory {
public subscribePhoneAlert_argsStandardScheme getScheme() {
return new subscribePhoneAlert_argsStandardScheme();
}
}
private static class subscribePhoneAlert_argsStandardScheme extends StandardScheme<subscribePhoneAlert_args> {
public void read(libthrift091.protocol.TProtocol iprot, subscribePhoneAlert_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: // PHONE_NUMBER
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.phoneNumber = iprot.readString();
struct.setPhoneNumberIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, subscribePhoneAlert_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.phoneNumber != null) {
oprot.writeFieldBegin(PHONE_NUMBER_FIELD_DESC);
oprot.writeString(struct.phoneNumber);
oprot.writeFieldEnd();
}
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subscribePhoneAlert_argsTupleSchemeFactory implements SchemeFactory {
public subscribePhoneAlert_argsTupleScheme getScheme() {
return new subscribePhoneAlert_argsTupleScheme();
}
}
private static class subscribePhoneAlert_argsTupleScheme extends TupleScheme<subscribePhoneAlert_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, subscribePhoneAlert_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPhoneNumber()) {
optionals.set(0);
}
if (struct.isSetSpaceId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPhoneNumber()) {
oprot.writeString(struct.phoneNumber);
}
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, subscribePhoneAlert_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.phoneNumber = iprot.readString();
struct.setPhoneNumberIsSet(true);
}
if (incoming.get(1)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class subscribePhoneAlert_result implements libthrift091.TBase<subscribePhoneAlert_result, subscribePhoneAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<subscribePhoneAlert_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("subscribePhoneAlert_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new subscribePhoneAlert_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new subscribePhoneAlert_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(subscribePhoneAlert_result.class, metaDataMap);
}
public subscribePhoneAlert_result() {
}
public subscribePhoneAlert_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subscribePhoneAlert_result(subscribePhoneAlert_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public subscribePhoneAlert_result deepCopy() {
return new subscribePhoneAlert_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public subscribePhoneAlert_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof subscribePhoneAlert_result)
return this.equals((subscribePhoneAlert_result)that);
return false;
}
public boolean equals(subscribePhoneAlert_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(subscribePhoneAlert_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("subscribePhoneAlert_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 subscribePhoneAlert_resultStandardSchemeFactory implements SchemeFactory {
public subscribePhoneAlert_resultStandardScheme getScheme() {
return new subscribePhoneAlert_resultStandardScheme();
}
}
private static class subscribePhoneAlert_resultStandardScheme extends StandardScheme<subscribePhoneAlert_result> {
public void read(libthrift091.protocol.TProtocol iprot, subscribePhoneAlert_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, subscribePhoneAlert_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subscribePhoneAlert_resultTupleSchemeFactory implements SchemeFactory {
public subscribePhoneAlert_resultTupleScheme getScheme() {
return new subscribePhoneAlert_resultTupleScheme();
}
}
private static class subscribePhoneAlert_resultTupleScheme extends TupleScheme<subscribePhoneAlert_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, subscribePhoneAlert_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, subscribePhoneAlert_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class unsubscribePhoneAlert_args implements libthrift091.TBase<unsubscribePhoneAlert_args, unsubscribePhoneAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<unsubscribePhoneAlert_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("unsubscribePhoneAlert_args");
private static final libthrift091.protocol.TField PHONE_NUMBER_FIELD_DESC = new libthrift091.protocol.TField("phoneNumber", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unsubscribePhoneAlert_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsubscribePhoneAlert_argsTupleSchemeFactory());
}
public String phoneNumber; // required
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
PHONE_NUMBER((short)1, "phoneNumber"),
SPACE_ID((short)2, "spaceId");
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: // PHONE_NUMBER
return PHONE_NUMBER;
case 2: // SPACE_ID
return SPACE_ID;
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.PHONE_NUMBER, new libthrift091.meta_data.FieldMetaData("phoneNumber", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(unsubscribePhoneAlert_args.class, metaDataMap);
}
public unsubscribePhoneAlert_args() {
}
public unsubscribePhoneAlert_args(
String phoneNumber,
String spaceId)
{
this();
this.phoneNumber = phoneNumber;
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unsubscribePhoneAlert_args(unsubscribePhoneAlert_args other) {
if (other.isSetPhoneNumber()) {
this.phoneNumber = other.phoneNumber;
}
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public unsubscribePhoneAlert_args deepCopy() {
return new unsubscribePhoneAlert_args(this);
}
@Override
public void clear() {
this.phoneNumber = null;
this.spaceId = null;
}
public String getPhoneNumber() {
return this.phoneNumber;
}
public unsubscribePhoneAlert_args setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
return this;
}
public void unsetPhoneNumber() {
this.phoneNumber = null;
}
/** Returns true if field phoneNumber is set (has been assigned a value) and false otherwise */
public boolean isSetPhoneNumber() {
return this.phoneNumber != null;
}
public void setPhoneNumberIsSet(boolean value) {
if (!value) {
this.phoneNumber = null;
}
}
public String getSpaceId() {
return this.spaceId;
}
public unsubscribePhoneAlert_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PHONE_NUMBER:
if (value == null) {
unsetPhoneNumber();
} else {
setPhoneNumber((String)value);
}
break;
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PHONE_NUMBER:
return getPhoneNumber();
case SPACE_ID:
return getSpaceId();
}
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 PHONE_NUMBER:
return isSetPhoneNumber();
case SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unsubscribePhoneAlert_args)
return this.equals((unsubscribePhoneAlert_args)that);
return false;
}
public boolean equals(unsubscribePhoneAlert_args that) {
if (that == null)
return false;
boolean this_present_phoneNumber = true && this.isSetPhoneNumber();
boolean that_present_phoneNumber = true && that.isSetPhoneNumber();
if (this_present_phoneNumber || that_present_phoneNumber) {
if (!(this_present_phoneNumber && that_present_phoneNumber))
return false;
if (!this.phoneNumber.equals(that.phoneNumber))
return false;
}
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_phoneNumber = true && (isSetPhoneNumber());
list.add(present_phoneNumber);
if (present_phoneNumber)
list.add(phoneNumber);
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(unsubscribePhoneAlert_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPhoneNumber()).compareTo(other.isSetPhoneNumber());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPhoneNumber()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.phoneNumber, other.phoneNumber);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("unsubscribePhoneAlert_args(");
boolean first = true;
sb.append("phoneNumber:");
if (this.phoneNumber == null) {
sb.append("null");
} else {
sb.append(this.phoneNumber);
}
first = false;
if (!first) sb.append(", ");
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 unsubscribePhoneAlert_argsStandardSchemeFactory implements SchemeFactory {
public unsubscribePhoneAlert_argsStandardScheme getScheme() {
return new unsubscribePhoneAlert_argsStandardScheme();
}
}
private static class unsubscribePhoneAlert_argsStandardScheme extends StandardScheme<unsubscribePhoneAlert_args> {
public void read(libthrift091.protocol.TProtocol iprot, unsubscribePhoneAlert_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: // PHONE_NUMBER
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.phoneNumber = iprot.readString();
struct.setPhoneNumberIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, unsubscribePhoneAlert_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.phoneNumber != null) {
oprot.writeFieldBegin(PHONE_NUMBER_FIELD_DESC);
oprot.writeString(struct.phoneNumber);
oprot.writeFieldEnd();
}
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unsubscribePhoneAlert_argsTupleSchemeFactory implements SchemeFactory {
public unsubscribePhoneAlert_argsTupleScheme getScheme() {
return new unsubscribePhoneAlert_argsTupleScheme();
}
}
private static class unsubscribePhoneAlert_argsTupleScheme extends TupleScheme<unsubscribePhoneAlert_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, unsubscribePhoneAlert_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPhoneNumber()) {
optionals.set(0);
}
if (struct.isSetSpaceId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPhoneNumber()) {
oprot.writeString(struct.phoneNumber);
}
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, unsubscribePhoneAlert_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.phoneNumber = iprot.readString();
struct.setPhoneNumberIsSet(true);
}
if (incoming.get(1)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class unsubscribePhoneAlert_result implements libthrift091.TBase<unsubscribePhoneAlert_result, unsubscribePhoneAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<unsubscribePhoneAlert_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("unsubscribePhoneAlert_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unsubscribePhoneAlert_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsubscribePhoneAlert_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(unsubscribePhoneAlert_result.class, metaDataMap);
}
public unsubscribePhoneAlert_result() {
}
public unsubscribePhoneAlert_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unsubscribePhoneAlert_result(unsubscribePhoneAlert_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public unsubscribePhoneAlert_result deepCopy() {
return new unsubscribePhoneAlert_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public unsubscribePhoneAlert_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unsubscribePhoneAlert_result)
return this.equals((unsubscribePhoneAlert_result)that);
return false;
}
public boolean equals(unsubscribePhoneAlert_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(unsubscribePhoneAlert_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("unsubscribePhoneAlert_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 unsubscribePhoneAlert_resultStandardSchemeFactory implements SchemeFactory {
public unsubscribePhoneAlert_resultStandardScheme getScheme() {
return new unsubscribePhoneAlert_resultStandardScheme();
}
}
private static class unsubscribePhoneAlert_resultStandardScheme extends StandardScheme<unsubscribePhoneAlert_result> {
public void read(libthrift091.protocol.TProtocol iprot, unsubscribePhoneAlert_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, unsubscribePhoneAlert_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unsubscribePhoneAlert_resultTupleSchemeFactory implements SchemeFactory {
public unsubscribePhoneAlert_resultTupleScheme getScheme() {
return new unsubscribePhoneAlert_resultTupleScheme();
}
}
private static class unsubscribePhoneAlert_resultTupleScheme extends TupleScheme<unsubscribePhoneAlert_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, unsubscribePhoneAlert_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, unsubscribePhoneAlert_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class subscribeEmailAlert_args implements libthrift091.TBase<subscribeEmailAlert_args, subscribeEmailAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<subscribeEmailAlert_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("subscribeEmailAlert_args");
private static final libthrift091.protocol.TField EMAIL_FIELD_DESC = new libthrift091.protocol.TField("email", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new subscribeEmailAlert_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new subscribeEmailAlert_argsTupleSchemeFactory());
}
public String email; // required
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
EMAIL((short)1, "email"),
SPACE_ID((short)2, "spaceId");
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: // EMAIL
return EMAIL;
case 2: // SPACE_ID
return SPACE_ID;
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.EMAIL, new libthrift091.meta_data.FieldMetaData("email", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(subscribeEmailAlert_args.class, metaDataMap);
}
public subscribeEmailAlert_args() {
}
public subscribeEmailAlert_args(
String email,
String spaceId)
{
this();
this.email = email;
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subscribeEmailAlert_args(subscribeEmailAlert_args other) {
if (other.isSetEmail()) {
this.email = other.email;
}
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public subscribeEmailAlert_args deepCopy() {
return new subscribeEmailAlert_args(this);
}
@Override
public void clear() {
this.email = null;
this.spaceId = null;
}
public String getEmail() {
return this.email;
}
public subscribeEmailAlert_args setEmail(String email) {
this.email = email;
return this;
}
public void unsetEmail() {
this.email = null;
}
/** Returns true if field email is set (has been assigned a value) and false otherwise */
public boolean isSetEmail() {
return this.email != null;
}
public void setEmailIsSet(boolean value) {
if (!value) {
this.email = null;
}
}
public String getSpaceId() {
return this.spaceId;
}
public subscribeEmailAlert_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EMAIL:
if (value == null) {
unsetEmail();
} else {
setEmail((String)value);
}
break;
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EMAIL:
return getEmail();
case SPACE_ID:
return getSpaceId();
}
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 EMAIL:
return isSetEmail();
case SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof subscribeEmailAlert_args)
return this.equals((subscribeEmailAlert_args)that);
return false;
}
public boolean equals(subscribeEmailAlert_args that) {
if (that == null)
return false;
boolean this_present_email = true && this.isSetEmail();
boolean that_present_email = true && that.isSetEmail();
if (this_present_email || that_present_email) {
if (!(this_present_email && that_present_email))
return false;
if (!this.email.equals(that.email))
return false;
}
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_email = true && (isSetEmail());
list.add(present_email);
if (present_email)
list.add(email);
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(subscribeEmailAlert_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEmail()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.email, other.email);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("subscribeEmailAlert_args(");
boolean first = true;
sb.append("email:");
if (this.email == null) {
sb.append("null");
} else {
sb.append(this.email);
}
first = false;
if (!first) sb.append(", ");
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 subscribeEmailAlert_argsStandardSchemeFactory implements SchemeFactory {
public subscribeEmailAlert_argsStandardScheme getScheme() {
return new subscribeEmailAlert_argsStandardScheme();
}
}
private static class subscribeEmailAlert_argsStandardScheme extends StandardScheme<subscribeEmailAlert_args> {
public void read(libthrift091.protocol.TProtocol iprot, subscribeEmailAlert_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: // EMAIL
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.email = iprot.readString();
struct.setEmailIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, subscribeEmailAlert_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.email != null) {
oprot.writeFieldBegin(EMAIL_FIELD_DESC);
oprot.writeString(struct.email);
oprot.writeFieldEnd();
}
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subscribeEmailAlert_argsTupleSchemeFactory implements SchemeFactory {
public subscribeEmailAlert_argsTupleScheme getScheme() {
return new subscribeEmailAlert_argsTupleScheme();
}
}
private static class subscribeEmailAlert_argsTupleScheme extends TupleScheme<subscribeEmailAlert_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, subscribeEmailAlert_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEmail()) {
optionals.set(0);
}
if (struct.isSetSpaceId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetEmail()) {
oprot.writeString(struct.email);
}
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, subscribeEmailAlert_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.email = iprot.readString();
struct.setEmailIsSet(true);
}
if (incoming.get(1)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class subscribeEmailAlert_result implements libthrift091.TBase<subscribeEmailAlert_result, subscribeEmailAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<subscribeEmailAlert_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("subscribeEmailAlert_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new subscribeEmailAlert_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new subscribeEmailAlert_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(subscribeEmailAlert_result.class, metaDataMap);
}
public subscribeEmailAlert_result() {
}
public subscribeEmailAlert_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subscribeEmailAlert_result(subscribeEmailAlert_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public subscribeEmailAlert_result deepCopy() {
return new subscribeEmailAlert_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public subscribeEmailAlert_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof subscribeEmailAlert_result)
return this.equals((subscribeEmailAlert_result)that);
return false;
}
public boolean equals(subscribeEmailAlert_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(subscribeEmailAlert_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("subscribeEmailAlert_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 subscribeEmailAlert_resultStandardSchemeFactory implements SchemeFactory {
public subscribeEmailAlert_resultStandardScheme getScheme() {
return new subscribeEmailAlert_resultStandardScheme();
}
}
private static class subscribeEmailAlert_resultStandardScheme extends StandardScheme<subscribeEmailAlert_result> {
public void read(libthrift091.protocol.TProtocol iprot, subscribeEmailAlert_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, subscribeEmailAlert_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subscribeEmailAlert_resultTupleSchemeFactory implements SchemeFactory {
public subscribeEmailAlert_resultTupleScheme getScheme() {
return new subscribeEmailAlert_resultTupleScheme();
}
}
private static class subscribeEmailAlert_resultTupleScheme extends TupleScheme<subscribeEmailAlert_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, subscribeEmailAlert_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, subscribeEmailAlert_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class unsubscribeEmailAlert_args implements libthrift091.TBase<unsubscribeEmailAlert_args, unsubscribeEmailAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<unsubscribeEmailAlert_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("unsubscribeEmailAlert_args");
private static final libthrift091.protocol.TField EMAIL_FIELD_DESC = new libthrift091.protocol.TField("email", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unsubscribeEmailAlert_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsubscribeEmailAlert_argsTupleSchemeFactory());
}
public String email; // required
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
EMAIL((short)1, "email"),
SPACE_ID((short)2, "spaceId");
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: // EMAIL
return EMAIL;
case 2: // SPACE_ID
return SPACE_ID;
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.EMAIL, new libthrift091.meta_data.FieldMetaData("email", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(unsubscribeEmailAlert_args.class, metaDataMap);
}
public unsubscribeEmailAlert_args() {
}
public unsubscribeEmailAlert_args(
String email,
String spaceId)
{
this();
this.email = email;
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unsubscribeEmailAlert_args(unsubscribeEmailAlert_args other) {
if (other.isSetEmail()) {
this.email = other.email;
}
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public unsubscribeEmailAlert_args deepCopy() {
return new unsubscribeEmailAlert_args(this);
}
@Override
public void clear() {
this.email = null;
this.spaceId = null;
}
public String getEmail() {
return this.email;
}
public unsubscribeEmailAlert_args setEmail(String email) {
this.email = email;
return this;
}
public void unsetEmail() {
this.email = null;
}
/** Returns true if field email is set (has been assigned a value) and false otherwise */
public boolean isSetEmail() {
return this.email != null;
}
public void setEmailIsSet(boolean value) {
if (!value) {
this.email = null;
}
}
public String getSpaceId() {
return this.spaceId;
}
public unsubscribeEmailAlert_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EMAIL:
if (value == null) {
unsetEmail();
} else {
setEmail((String)value);
}
break;
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EMAIL:
return getEmail();
case SPACE_ID:
return getSpaceId();
}
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 EMAIL:
return isSetEmail();
case SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unsubscribeEmailAlert_args)
return this.equals((unsubscribeEmailAlert_args)that);
return false;
}
public boolean equals(unsubscribeEmailAlert_args that) {
if (that == null)
return false;
boolean this_present_email = true && this.isSetEmail();
boolean that_present_email = true && that.isSetEmail();
if (this_present_email || that_present_email) {
if (!(this_present_email && that_present_email))
return false;
if (!this.email.equals(that.email))
return false;
}
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_email = true && (isSetEmail());
list.add(present_email);
if (present_email)
list.add(email);
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(unsubscribeEmailAlert_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEmail()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.email, other.email);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("unsubscribeEmailAlert_args(");
boolean first = true;
sb.append("email:");
if (this.email == null) {
sb.append("null");
} else {
sb.append(this.email);
}
first = false;
if (!first) sb.append(", ");
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 unsubscribeEmailAlert_argsStandardSchemeFactory implements SchemeFactory {
public unsubscribeEmailAlert_argsStandardScheme getScheme() {
return new unsubscribeEmailAlert_argsStandardScheme();
}
}
private static class unsubscribeEmailAlert_argsStandardScheme extends StandardScheme<unsubscribeEmailAlert_args> {
public void read(libthrift091.protocol.TProtocol iprot, unsubscribeEmailAlert_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: // EMAIL
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.email = iprot.readString();
struct.setEmailIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, unsubscribeEmailAlert_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.email != null) {
oprot.writeFieldBegin(EMAIL_FIELD_DESC);
oprot.writeString(struct.email);
oprot.writeFieldEnd();
}
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unsubscribeEmailAlert_argsTupleSchemeFactory implements SchemeFactory {
public unsubscribeEmailAlert_argsTupleScheme getScheme() {
return new unsubscribeEmailAlert_argsTupleScheme();
}
}
private static class unsubscribeEmailAlert_argsTupleScheme extends TupleScheme<unsubscribeEmailAlert_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, unsubscribeEmailAlert_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEmail()) {
optionals.set(0);
}
if (struct.isSetSpaceId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetEmail()) {
oprot.writeString(struct.email);
}
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, unsubscribeEmailAlert_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.email = iprot.readString();
struct.setEmailIsSet(true);
}
if (incoming.get(1)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class unsubscribeEmailAlert_result implements libthrift091.TBase<unsubscribeEmailAlert_result, unsubscribeEmailAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<unsubscribeEmailAlert_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("unsubscribeEmailAlert_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unsubscribeEmailAlert_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new unsubscribeEmailAlert_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(unsubscribeEmailAlert_result.class, metaDataMap);
}
public unsubscribeEmailAlert_result() {
}
public unsubscribeEmailAlert_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unsubscribeEmailAlert_result(unsubscribeEmailAlert_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public unsubscribeEmailAlert_result deepCopy() {
return new unsubscribeEmailAlert_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public unsubscribeEmailAlert_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unsubscribeEmailAlert_result)
return this.equals((unsubscribeEmailAlert_result)that);
return false;
}
public boolean equals(unsubscribeEmailAlert_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(unsubscribeEmailAlert_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("unsubscribeEmailAlert_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 unsubscribeEmailAlert_resultStandardSchemeFactory implements SchemeFactory {
public unsubscribeEmailAlert_resultStandardScheme getScheme() {
return new unsubscribeEmailAlert_resultStandardScheme();
}
}
private static class unsubscribeEmailAlert_resultStandardScheme extends StandardScheme<unsubscribeEmailAlert_result> {
public void read(libthrift091.protocol.TProtocol iprot, unsubscribeEmailAlert_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, unsubscribeEmailAlert_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unsubscribeEmailAlert_resultTupleSchemeFactory implements SchemeFactory {
public unsubscribeEmailAlert_resultTupleScheme getScheme() {
return new unsubscribeEmailAlert_resultTupleScheme();
}
}
private static class unsubscribeEmailAlert_resultTupleScheme extends TupleScheme<unsubscribeEmailAlert_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, unsubscribeEmailAlert_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, unsubscribeEmailAlert_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class listSubscribedPhone_args implements libthrift091.TBase<listSubscribedPhone_args, listSubscribedPhone_args._Fields>, java.io.Serializable, Cloneable, Comparable<listSubscribedPhone_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listSubscribedPhone_args");
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listSubscribedPhone_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new listSubscribedPhone_argsTupleSchemeFactory());
}
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SPACE_ID((short)1, "spaceId");
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: // SPACE_ID
return SPACE_ID;
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.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listSubscribedPhone_args.class, metaDataMap);
}
public listSubscribedPhone_args() {
}
public listSubscribedPhone_args(
String spaceId)
{
this();
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listSubscribedPhone_args(listSubscribedPhone_args other) {
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public listSubscribedPhone_args deepCopy() {
return new listSubscribedPhone_args(this);
}
@Override
public void clear() {
this.spaceId = null;
}
public String getSpaceId() {
return this.spaceId;
}
public listSubscribedPhone_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SPACE_ID:
return getSpaceId();
}
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 SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listSubscribedPhone_args)
return this.equals((listSubscribedPhone_args)that);
return false;
}
public boolean equals(listSubscribedPhone_args that) {
if (that == null)
return false;
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(listSubscribedPhone_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("listSubscribedPhone_args(");
boolean first = true;
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 listSubscribedPhone_argsStandardSchemeFactory implements SchemeFactory {
public listSubscribedPhone_argsStandardScheme getScheme() {
return new listSubscribedPhone_argsStandardScheme();
}
}
private static class listSubscribedPhone_argsStandardScheme extends StandardScheme<listSubscribedPhone_args> {
public void read(libthrift091.protocol.TProtocol iprot, listSubscribedPhone_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: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, listSubscribedPhone_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listSubscribedPhone_argsTupleSchemeFactory implements SchemeFactory {
public listSubscribedPhone_argsTupleScheme getScheme() {
return new listSubscribedPhone_argsTupleScheme();
}
}
private static class listSubscribedPhone_argsTupleScheme extends TupleScheme<listSubscribedPhone_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listSubscribedPhone_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSpaceId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listSubscribedPhone_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class listSubscribedPhone_result implements libthrift091.TBase<listSubscribedPhone_result, listSubscribedPhone_result._Fields>, java.io.Serializable, Cloneable, Comparable<listSubscribedPhone_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listSubscribedPhone_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listSubscribedPhone_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new listSubscribedPhone_resultTupleSchemeFactory());
}
public List<String> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listSubscribedPhone_result.class, metaDataMap);
}
public listSubscribedPhone_result() {
}
public listSubscribedPhone_result(
List<String> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listSubscribedPhone_result(listSubscribedPhone_result other) {
if (other.isSetSuccess()) {
List<String> __this__success = new ArrayList<String>(other.success);
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public listSubscribedPhone_result deepCopy() {
return new listSubscribedPhone_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<String> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(String elem) {
if (this.success == null) {
this.success = new ArrayList<String>();
}
this.success.add(elem);
}
public List<String> getSuccess() {
return this.success;
}
public listSubscribedPhone_result setSuccess(List<String> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public listSubscribedPhone_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<String>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listSubscribedPhone_result)
return this.equals((listSubscribedPhone_result)that);
return false;
}
public boolean equals(listSubscribedPhone_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(listSubscribedPhone_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("listSubscribedPhone_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 listSubscribedPhone_resultStandardSchemeFactory implements SchemeFactory {
public listSubscribedPhone_resultStandardScheme getScheme() {
return new listSubscribedPhone_resultStandardScheme();
}
}
private static class listSubscribedPhone_resultStandardScheme extends StandardScheme<listSubscribedPhone_result> {
public void read(libthrift091.protocol.TProtocol iprot, listSubscribedPhone_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.LIST) {
{
libthrift091.protocol.TList _list138 = iprot.readListBegin();
struct.success = new ArrayList<String>(_list138.size);
String _elem139;
for (int _i140 = 0; _i140 < _list138.size; ++_i140)
{
_elem139 = iprot.readString();
struct.success.add(_elem139);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, listSubscribedPhone_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, struct.success.size()));
for (String _iter141 : struct.success)
{
oprot.writeString(_iter141);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listSubscribedPhone_resultTupleSchemeFactory implements SchemeFactory {
public listSubscribedPhone_resultTupleScheme getScheme() {
return new listSubscribedPhone_resultTupleScheme();
}
}
private static class listSubscribedPhone_resultTupleScheme extends TupleScheme<listSubscribedPhone_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listSubscribedPhone_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (String _iter142 : struct.success)
{
oprot.writeString(_iter142);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listSubscribedPhone_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list143 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, iprot.readI32());
struct.success = new ArrayList<String>(_list143.size);
String _elem144;
for (int _i145 = 0; _i145 < _list143.size; ++_i145)
{
_elem144 = iprot.readString();
struct.success.add(_elem144);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class listSubscribedEmail_args implements libthrift091.TBase<listSubscribedEmail_args, listSubscribedEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<listSubscribedEmail_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listSubscribedEmail_args");
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listSubscribedEmail_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new listSubscribedEmail_argsTupleSchemeFactory());
}
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SPACE_ID((short)1, "spaceId");
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: // SPACE_ID
return SPACE_ID;
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.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listSubscribedEmail_args.class, metaDataMap);
}
public listSubscribedEmail_args() {
}
public listSubscribedEmail_args(
String spaceId)
{
this();
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listSubscribedEmail_args(listSubscribedEmail_args other) {
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public listSubscribedEmail_args deepCopy() {
return new listSubscribedEmail_args(this);
}
@Override
public void clear() {
this.spaceId = null;
}
public String getSpaceId() {
return this.spaceId;
}
public listSubscribedEmail_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SPACE_ID:
return getSpaceId();
}
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 SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listSubscribedEmail_args)
return this.equals((listSubscribedEmail_args)that);
return false;
}
public boolean equals(listSubscribedEmail_args that) {
if (that == null)
return false;
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(listSubscribedEmail_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("listSubscribedEmail_args(");
boolean first = true;
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 listSubscribedEmail_argsStandardSchemeFactory implements SchemeFactory {
public listSubscribedEmail_argsStandardScheme getScheme() {
return new listSubscribedEmail_argsStandardScheme();
}
}
private static class listSubscribedEmail_argsStandardScheme extends StandardScheme<listSubscribedEmail_args> {
public void read(libthrift091.protocol.TProtocol iprot, listSubscribedEmail_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: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, listSubscribedEmail_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listSubscribedEmail_argsTupleSchemeFactory implements SchemeFactory {
public listSubscribedEmail_argsTupleScheme getScheme() {
return new listSubscribedEmail_argsTupleScheme();
}
}
private static class listSubscribedEmail_argsTupleScheme extends TupleScheme<listSubscribedEmail_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listSubscribedEmail_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSpaceId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listSubscribedEmail_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class listSubscribedEmail_result implements libthrift091.TBase<listSubscribedEmail_result, listSubscribedEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<listSubscribedEmail_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listSubscribedEmail_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listSubscribedEmail_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new listSubscribedEmail_resultTupleSchemeFactory());
}
public List<String> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listSubscribedEmail_result.class, metaDataMap);
}
public listSubscribedEmail_result() {
}
public listSubscribedEmail_result(
List<String> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listSubscribedEmail_result(listSubscribedEmail_result other) {
if (other.isSetSuccess()) {
List<String> __this__success = new ArrayList<String>(other.success);
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public listSubscribedEmail_result deepCopy() {
return new listSubscribedEmail_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<String> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(String elem) {
if (this.success == null) {
this.success = new ArrayList<String>();
}
this.success.add(elem);
}
public List<String> getSuccess() {
return this.success;
}
public listSubscribedEmail_result setSuccess(List<String> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public listSubscribedEmail_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<String>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listSubscribedEmail_result)
return this.equals((listSubscribedEmail_result)that);
return false;
}
public boolean equals(listSubscribedEmail_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(listSubscribedEmail_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("listSubscribedEmail_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 listSubscribedEmail_resultStandardSchemeFactory implements SchemeFactory {
public listSubscribedEmail_resultStandardScheme getScheme() {
return new listSubscribedEmail_resultStandardScheme();
}
}
private static class listSubscribedEmail_resultStandardScheme extends StandardScheme<listSubscribedEmail_result> {
public void read(libthrift091.protocol.TProtocol iprot, listSubscribedEmail_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.LIST) {
{
libthrift091.protocol.TList _list146 = iprot.readListBegin();
struct.success = new ArrayList<String>(_list146.size);
String _elem147;
for (int _i148 = 0; _i148 < _list146.size; ++_i148)
{
_elem147 = iprot.readString();
struct.success.add(_elem147);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, listSubscribedEmail_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, struct.success.size()));
for (String _iter149 : struct.success)
{
oprot.writeString(_iter149);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listSubscribedEmail_resultTupleSchemeFactory implements SchemeFactory {
public listSubscribedEmail_resultTupleScheme getScheme() {
return new listSubscribedEmail_resultTupleScheme();
}
}
private static class listSubscribedEmail_resultTupleScheme extends TupleScheme<listSubscribedEmail_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listSubscribedEmail_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (String _iter150 : struct.success)
{
oprot.writeString(_iter150);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listSubscribedEmail_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list151 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRING, iprot.readI32());
struct.success = new ArrayList<String>(_list151.size);
String _elem152;
for (int _i153 = 0; _i153 < _list151.size; ++_i153)
{
_elem152 = iprot.readString();
struct.success.add(_elem152);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getTableHistorySize_args implements libthrift091.TBase<getTableHistorySize_args, getTableHistorySize_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTableHistorySize_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableHistorySize_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField START_DATE_FIELD_DESC = new libthrift091.protocol.TField("startDate", libthrift091.protocol.TType.I64, (short)2);
private static final libthrift091.protocol.TField STOP_DATE_FIELD_DESC = new libthrift091.protocol.TField("stopDate", libthrift091.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableHistorySize_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableHistorySize_argsTupleSchemeFactory());
}
public String tableName; // required
public long startDate; // required
public long stopDate; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
START_DATE((short)2, "startDate"),
STOP_DATE((short)3, "stopDate");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // START_DATE
return START_DATE;
case 3: // STOP_DATE
return STOP_DATE;
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 __STARTDATE_ISSET_ID = 0;
private static final int __STOPDATE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.START_DATE, new libthrift091.meta_data.FieldMetaData("startDate", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.STOP_DATE, new libthrift091.meta_data.FieldMetaData("stopDate", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableHistorySize_args.class, metaDataMap);
}
public getTableHistorySize_args() {
}
public getTableHistorySize_args(
String tableName,
long startDate,
long stopDate)
{
this();
this.tableName = tableName;
this.startDate = startDate;
setStartDateIsSet(true);
this.stopDate = stopDate;
setStopDateIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableHistorySize_args(getTableHistorySize_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
this.startDate = other.startDate;
this.stopDate = other.stopDate;
}
public getTableHistorySize_args deepCopy() {
return new getTableHistorySize_args(this);
}
@Override
public void clear() {
this.tableName = null;
setStartDateIsSet(false);
this.startDate = 0;
setStopDateIsSet(false);
this.stopDate = 0;
}
public String getTableName() {
return this.tableName;
}
public getTableHistorySize_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public long getStartDate() {
return this.startDate;
}
public getTableHistorySize_args setStartDate(long startDate) {
this.startDate = startDate;
setStartDateIsSet(true);
return this;
}
public void unsetStartDate() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
}
/** Returns true if field startDate is set (has been assigned a value) and false otherwise */
public boolean isSetStartDate() {
return EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID);
}
public void setStartDateIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
}
public long getStopDate() {
return this.stopDate;
}
public getTableHistorySize_args setStopDate(long stopDate) {
this.stopDate = stopDate;
setStopDateIsSet(true);
return this;
}
public void unsetStopDate() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOPDATE_ISSET_ID);
}
/** Returns true if field stopDate is set (has been assigned a value) and false otherwise */
public boolean isSetStopDate() {
return EncodingUtils.testBit(__isset_bitfield, __STOPDATE_ISSET_ID);
}
public void setStopDateIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOPDATE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case START_DATE:
if (value == null) {
unsetStartDate();
} else {
setStartDate((Long)value);
}
break;
case STOP_DATE:
if (value == null) {
unsetStopDate();
} else {
setStopDate((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_DATE:
return Long.valueOf(getStartDate());
case STOP_DATE:
return Long.valueOf(getStopDate());
}
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 TABLE_NAME:
return isSetTableName();
case START_DATE:
return isSetStartDate();
case STOP_DATE:
return isSetStopDate();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableHistorySize_args)
return this.equals((getTableHistorySize_args)that);
return false;
}
public boolean equals(getTableHistorySize_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startDate = true;
boolean that_present_startDate = true;
if (this_present_startDate || that_present_startDate) {
if (!(this_present_startDate && that_present_startDate))
return false;
if (this.startDate != that.startDate)
return false;
}
boolean this_present_stopDate = true;
boolean that_present_stopDate = true;
if (this_present_stopDate || that_present_stopDate) {
if (!(this_present_stopDate && that_present_stopDate))
return false;
if (this.stopDate != that.stopDate)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_startDate = true;
list.add(present_startDate);
if (present_startDate)
list.add(startDate);
boolean present_stopDate = true;
list.add(present_stopDate);
if (present_stopDate)
list.add(stopDate);
return list.hashCode();
}
@Override
public int compareTo(getTableHistorySize_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartDate()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.startDate, other.startDate);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStopDate()).compareTo(other.isSetStopDate());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStopDate()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.stopDate, other.stopDate);
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("getTableHistorySize_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startDate:");
sb.append(this.startDate);
first = false;
if (!first) sb.append(", ");
sb.append("stopDate:");
sb.append(this.stopDate);
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class getTableHistorySize_argsStandardSchemeFactory implements SchemeFactory {
public getTableHistorySize_argsStandardScheme getScheme() {
return new getTableHistorySize_argsStandardScheme();
}
}
private static class getTableHistorySize_argsStandardScheme extends StandardScheme<getTableHistorySize_args> {
public void read(libthrift091.protocol.TProtocol iprot, getTableHistorySize_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_DATE
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.startDate = iprot.readI64();
struct.setStartDateIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STOP_DATE
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.stopDate = iprot.readI64();
struct.setStopDateIsSet(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, getTableHistorySize_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(START_DATE_FIELD_DESC);
oprot.writeI64(struct.startDate);
oprot.writeFieldEnd();
oprot.writeFieldBegin(STOP_DATE_FIELD_DESC);
oprot.writeI64(struct.stopDate);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableHistorySize_argsTupleSchemeFactory implements SchemeFactory {
public getTableHistorySize_argsTupleScheme getScheme() {
return new getTableHistorySize_argsTupleScheme();
}
}
private static class getTableHistorySize_argsTupleScheme extends TupleScheme<getTableHistorySize_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableHistorySize_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartDate()) {
optionals.set(1);
}
if (struct.isSetStopDate()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetStartDate()) {
oprot.writeI64(struct.startDate);
}
if (struct.isSetStopDate()) {
oprot.writeI64(struct.stopDate);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableHistorySize_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.startDate = iprot.readI64();
struct.setStartDateIsSet(true);
}
if (incoming.get(2)) {
struct.stopDate = iprot.readI64();
struct.setStopDateIsSet(true);
}
}
}
}
public static class getTableHistorySize_result implements libthrift091.TBase<getTableHistorySize_result, getTableHistorySize_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTableHistorySize_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTableHistorySize_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.MAP, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableHistorySize_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableHistorySize_resultTupleSchemeFactory());
}
public Map<Long,Long> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64),
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTableHistorySize_result.class, metaDataMap);
}
public getTableHistorySize_result() {
}
public getTableHistorySize_result(
Map<Long,Long> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableHistorySize_result(getTableHistorySize_result other) {
if (other.isSetSuccess()) {
Map<Long,Long> __this__success = new HashMap<Long,Long>(other.success);
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getTableHistorySize_result deepCopy() {
return new getTableHistorySize_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public void putToSuccess(long key, long val) {
if (this.success == null) {
this.success = new HashMap<Long,Long>();
}
this.success.put(key, val);
}
public Map<Long,Long> getSuccess() {
return this.success;
}
public getTableHistorySize_result setSuccess(Map<Long,Long> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getTableHistorySize_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Map<Long,Long>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableHistorySize_result)
return this.equals((getTableHistorySize_result)that);
return false;
}
public boolean equals(getTableHistorySize_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getTableHistorySize_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getTableHistorySize_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getTableHistorySize_resultStandardSchemeFactory implements SchemeFactory {
public getTableHistorySize_resultStandardScheme getScheme() {
return new getTableHistorySize_resultStandardScheme();
}
}
private static class getTableHistorySize_resultStandardScheme extends StandardScheme<getTableHistorySize_result> {
public void read(libthrift091.protocol.TProtocol iprot, getTableHistorySize_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.MAP) {
{
libthrift091.protocol.TMap _map154 = iprot.readMapBegin();
struct.success = new HashMap<Long,Long>(2*_map154.size);
long _key155;
long _val156;
for (int _i157 = 0; _i157 < _map154.size; ++_i157)
{
_key155 = iprot.readI64();
_val156 = iprot.readI64();
struct.success.put(_key155, _val156);
}
iprot.readMapEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getTableHistorySize_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.I64, libthrift091.protocol.TType.I64, struct.success.size()));
for (Map.Entry<Long, Long> _iter158 : struct.success.entrySet())
{
oprot.writeI64(_iter158.getKey());
oprot.writeI64(_iter158.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableHistorySize_resultTupleSchemeFactory implements SchemeFactory {
public getTableHistorySize_resultTupleScheme getScheme() {
return new getTableHistorySize_resultTupleScheme();
}
}
private static class getTableHistorySize_resultTupleScheme extends TupleScheme<getTableHistorySize_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getTableHistorySize_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (Map.Entry<Long, Long> _iter159 : struct.success.entrySet())
{
oprot.writeI64(_iter159.getKey());
oprot.writeI64(_iter159.getValue());
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getTableHistorySize_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TMap _map160 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.I64, libthrift091.protocol.TType.I64, iprot.readI32());
struct.success = new HashMap<Long,Long>(2*_map160.size);
long _key161;
long _val162;
for (int _i163 = 0; _i163 < _map160.size; ++_i163)
{
_key161 = iprot.readI64();
_val162 = iprot.readI64();
struct.success.put(_key161, _val162);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class renameTable_args implements libthrift091.TBase<renameTable_args, renameTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<renameTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("renameTable_args");
private static final libthrift091.protocol.TField SRC_NAME_FIELD_DESC = new libthrift091.protocol.TField("srcName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField DEST_NAME_FIELD_DESC = new libthrift091.protocol.TField("destName", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new renameTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new renameTable_argsTupleSchemeFactory());
}
public String srcName; // required
public String destName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SRC_NAME((short)1, "srcName"),
DEST_NAME((short)2, "destName");
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: // SRC_NAME
return SRC_NAME;
case 2: // DEST_NAME
return DEST_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
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.SRC_NAME, new libthrift091.meta_data.FieldMetaData("srcName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.DEST_NAME, new libthrift091.meta_data.FieldMetaData("destName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(renameTable_args.class, metaDataMap);
}
public renameTable_args() {
}
public renameTable_args(
String srcName,
String destName)
{
this();
this.srcName = srcName;
this.destName = destName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public renameTable_args(renameTable_args other) {
if (other.isSetSrcName()) {
this.srcName = other.srcName;
}
if (other.isSetDestName()) {
this.destName = other.destName;
}
}
public renameTable_args deepCopy() {
return new renameTable_args(this);
}
@Override
public void clear() {
this.srcName = null;
this.destName = null;
}
public String getSrcName() {
return this.srcName;
}
public renameTable_args setSrcName(String srcName) {
this.srcName = srcName;
return this;
}
public void unsetSrcName() {
this.srcName = null;
}
/** Returns true if field srcName is set (has been assigned a value) and false otherwise */
public boolean isSetSrcName() {
return this.srcName != null;
}
public void setSrcNameIsSet(boolean value) {
if (!value) {
this.srcName = null;
}
}
public String getDestName() {
return this.destName;
}
public renameTable_args setDestName(String destName) {
this.destName = destName;
return this;
}
public void unsetDestName() {
this.destName = null;
}
/** Returns true if field destName is set (has been assigned a value) and false otherwise */
public boolean isSetDestName() {
return this.destName != null;
}
public void setDestNameIsSet(boolean value) {
if (!value) {
this.destName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SRC_NAME:
if (value == null) {
unsetSrcName();
} else {
setSrcName((String)value);
}
break;
case DEST_NAME:
if (value == null) {
unsetDestName();
} else {
setDestName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SRC_NAME:
return getSrcName();
case DEST_NAME:
return getDestName();
}
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 SRC_NAME:
return isSetSrcName();
case DEST_NAME:
return isSetDestName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof renameTable_args)
return this.equals((renameTable_args)that);
return false;
}
public boolean equals(renameTable_args that) {
if (that == null)
return false;
boolean this_present_srcName = true && this.isSetSrcName();
boolean that_present_srcName = true && that.isSetSrcName();
if (this_present_srcName || that_present_srcName) {
if (!(this_present_srcName && that_present_srcName))
return false;
if (!this.srcName.equals(that.srcName))
return false;
}
boolean this_present_destName = true && this.isSetDestName();
boolean that_present_destName = true && that.isSetDestName();
if (this_present_destName || that_present_destName) {
if (!(this_present_destName && that_present_destName))
return false;
if (!this.destName.equals(that.destName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_srcName = true && (isSetSrcName());
list.add(present_srcName);
if (present_srcName)
list.add(srcName);
boolean present_destName = true && (isSetDestName());
list.add(present_destName);
if (present_destName)
list.add(destName);
return list.hashCode();
}
@Override
public int compareTo(renameTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSrcName()).compareTo(other.isSetSrcName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSrcName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.srcName, other.srcName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDestName()).compareTo(other.isSetDestName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDestName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.destName, other.destName);
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("renameTable_args(");
boolean first = true;
sb.append("srcName:");
if (this.srcName == null) {
sb.append("null");
} else {
sb.append(this.srcName);
}
first = false;
if (!first) sb.append(", ");
sb.append("destName:");
if (this.destName == null) {
sb.append("null");
} else {
sb.append(this.destName);
}
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 renameTable_argsStandardSchemeFactory implements SchemeFactory {
public renameTable_argsStandardScheme getScheme() {
return new renameTable_argsStandardScheme();
}
}
private static class renameTable_argsStandardScheme extends StandardScheme<renameTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, renameTable_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: // SRC_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.srcName = iprot.readString();
struct.setSrcNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DEST_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.destName = iprot.readString();
struct.setDestNameIsSet(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, renameTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.srcName != null) {
oprot.writeFieldBegin(SRC_NAME_FIELD_DESC);
oprot.writeString(struct.srcName);
oprot.writeFieldEnd();
}
if (struct.destName != null) {
oprot.writeFieldBegin(DEST_NAME_FIELD_DESC);
oprot.writeString(struct.destName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class renameTable_argsTupleSchemeFactory implements SchemeFactory {
public renameTable_argsTupleScheme getScheme() {
return new renameTable_argsTupleScheme();
}
}
private static class renameTable_argsTupleScheme extends TupleScheme<renameTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, renameTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSrcName()) {
optionals.set(0);
}
if (struct.isSetDestName()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSrcName()) {
oprot.writeString(struct.srcName);
}
if (struct.isSetDestName()) {
oprot.writeString(struct.destName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, renameTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.srcName = iprot.readString();
struct.setSrcNameIsSet(true);
}
if (incoming.get(1)) {
struct.destName = iprot.readString();
struct.setDestNameIsSet(true);
}
}
}
}
public static class renameTable_result implements libthrift091.TBase<renameTable_result, renameTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<renameTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("renameTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new renameTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new renameTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(renameTable_result.class, metaDataMap);
}
public renameTable_result() {
}
public renameTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public renameTable_result(renameTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public renameTable_result deepCopy() {
return new renameTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public renameTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof renameTable_result)
return this.equals((renameTable_result)that);
return false;
}
public boolean equals(renameTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(renameTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("renameTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 renameTable_resultStandardSchemeFactory implements SchemeFactory {
public renameTable_resultStandardScheme getScheme() {
return new renameTable_resultStandardScheme();
}
}
private static class renameTable_resultStandardScheme extends StandardScheme<renameTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, renameTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, renameTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class renameTable_resultTupleSchemeFactory implements SchemeFactory {
public renameTable_resultTupleScheme getScheme() {
return new renameTable_resultTupleScheme();
}
}
private static class renameTable_resultTupleScheme extends TupleScheme<renameTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, renameTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, renameTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class listSnapshots_args implements libthrift091.TBase<listSnapshots_args, listSnapshots_args._Fields>, java.io.Serializable, Cloneable, Comparable<listSnapshots_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listSnapshots_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listSnapshots_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new listSnapshots_argsTupleSchemeFactory());
}
public String tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName");
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: // TABLE_NAME
return TABLE_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listSnapshots_args.class, metaDataMap);
}
public listSnapshots_args() {
}
public listSnapshots_args(
String tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listSnapshots_args(listSnapshots_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public listSnapshots_args deepCopy() {
return new listSnapshots_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
public String getTableName() {
return this.tableName;
}
public listSnapshots_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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 TABLE_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listSnapshots_args)
return this.equals((listSnapshots_args)that);
return false;
}
public boolean equals(listSnapshots_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
return list.hashCode();
}
@Override
public int compareTo(listSnapshots_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
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("listSnapshots_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
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 listSnapshots_argsStandardSchemeFactory implements SchemeFactory {
public listSnapshots_argsStandardScheme getScheme() {
return new listSnapshots_argsStandardScheme();
}
}
private static class listSnapshots_argsStandardScheme extends StandardScheme<listSnapshots_args> {
public void read(libthrift091.protocol.TProtocol iprot, listSnapshots_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(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, listSnapshots_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listSnapshots_argsTupleSchemeFactory implements SchemeFactory {
public listSnapshots_argsTupleScheme getScheme() {
return new listSnapshots_argsTupleScheme();
}
}
private static class listSnapshots_argsTupleScheme extends TupleScheme<listSnapshots_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listSnapshots_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listSnapshots_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
}
public static class listSnapshots_result implements libthrift091.TBase<listSnapshots_result, listSnapshots_result._Fields>, java.io.Serializable, Cloneable, Comparable<listSnapshots_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listSnapshots_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listSnapshots_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new listSnapshots_resultTupleSchemeFactory());
}
public TableSnapshots success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, TableSnapshots.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listSnapshots_result.class, metaDataMap);
}
public listSnapshots_result() {
}
public listSnapshots_result(
TableSnapshots success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listSnapshots_result(listSnapshots_result other) {
if (other.isSetSuccess()) {
this.success = new TableSnapshots(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public listSnapshots_result deepCopy() {
return new listSnapshots_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public TableSnapshots getSuccess() {
return this.success;
}
public listSnapshots_result setSuccess(TableSnapshots 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public listSnapshots_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TableSnapshots)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listSnapshots_result)
return this.equals((listSnapshots_result)that);
return false;
}
public boolean equals(listSnapshots_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(listSnapshots_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("listSnapshots_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 listSnapshots_resultStandardSchemeFactory implements SchemeFactory {
public listSnapshots_resultStandardScheme getScheme() {
return new listSnapshots_resultStandardScheme();
}
}
private static class listSnapshots_resultStandardScheme extends StandardScheme<listSnapshots_result> {
public void read(libthrift091.protocol.TProtocol iprot, listSnapshots_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 TableSnapshots();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, listSnapshots_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listSnapshots_resultTupleSchemeFactory implements SchemeFactory {
public listSnapshots_resultTupleScheme getScheme() {
return new listSnapshots_resultTupleScheme();
}
}
private static class listSnapshots_resultTupleScheme extends TupleScheme<listSnapshots_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listSnapshots_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listSnapshots_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TableSnapshots();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class snapshotTable_args implements libthrift091.TBase<snapshotTable_args, snapshotTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<snapshotTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("snapshotTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SNAPSHOT_NAME_FIELD_DESC = new libthrift091.protocol.TField("snapshotName", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new snapshotTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new snapshotTable_argsTupleSchemeFactory());
}
public String tableName; // required
public String snapshotName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
SNAPSHOT_NAME((short)2, "snapshotName");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // SNAPSHOT_NAME
return SNAPSHOT_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_NAME, new libthrift091.meta_data.FieldMetaData("snapshotName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(snapshotTable_args.class, metaDataMap);
}
public snapshotTable_args() {
}
public snapshotTable_args(
String tableName,
String snapshotName)
{
this();
this.tableName = tableName;
this.snapshotName = snapshotName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public snapshotTable_args(snapshotTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetSnapshotName()) {
this.snapshotName = other.snapshotName;
}
}
public snapshotTable_args deepCopy() {
return new snapshotTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.snapshotName = null;
}
public String getTableName() {
return this.tableName;
}
public snapshotTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getSnapshotName() {
return this.snapshotName;
}
public snapshotTable_args setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
return this;
}
public void unsetSnapshotName() {
this.snapshotName = null;
}
/** Returns true if field snapshotName is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotName() {
return this.snapshotName != null;
}
public void setSnapshotNameIsSet(boolean value) {
if (!value) {
this.snapshotName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case SNAPSHOT_NAME:
if (value == null) {
unsetSnapshotName();
} else {
setSnapshotName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case SNAPSHOT_NAME:
return getSnapshotName();
}
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 TABLE_NAME:
return isSetTableName();
case SNAPSHOT_NAME:
return isSetSnapshotName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof snapshotTable_args)
return this.equals((snapshotTable_args)that);
return false;
}
public boolean equals(snapshotTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_snapshotName = true && this.isSetSnapshotName();
boolean that_present_snapshotName = true && that.isSetSnapshotName();
if (this_present_snapshotName || that_present_snapshotName) {
if (!(this_present_snapshotName && that_present_snapshotName))
return false;
if (!this.snapshotName.equals(that.snapshotName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_snapshotName = true && (isSetSnapshotName());
list.add(present_snapshotName);
if (present_snapshotName)
list.add(snapshotName);
return list.hashCode();
}
@Override
public int compareTo(snapshotTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSnapshotName()).compareTo(other.isSetSnapshotName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.snapshotName, other.snapshotName);
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("snapshotTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("snapshotName:");
if (this.snapshotName == null) {
sb.append("null");
} else {
sb.append(this.snapshotName);
}
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 snapshotTable_argsStandardSchemeFactory implements SchemeFactory {
public snapshotTable_argsStandardScheme getScheme() {
return new snapshotTable_argsStandardScheme();
}
}
private static class snapshotTable_argsStandardScheme extends StandardScheme<snapshotTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, snapshotTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SNAPSHOT_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(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, snapshotTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.snapshotName != null) {
oprot.writeFieldBegin(SNAPSHOT_NAME_FIELD_DESC);
oprot.writeString(struct.snapshotName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class snapshotTable_argsTupleSchemeFactory implements SchemeFactory {
public snapshotTable_argsTupleScheme getScheme() {
return new snapshotTable_argsTupleScheme();
}
}
private static class snapshotTable_argsTupleScheme extends TupleScheme<snapshotTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, snapshotTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetSnapshotName()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetSnapshotName()) {
oprot.writeString(struct.snapshotName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, snapshotTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(true);
}
}
}
}
public static class snapshotTable_result implements libthrift091.TBase<snapshotTable_result, snapshotTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<snapshotTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("snapshotTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new snapshotTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new snapshotTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(snapshotTable_result.class, metaDataMap);
}
public snapshotTable_result() {
}
public snapshotTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public snapshotTable_result(snapshotTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public snapshotTable_result deepCopy() {
return new snapshotTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public snapshotTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof snapshotTable_result)
return this.equals((snapshotTable_result)that);
return false;
}
public boolean equals(snapshotTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(snapshotTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("snapshotTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 snapshotTable_resultStandardSchemeFactory implements SchemeFactory {
public snapshotTable_resultStandardScheme getScheme() {
return new snapshotTable_resultStandardScheme();
}
}
private static class snapshotTable_resultStandardScheme extends StandardScheme<snapshotTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, snapshotTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, snapshotTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class snapshotTable_resultTupleSchemeFactory implements SchemeFactory {
public snapshotTable_resultTupleScheme getScheme() {
return new snapshotTable_resultTupleScheme();
}
}
private static class snapshotTable_resultTupleScheme extends TupleScheme<snapshotTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, snapshotTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, snapshotTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class deleteSnapshot_args implements libthrift091.TBase<deleteSnapshot_args, deleteSnapshot_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSnapshot_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteSnapshot_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SNAPSHOT_NAME_FIELD_DESC = new libthrift091.protocol.TField("snapshotName", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteSnapshot_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteSnapshot_argsTupleSchemeFactory());
}
public String tableName; // required
public String snapshotName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
SNAPSHOT_NAME((short)2, "snapshotName");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // SNAPSHOT_NAME
return SNAPSHOT_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_NAME, new libthrift091.meta_data.FieldMetaData("snapshotName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteSnapshot_args.class, metaDataMap);
}
public deleteSnapshot_args() {
}
public deleteSnapshot_args(
String tableName,
String snapshotName)
{
this();
this.tableName = tableName;
this.snapshotName = snapshotName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteSnapshot_args(deleteSnapshot_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetSnapshotName()) {
this.snapshotName = other.snapshotName;
}
}
public deleteSnapshot_args deepCopy() {
return new deleteSnapshot_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.snapshotName = null;
}
public String getTableName() {
return this.tableName;
}
public deleteSnapshot_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getSnapshotName() {
return this.snapshotName;
}
public deleteSnapshot_args setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
return this;
}
public void unsetSnapshotName() {
this.snapshotName = null;
}
/** Returns true if field snapshotName is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotName() {
return this.snapshotName != null;
}
public void setSnapshotNameIsSet(boolean value) {
if (!value) {
this.snapshotName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case SNAPSHOT_NAME:
if (value == null) {
unsetSnapshotName();
} else {
setSnapshotName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case SNAPSHOT_NAME:
return getSnapshotName();
}
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 TABLE_NAME:
return isSetTableName();
case SNAPSHOT_NAME:
return isSetSnapshotName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteSnapshot_args)
return this.equals((deleteSnapshot_args)that);
return false;
}
public boolean equals(deleteSnapshot_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_snapshotName = true && this.isSetSnapshotName();
boolean that_present_snapshotName = true && that.isSetSnapshotName();
if (this_present_snapshotName || that_present_snapshotName) {
if (!(this_present_snapshotName && that_present_snapshotName))
return false;
if (!this.snapshotName.equals(that.snapshotName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_snapshotName = true && (isSetSnapshotName());
list.add(present_snapshotName);
if (present_snapshotName)
list.add(snapshotName);
return list.hashCode();
}
@Override
public int compareTo(deleteSnapshot_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSnapshotName()).compareTo(other.isSetSnapshotName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.snapshotName, other.snapshotName);
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("deleteSnapshot_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("snapshotName:");
if (this.snapshotName == null) {
sb.append("null");
} else {
sb.append(this.snapshotName);
}
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 deleteSnapshot_argsStandardSchemeFactory implements SchemeFactory {
public deleteSnapshot_argsStandardScheme getScheme() {
return new deleteSnapshot_argsStandardScheme();
}
}
private static class deleteSnapshot_argsStandardScheme extends StandardScheme<deleteSnapshot_args> {
public void read(libthrift091.protocol.TProtocol iprot, deleteSnapshot_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SNAPSHOT_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(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, deleteSnapshot_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.snapshotName != null) {
oprot.writeFieldBegin(SNAPSHOT_NAME_FIELD_DESC);
oprot.writeString(struct.snapshotName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteSnapshot_argsTupleSchemeFactory implements SchemeFactory {
public deleteSnapshot_argsTupleScheme getScheme() {
return new deleteSnapshot_argsTupleScheme();
}
}
private static class deleteSnapshot_argsTupleScheme extends TupleScheme<deleteSnapshot_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteSnapshot_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetSnapshotName()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetSnapshotName()) {
oprot.writeString(struct.snapshotName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteSnapshot_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(true);
}
}
}
}
public static class deleteSnapshot_result implements libthrift091.TBase<deleteSnapshot_result, deleteSnapshot_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSnapshot_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteSnapshot_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteSnapshot_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteSnapshot_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteSnapshot_result.class, metaDataMap);
}
public deleteSnapshot_result() {
}
public deleteSnapshot_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteSnapshot_result(deleteSnapshot_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public deleteSnapshot_result deepCopy() {
return new deleteSnapshot_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public deleteSnapshot_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteSnapshot_result)
return this.equals((deleteSnapshot_result)that);
return false;
}
public boolean equals(deleteSnapshot_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(deleteSnapshot_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("deleteSnapshot_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 deleteSnapshot_resultStandardSchemeFactory implements SchemeFactory {
public deleteSnapshot_resultStandardScheme getScheme() {
return new deleteSnapshot_resultStandardScheme();
}
}
private static class deleteSnapshot_resultStandardScheme extends StandardScheme<deleteSnapshot_result> {
public void read(libthrift091.protocol.TProtocol iprot, deleteSnapshot_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, deleteSnapshot_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteSnapshot_resultTupleSchemeFactory implements SchemeFactory {
public deleteSnapshot_resultTupleScheme getScheme() {
return new deleteSnapshot_resultTupleScheme();
}
}
private static class deleteSnapshot_resultTupleScheme extends TupleScheme<deleteSnapshot_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteSnapshot_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteSnapshot_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class restoreSnapshot_args implements libthrift091.TBase<restoreSnapshot_args, restoreSnapshot_args._Fields>, java.io.Serializable, Cloneable, Comparable<restoreSnapshot_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("restoreSnapshot_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SNAPSHOT_NAME_FIELD_DESC = new libthrift091.protocol.TField("snapshotName", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("destTableName", libthrift091.protocol.TType.STRING, (short)3);
private static final libthrift091.protocol.TField IS_SYSTEM_FIELD_DESC = new libthrift091.protocol.TField("isSystem", libthrift091.protocol.TType.BOOL, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new restoreSnapshot_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new restoreSnapshot_argsTupleSchemeFactory());
}
public String tableName; // required
public String snapshotName; // required
public String destTableName; // required
public boolean isSystem; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
SNAPSHOT_NAME((short)2, "snapshotName"),
DEST_TABLE_NAME((short)3, "destTableName"),
IS_SYSTEM((short)4, "isSystem");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // SNAPSHOT_NAME
return SNAPSHOT_NAME;
case 3: // DEST_TABLE_NAME
return DEST_TABLE_NAME;
case 4: // IS_SYSTEM
return IS_SYSTEM;
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 __ISSYSTEM_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_NAME, new libthrift091.meta_data.FieldMetaData("snapshotName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.DEST_TABLE_NAME, new libthrift091.meta_data.FieldMetaData("destTableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.IS_SYSTEM, new libthrift091.meta_data.FieldMetaData("isSystem", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(restoreSnapshot_args.class, metaDataMap);
}
public restoreSnapshot_args() {
}
public restoreSnapshot_args(
String tableName,
String snapshotName,
String destTableName,
boolean isSystem)
{
this();
this.tableName = tableName;
this.snapshotName = snapshotName;
this.destTableName = destTableName;
this.isSystem = isSystem;
setIsSystemIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public restoreSnapshot_args(restoreSnapshot_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetSnapshotName()) {
this.snapshotName = other.snapshotName;
}
if (other.isSetDestTableName()) {
this.destTableName = other.destTableName;
}
this.isSystem = other.isSystem;
}
public restoreSnapshot_args deepCopy() {
return new restoreSnapshot_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.snapshotName = null;
this.destTableName = null;
setIsSystemIsSet(false);
this.isSystem = false;
}
public String getTableName() {
return this.tableName;
}
public restoreSnapshot_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getSnapshotName() {
return this.snapshotName;
}
public restoreSnapshot_args setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
return this;
}
public void unsetSnapshotName() {
this.snapshotName = null;
}
/** Returns true if field snapshotName is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotName() {
return this.snapshotName != null;
}
public void setSnapshotNameIsSet(boolean value) {
if (!value) {
this.snapshotName = null;
}
}
public String getDestTableName() {
return this.destTableName;
}
public restoreSnapshot_args setDestTableName(String destTableName) {
this.destTableName = destTableName;
return this;
}
public void unsetDestTableName() {
this.destTableName = null;
}
/** Returns true if field destTableName is set (has been assigned a value) and false otherwise */
public boolean isSetDestTableName() {
return this.destTableName != null;
}
public void setDestTableNameIsSet(boolean value) {
if (!value) {
this.destTableName = null;
}
}
public boolean isIsSystem() {
return this.isSystem;
}
public restoreSnapshot_args setIsSystem(boolean isSystem) {
this.isSystem = isSystem;
setIsSystemIsSet(true);
return this;
}
public void unsetIsSystem() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSYSTEM_ISSET_ID);
}
/** Returns true if field isSystem is set (has been assigned a value) and false otherwise */
public boolean isSetIsSystem() {
return EncodingUtils.testBit(__isset_bitfield, __ISSYSTEM_ISSET_ID);
}
public void setIsSystemIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSYSTEM_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case SNAPSHOT_NAME:
if (value == null) {
unsetSnapshotName();
} else {
setSnapshotName((String)value);
}
break;
case DEST_TABLE_NAME:
if (value == null) {
unsetDestTableName();
} else {
setDestTableName((String)value);
}
break;
case IS_SYSTEM:
if (value == null) {
unsetIsSystem();
} else {
setIsSystem((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case SNAPSHOT_NAME:
return getSnapshotName();
case DEST_TABLE_NAME:
return getDestTableName();
case IS_SYSTEM:
return Boolean.valueOf(isIsSystem());
}
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 TABLE_NAME:
return isSetTableName();
case SNAPSHOT_NAME:
return isSetSnapshotName();
case DEST_TABLE_NAME:
return isSetDestTableName();
case IS_SYSTEM:
return isSetIsSystem();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof restoreSnapshot_args)
return this.equals((restoreSnapshot_args)that);
return false;
}
public boolean equals(restoreSnapshot_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_snapshotName = true && this.isSetSnapshotName();
boolean that_present_snapshotName = true && that.isSetSnapshotName();
if (this_present_snapshotName || that_present_snapshotName) {
if (!(this_present_snapshotName && that_present_snapshotName))
return false;
if (!this.snapshotName.equals(that.snapshotName))
return false;
}
boolean this_present_destTableName = true && this.isSetDestTableName();
boolean that_present_destTableName = true && that.isSetDestTableName();
if (this_present_destTableName || that_present_destTableName) {
if (!(this_present_destTableName && that_present_destTableName))
return false;
if (!this.destTableName.equals(that.destTableName))
return false;
}
boolean this_present_isSystem = true;
boolean that_present_isSystem = true;
if (this_present_isSystem || that_present_isSystem) {
if (!(this_present_isSystem && that_present_isSystem))
return false;
if (this.isSystem != that.isSystem)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_snapshotName = true && (isSetSnapshotName());
list.add(present_snapshotName);
if (present_snapshotName)
list.add(snapshotName);
boolean present_destTableName = true && (isSetDestTableName());
list.add(present_destTableName);
if (present_destTableName)
list.add(destTableName);
boolean present_isSystem = true;
list.add(present_isSystem);
if (present_isSystem)
list.add(isSystem);
return list.hashCode();
}
@Override
public int compareTo(restoreSnapshot_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSnapshotName()).compareTo(other.isSetSnapshotName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.snapshotName, other.snapshotName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDestTableName()).compareTo(other.isSetDestTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDestTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.destTableName, other.destTableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIsSystem()).compareTo(other.isSetIsSystem());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsSystem()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.isSystem, other.isSystem);
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("restoreSnapshot_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("snapshotName:");
if (this.snapshotName == null) {
sb.append("null");
} else {
sb.append(this.snapshotName);
}
first = false;
if (!first) sb.append(", ");
sb.append("destTableName:");
if (this.destTableName == null) {
sb.append("null");
} else {
sb.append(this.destTableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("isSystem:");
sb.append(this.isSystem);
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class restoreSnapshot_argsStandardSchemeFactory implements SchemeFactory {
public restoreSnapshot_argsStandardScheme getScheme() {
return new restoreSnapshot_argsStandardScheme();
}
}
private static class restoreSnapshot_argsStandardScheme extends StandardScheme<restoreSnapshot_args> {
public void read(libthrift091.protocol.TProtocol iprot, restoreSnapshot_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SNAPSHOT_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DEST_TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.destTableName = iprot.readString();
struct.setDestTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // IS_SYSTEM
if (schemeField.type == libthrift091.protocol.TType.BOOL) {
struct.isSystem = iprot.readBool();
struct.setIsSystemIsSet(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, restoreSnapshot_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.snapshotName != null) {
oprot.writeFieldBegin(SNAPSHOT_NAME_FIELD_DESC);
oprot.writeString(struct.snapshotName);
oprot.writeFieldEnd();
}
if (struct.destTableName != null) {
oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.destTableName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(IS_SYSTEM_FIELD_DESC);
oprot.writeBool(struct.isSystem);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class restoreSnapshot_argsTupleSchemeFactory implements SchemeFactory {
public restoreSnapshot_argsTupleScheme getScheme() {
return new restoreSnapshot_argsTupleScheme();
}
}
private static class restoreSnapshot_argsTupleScheme extends TupleScheme<restoreSnapshot_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, restoreSnapshot_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetSnapshotName()) {
optionals.set(1);
}
if (struct.isSetDestTableName()) {
optionals.set(2);
}
if (struct.isSetIsSystem()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetSnapshotName()) {
oprot.writeString(struct.snapshotName);
}
if (struct.isSetDestTableName()) {
oprot.writeString(struct.destTableName);
}
if (struct.isSetIsSystem()) {
oprot.writeBool(struct.isSystem);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, restoreSnapshot_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(true);
}
if (incoming.get(2)) {
struct.destTableName = iprot.readString();
struct.setDestTableNameIsSet(true);
}
if (incoming.get(3)) {
struct.isSystem = iprot.readBool();
struct.setIsSystemIsSet(true);
}
}
}
}
public static class restoreSnapshot_result implements libthrift091.TBase<restoreSnapshot_result, restoreSnapshot_result._Fields>, java.io.Serializable, Cloneable, Comparable<restoreSnapshot_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("restoreSnapshot_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new restoreSnapshot_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new restoreSnapshot_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(restoreSnapshot_result.class, metaDataMap);
}
public restoreSnapshot_result() {
}
public restoreSnapshot_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public restoreSnapshot_result(restoreSnapshot_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public restoreSnapshot_result deepCopy() {
return new restoreSnapshot_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public restoreSnapshot_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof restoreSnapshot_result)
return this.equals((restoreSnapshot_result)that);
return false;
}
public boolean equals(restoreSnapshot_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(restoreSnapshot_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("restoreSnapshot_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 restoreSnapshot_resultStandardSchemeFactory implements SchemeFactory {
public restoreSnapshot_resultStandardScheme getScheme() {
return new restoreSnapshot_resultStandardScheme();
}
}
private static class restoreSnapshot_resultStandardScheme extends StandardScheme<restoreSnapshot_result> {
public void read(libthrift091.protocol.TProtocol iprot, restoreSnapshot_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, restoreSnapshot_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class restoreSnapshot_resultTupleSchemeFactory implements SchemeFactory {
public restoreSnapshot_resultTupleScheme getScheme() {
return new restoreSnapshot_resultTupleScheme();
}
}
private static class restoreSnapshot_resultTupleScheme extends TupleScheme<restoreSnapshot_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, restoreSnapshot_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, restoreSnapshot_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class listAllSnapshots_args implements libthrift091.TBase<listAllSnapshots_args, listAllSnapshots_args._Fields>, java.io.Serializable, Cloneable, Comparable<listAllSnapshots_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listAllSnapshots_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listAllSnapshots_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new listAllSnapshots_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<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) {
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(listAllSnapshots_args.class, metaDataMap);
}
public listAllSnapshots_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listAllSnapshots_args(listAllSnapshots_args other) {
}
public listAllSnapshots_args deepCopy() {
return new listAllSnapshots_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 listAllSnapshots_args)
return this.equals((listAllSnapshots_args)that);
return false;
}
public boolean equals(listAllSnapshots_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
return list.hashCode();
}
@Override
public int compareTo(listAllSnapshots_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("listAllSnapshots_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 listAllSnapshots_argsStandardSchemeFactory implements SchemeFactory {
public listAllSnapshots_argsStandardScheme getScheme() {
return new listAllSnapshots_argsStandardScheme();
}
}
private static class listAllSnapshots_argsStandardScheme extends StandardScheme<listAllSnapshots_args> {
public void read(libthrift091.protocol.TProtocol iprot, listAllSnapshots_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, listAllSnapshots_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listAllSnapshots_argsTupleSchemeFactory implements SchemeFactory {
public listAllSnapshots_argsTupleScheme getScheme() {
return new listAllSnapshots_argsTupleScheme();
}
}
private static class listAllSnapshots_argsTupleScheme extends TupleScheme<listAllSnapshots_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listAllSnapshots_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listAllSnapshots_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class listAllSnapshots_result implements libthrift091.TBase<listAllSnapshots_result, listAllSnapshots_result._Fields>, java.io.Serializable, Cloneable, Comparable<listAllSnapshots_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listAllSnapshots_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listAllSnapshots_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new listAllSnapshots_resultTupleSchemeFactory());
}
public List<SnapshotTableView> success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SnapshotTableView.class))));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listAllSnapshots_result.class, metaDataMap);
}
public listAllSnapshots_result() {
}
public listAllSnapshots_result(
List<SnapshotTableView> success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listAllSnapshots_result(listAllSnapshots_result other) {
if (other.isSetSuccess()) {
List<SnapshotTableView> __this__success = new ArrayList<SnapshotTableView>(other.success.size());
for (SnapshotTableView other_element : other.success) {
__this__success.add(new SnapshotTableView(other_element));
}
this.success = __this__success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public listAllSnapshots_result deepCopy() {
return new listAllSnapshots_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<SnapshotTableView> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(SnapshotTableView elem) {
if (this.success == null) {
this.success = new ArrayList<SnapshotTableView>();
}
this.success.add(elem);
}
public List<SnapshotTableView> getSuccess() {
return this.success;
}
public listAllSnapshots_result setSuccess(List<SnapshotTableView> 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public listAllSnapshots_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<SnapshotTableView>)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listAllSnapshots_result)
return this.equals((listAllSnapshots_result)that);
return false;
}
public boolean equals(listAllSnapshots_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(listAllSnapshots_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("listAllSnapshots_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 listAllSnapshots_resultStandardSchemeFactory implements SchemeFactory {
public listAllSnapshots_resultStandardScheme getScheme() {
return new listAllSnapshots_resultStandardScheme();
}
}
private static class listAllSnapshots_resultStandardScheme extends StandardScheme<listAllSnapshots_result> {
public void read(libthrift091.protocol.TProtocol iprot, listAllSnapshots_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.LIST) {
{
libthrift091.protocol.TList _list164 = iprot.readListBegin();
struct.success = new ArrayList<SnapshotTableView>(_list164.size);
SnapshotTableView _elem165;
for (int _i166 = 0; _i166 < _list164.size; ++_i166)
{
_elem165 = new SnapshotTableView();
_elem165.read(iprot);
struct.success.add(_elem165);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, listAllSnapshots_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (SnapshotTableView _iter167 : struct.success)
{
_iter167.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listAllSnapshots_resultTupleSchemeFactory implements SchemeFactory {
public listAllSnapshots_resultTupleScheme getScheme() {
return new listAllSnapshots_resultTupleScheme();
}
}
private static class listAllSnapshots_resultTupleScheme extends TupleScheme<listAllSnapshots_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, listAllSnapshots_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (SnapshotTableView _iter168 : struct.success)
{
_iter168.write(oprot);
}
}
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listAllSnapshots_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list169 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<SnapshotTableView>(_list169.size);
SnapshotTableView _elem170;
for (int _i171 = 0; _i171 < _list169.size; ++_i171)
{
_elem170 = new SnapshotTableView();
_elem170.read(iprot);
struct.success.add(_elem170);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class cancelSnapshotTable_args implements libthrift091.TBase<cancelSnapshotTable_args, cancelSnapshotTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelSnapshotTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("cancelSnapshotTable_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SNAPSHOT_NAME_FIELD_DESC = new libthrift091.protocol.TField("snapshotName", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new cancelSnapshotTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new cancelSnapshotTable_argsTupleSchemeFactory());
}
public String tableName; // required
public String snapshotName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
SNAPSHOT_NAME((short)2, "snapshotName");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // SNAPSHOT_NAME
return SNAPSHOT_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_NAME, new libthrift091.meta_data.FieldMetaData("snapshotName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(cancelSnapshotTable_args.class, metaDataMap);
}
public cancelSnapshotTable_args() {
}
public cancelSnapshotTable_args(
String tableName,
String snapshotName)
{
this();
this.tableName = tableName;
this.snapshotName = snapshotName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cancelSnapshotTable_args(cancelSnapshotTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetSnapshotName()) {
this.snapshotName = other.snapshotName;
}
}
public cancelSnapshotTable_args deepCopy() {
return new cancelSnapshotTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.snapshotName = null;
}
public String getTableName() {
return this.tableName;
}
public cancelSnapshotTable_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getSnapshotName() {
return this.snapshotName;
}
public cancelSnapshotTable_args setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
return this;
}
public void unsetSnapshotName() {
this.snapshotName = null;
}
/** Returns true if field snapshotName is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotName() {
return this.snapshotName != null;
}
public void setSnapshotNameIsSet(boolean value) {
if (!value) {
this.snapshotName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case SNAPSHOT_NAME:
if (value == null) {
unsetSnapshotName();
} else {
setSnapshotName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case SNAPSHOT_NAME:
return getSnapshotName();
}
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 TABLE_NAME:
return isSetTableName();
case SNAPSHOT_NAME:
return isSetSnapshotName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof cancelSnapshotTable_args)
return this.equals((cancelSnapshotTable_args)that);
return false;
}
public boolean equals(cancelSnapshotTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_snapshotName = true && this.isSetSnapshotName();
boolean that_present_snapshotName = true && that.isSetSnapshotName();
if (this_present_snapshotName || that_present_snapshotName) {
if (!(this_present_snapshotName && that_present_snapshotName))
return false;
if (!this.snapshotName.equals(that.snapshotName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_snapshotName = true && (isSetSnapshotName());
list.add(present_snapshotName);
if (present_snapshotName)
list.add(snapshotName);
return list.hashCode();
}
@Override
public int compareTo(cancelSnapshotTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSnapshotName()).compareTo(other.isSetSnapshotName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.snapshotName, other.snapshotName);
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("cancelSnapshotTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("snapshotName:");
if (this.snapshotName == null) {
sb.append("null");
} else {
sb.append(this.snapshotName);
}
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 cancelSnapshotTable_argsStandardSchemeFactory implements SchemeFactory {
public cancelSnapshotTable_argsStandardScheme getScheme() {
return new cancelSnapshotTable_argsStandardScheme();
}
}
private static class cancelSnapshotTable_argsStandardScheme extends StandardScheme<cancelSnapshotTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, cancelSnapshotTable_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SNAPSHOT_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(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, cancelSnapshotTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.snapshotName != null) {
oprot.writeFieldBegin(SNAPSHOT_NAME_FIELD_DESC);
oprot.writeString(struct.snapshotName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class cancelSnapshotTable_argsTupleSchemeFactory implements SchemeFactory {
public cancelSnapshotTable_argsTupleScheme getScheme() {
return new cancelSnapshotTable_argsTupleScheme();
}
}
private static class cancelSnapshotTable_argsTupleScheme extends TupleScheme<cancelSnapshotTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, cancelSnapshotTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetSnapshotName()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetSnapshotName()) {
oprot.writeString(struct.snapshotName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, cancelSnapshotTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(true);
}
}
}
}
public static class cancelSnapshotTable_result implements libthrift091.TBase<cancelSnapshotTable_result, cancelSnapshotTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelSnapshotTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("cancelSnapshotTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new cancelSnapshotTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new cancelSnapshotTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(cancelSnapshotTable_result.class, metaDataMap);
}
public cancelSnapshotTable_result() {
}
public cancelSnapshotTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cancelSnapshotTable_result(cancelSnapshotTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public cancelSnapshotTable_result deepCopy() {
return new cancelSnapshotTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public cancelSnapshotTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof cancelSnapshotTable_result)
return this.equals((cancelSnapshotTable_result)that);
return false;
}
public boolean equals(cancelSnapshotTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(cancelSnapshotTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("cancelSnapshotTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 cancelSnapshotTable_resultStandardSchemeFactory implements SchemeFactory {
public cancelSnapshotTable_resultStandardScheme getScheme() {
return new cancelSnapshotTable_resultStandardScheme();
}
}
private static class cancelSnapshotTable_resultStandardScheme extends StandardScheme<cancelSnapshotTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, cancelSnapshotTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, cancelSnapshotTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class cancelSnapshotTable_resultTupleSchemeFactory implements SchemeFactory {
public cancelSnapshotTable_resultTupleScheme getScheme() {
return new cancelSnapshotTable_resultTupleScheme();
}
}
private static class cancelSnapshotTable_resultTupleScheme extends TupleScheme<cancelSnapshotTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, cancelSnapshotTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, cancelSnapshotTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getSnapshotState_args implements libthrift091.TBase<getSnapshotState_args, getSnapshotState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSnapshotState_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getSnapshotState_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField SNAPSHOT_NAME_FIELD_DESC = new libthrift091.protocol.TField("snapshotName", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getSnapshotState_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getSnapshotState_argsTupleSchemeFactory());
}
public String tableName; // required
public String snapshotName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
SNAPSHOT_NAME((short)2, "snapshotName");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // SNAPSHOT_NAME
return SNAPSHOT_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_NAME, new libthrift091.meta_data.FieldMetaData("snapshotName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getSnapshotState_args.class, metaDataMap);
}
public getSnapshotState_args() {
}
public getSnapshotState_args(
String tableName,
String snapshotName)
{
this();
this.tableName = tableName;
this.snapshotName = snapshotName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getSnapshotState_args(getSnapshotState_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetSnapshotName()) {
this.snapshotName = other.snapshotName;
}
}
public getSnapshotState_args deepCopy() {
return new getSnapshotState_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.snapshotName = null;
}
public String getTableName() {
return this.tableName;
}
public getSnapshotState_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getSnapshotName() {
return this.snapshotName;
}
public getSnapshotState_args setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
return this;
}
public void unsetSnapshotName() {
this.snapshotName = null;
}
/** Returns true if field snapshotName is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotName() {
return this.snapshotName != null;
}
public void setSnapshotNameIsSet(boolean value) {
if (!value) {
this.snapshotName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case SNAPSHOT_NAME:
if (value == null) {
unsetSnapshotName();
} else {
setSnapshotName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case SNAPSHOT_NAME:
return getSnapshotName();
}
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 TABLE_NAME:
return isSetTableName();
case SNAPSHOT_NAME:
return isSetSnapshotName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getSnapshotState_args)
return this.equals((getSnapshotState_args)that);
return false;
}
public boolean equals(getSnapshotState_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_snapshotName = true && this.isSetSnapshotName();
boolean that_present_snapshotName = true && that.isSetSnapshotName();
if (this_present_snapshotName || that_present_snapshotName) {
if (!(this_present_snapshotName && that_present_snapshotName))
return false;
if (!this.snapshotName.equals(that.snapshotName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_snapshotName = true && (isSetSnapshotName());
list.add(present_snapshotName);
if (present_snapshotName)
list.add(snapshotName);
return list.hashCode();
}
@Override
public int compareTo(getSnapshotState_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSnapshotName()).compareTo(other.isSetSnapshotName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.snapshotName, other.snapshotName);
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("getSnapshotState_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("snapshotName:");
if (this.snapshotName == null) {
sb.append("null");
} else {
sb.append(this.snapshotName);
}
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 getSnapshotState_argsStandardSchemeFactory implements SchemeFactory {
public getSnapshotState_argsStandardScheme getScheme() {
return new getSnapshotState_argsStandardScheme();
}
}
private static class getSnapshotState_argsStandardScheme extends StandardScheme<getSnapshotState_args> {
public void read(libthrift091.protocol.TProtocol iprot, getSnapshotState_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SNAPSHOT_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(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, getSnapshotState_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.snapshotName != null) {
oprot.writeFieldBegin(SNAPSHOT_NAME_FIELD_DESC);
oprot.writeString(struct.snapshotName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getSnapshotState_argsTupleSchemeFactory implements SchemeFactory {
public getSnapshotState_argsTupleScheme getScheme() {
return new getSnapshotState_argsTupleScheme();
}
}
private static class getSnapshotState_argsTupleScheme extends TupleScheme<getSnapshotState_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getSnapshotState_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetSnapshotName()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetSnapshotName()) {
oprot.writeString(struct.snapshotName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getSnapshotState_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.snapshotName = iprot.readString();
struct.setSnapshotNameIsSet(true);
}
}
}
}
public static class getSnapshotState_result implements libthrift091.TBase<getSnapshotState_result, getSnapshotState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSnapshotState_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getSnapshotState_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.I32, (short)0);
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getSnapshotState_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getSnapshotState_resultTupleSchemeFactory());
}
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.SnapshotState
*/
public com.xiaomi.infra.galaxy.sds.thrift.SnapshotState success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.SnapshotState
*/
SUCCESS((short)0, "success"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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.EnumMetaData(libthrift091.protocol.TType.ENUM, com.xiaomi.infra.galaxy.sds.thrift.SnapshotState.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getSnapshotState_result.class, metaDataMap);
}
public getSnapshotState_result() {
}
public getSnapshotState_result(
com.xiaomi.infra.galaxy.sds.thrift.SnapshotState success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getSnapshotState_result(getSnapshotState_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getSnapshotState_result deepCopy() {
return new getSnapshotState_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.SnapshotState
*/
public com.xiaomi.infra.galaxy.sds.thrift.SnapshotState getSuccess() {
return this.success;
}
/**
*
* @see com.xiaomi.infra.galaxy.sds.thrift.SnapshotState
*/
public getSnapshotState_result setSuccess(com.xiaomi.infra.galaxy.sds.thrift.SnapshotState 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getSnapshotState_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((com.xiaomi.infra.galaxy.sds.thrift.SnapshotState)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getSnapshotState_result)
return this.equals((getSnapshotState_result)that);
return false;
}
public boolean equals(getSnapshotState_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success.getValue());
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getSnapshotState_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getSnapshotState_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getSnapshotState_resultStandardSchemeFactory implements SchemeFactory {
public getSnapshotState_resultStandardScheme getScheme() {
return new getSnapshotState_resultStandardScheme();
}
}
private static class getSnapshotState_resultStandardScheme extends StandardScheme<getSnapshotState_result> {
public void read(libthrift091.protocol.TProtocol iprot, getSnapshotState_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.I32) {
struct.success = com.xiaomi.infra.galaxy.sds.thrift.SnapshotState.findByValue(iprot.readI32());
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getSnapshotState_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success.getValue());
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getSnapshotState_resultTupleSchemeFactory implements SchemeFactory {
public getSnapshotState_resultTupleScheme getScheme() {
return new getSnapshotState_resultTupleScheme();
}
}
private static class getSnapshotState_resultTupleScheme extends TupleScheme<getSnapshotState_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getSnapshotState_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeI32(struct.success.getValue());
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getSnapshotState_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = com.xiaomi.infra.galaxy.sds.thrift.SnapshotState.findByValue(iprot.readI32());
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getQuotaInfo_args implements libthrift091.TBase<getQuotaInfo_args, getQuotaInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getQuotaInfo_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getQuotaInfo_args");
private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getQuotaInfo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getQuotaInfo_argsTupleSchemeFactory());
}
public String spaceId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SPACE_ID((short)1, "spaceId");
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: // SPACE_ID
return SPACE_ID;
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.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQuotaInfo_args.class, metaDataMap);
}
public getQuotaInfo_args() {
}
public getQuotaInfo_args(
String spaceId)
{
this();
this.spaceId = spaceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getQuotaInfo_args(getQuotaInfo_args other) {
if (other.isSetSpaceId()) {
this.spaceId = other.spaceId;
}
}
public getQuotaInfo_args deepCopy() {
return new getQuotaInfo_args(this);
}
@Override
public void clear() {
this.spaceId = null;
}
public String getSpaceId() {
return this.spaceId;
}
public getQuotaInfo_args setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public void unsetSpaceId() {
this.spaceId = null;
}
/** Returns true if field spaceId is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceId() {
return this.spaceId != null;
}
public void setSpaceIdIsSet(boolean value) {
if (!value) {
this.spaceId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SPACE_ID:
if (value == null) {
unsetSpaceId();
} else {
setSpaceId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SPACE_ID:
return getSpaceId();
}
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 SPACE_ID:
return isSetSpaceId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getQuotaInfo_args)
return this.equals((getQuotaInfo_args)that);
return false;
}
public boolean equals(getQuotaInfo_args that) {
if (that == null)
return false;
boolean this_present_spaceId = true && this.isSetSpaceId();
boolean that_present_spaceId = true && that.isSetSpaceId();
if (this_present_spaceId || that_present_spaceId) {
if (!(this_present_spaceId && that_present_spaceId))
return false;
if (!this.spaceId.equals(that.spaceId))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_spaceId = true && (isSetSpaceId());
list.add(present_spaceId);
if (present_spaceId)
list.add(spaceId);
return list.hashCode();
}
@Override
public int compareTo(getQuotaInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId);
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("getQuotaInfo_args(");
boolean first = true;
sb.append("spaceId:");
if (this.spaceId == null) {
sb.append("null");
} else {
sb.append(this.spaceId);
}
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 getQuotaInfo_argsStandardSchemeFactory implements SchemeFactory {
public getQuotaInfo_argsStandardScheme getScheme() {
return new getQuotaInfo_argsStandardScheme();
}
}
private static class getQuotaInfo_argsStandardScheme extends StandardScheme<getQuotaInfo_args> {
public void read(libthrift091.protocol.TProtocol iprot, getQuotaInfo_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: // SPACE_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(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, getQuotaInfo_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.spaceId != null) {
oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
oprot.writeString(struct.spaceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getQuotaInfo_argsTupleSchemeFactory implements SchemeFactory {
public getQuotaInfo_argsTupleScheme getScheme() {
return new getQuotaInfo_argsTupleScheme();
}
}
private static class getQuotaInfo_argsTupleScheme extends TupleScheme<getQuotaInfo_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getQuotaInfo_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSpaceId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSpaceId()) {
oprot.writeString(struct.spaceId);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getQuotaInfo_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.spaceId = iprot.readString();
struct.setSpaceIdIsSet(true);
}
}
}
}
public static class getQuotaInfo_result implements libthrift091.TBase<getQuotaInfo_result, getQuotaInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getQuotaInfo_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getQuotaInfo_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getQuotaInfo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getQuotaInfo_resultTupleSchemeFactory());
}
public QuotaInfo success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, QuotaInfo.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQuotaInfo_result.class, metaDataMap);
}
public getQuotaInfo_result() {
}
public getQuotaInfo_result(
QuotaInfo success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getQuotaInfo_result(getQuotaInfo_result other) {
if (other.isSetSuccess()) {
this.success = new QuotaInfo(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getQuotaInfo_result deepCopy() {
return new getQuotaInfo_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public QuotaInfo getSuccess() {
return this.success;
}
public getQuotaInfo_result setSuccess(QuotaInfo 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getQuotaInfo_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((QuotaInfo)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getQuotaInfo_result)
return this.equals((getQuotaInfo_result)that);
return false;
}
public boolean equals(getQuotaInfo_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getQuotaInfo_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getQuotaInfo_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getQuotaInfo_resultStandardSchemeFactory implements SchemeFactory {
public getQuotaInfo_resultStandardScheme getScheme() {
return new getQuotaInfo_resultStandardScheme();
}
}
private static class getQuotaInfo_resultStandardScheme extends StandardScheme<getQuotaInfo_result> {
public void read(libthrift091.protocol.TProtocol iprot, getQuotaInfo_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 QuotaInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getQuotaInfo_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getQuotaInfo_resultTupleSchemeFactory implements SchemeFactory {
public getQuotaInfo_resultTupleScheme getScheme() {
return new getQuotaInfo_resultTupleScheme();
}
}
private static class getQuotaInfo_resultTupleScheme extends TupleScheme<getQuotaInfo_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getQuotaInfo_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getQuotaInfo_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new QuotaInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getLatestStreamCheckpoint_args implements libthrift091.TBase<getLatestStreamCheckpoint_args, getLatestStreamCheckpoint_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLatestStreamCheckpoint_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getLatestStreamCheckpoint_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField TOPIC_NAME_FIELD_DESC = new libthrift091.protocol.TField("topicName", libthrift091.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getLatestStreamCheckpoint_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getLatestStreamCheckpoint_argsTupleSchemeFactory());
}
public String tableName; // required
public String topicName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
TOPIC_NAME((short)2, "topicName");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // TOPIC_NAME
return TOPIC_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
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TOPIC_NAME, new libthrift091.meta_data.FieldMetaData("topicName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getLatestStreamCheckpoint_args.class, metaDataMap);
}
public getLatestStreamCheckpoint_args() {
}
public getLatestStreamCheckpoint_args(
String tableName,
String topicName)
{
this();
this.tableName = tableName;
this.topicName = topicName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getLatestStreamCheckpoint_args(getLatestStreamCheckpoint_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetTopicName()) {
this.topicName = other.topicName;
}
}
public getLatestStreamCheckpoint_args deepCopy() {
return new getLatestStreamCheckpoint_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.topicName = null;
}
public String getTableName() {
return this.tableName;
}
public getLatestStreamCheckpoint_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getTopicName() {
return this.topicName;
}
public getLatestStreamCheckpoint_args setTopicName(String topicName) {
this.topicName = topicName;
return this;
}
public void unsetTopicName() {
this.topicName = null;
}
/** Returns true if field topicName is set (has been assigned a value) and false otherwise */
public boolean isSetTopicName() {
return this.topicName != null;
}
public void setTopicNameIsSet(boolean value) {
if (!value) {
this.topicName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case TOPIC_NAME:
if (value == null) {
unsetTopicName();
} else {
setTopicName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case TOPIC_NAME:
return getTopicName();
}
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 TABLE_NAME:
return isSetTableName();
case TOPIC_NAME:
return isSetTopicName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getLatestStreamCheckpoint_args)
return this.equals((getLatestStreamCheckpoint_args)that);
return false;
}
public boolean equals(getLatestStreamCheckpoint_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_topicName = true && this.isSetTopicName();
boolean that_present_topicName = true && that.isSetTopicName();
if (this_present_topicName || that_present_topicName) {
if (!(this_present_topicName && that_present_topicName))
return false;
if (!this.topicName.equals(that.topicName))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_topicName = true && (isSetTopicName());
list.add(present_topicName);
if (present_topicName)
list.add(topicName);
return list.hashCode();
}
@Override
public int compareTo(getLatestStreamCheckpoint_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTopicName()).compareTo(other.isSetTopicName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTopicName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.topicName, other.topicName);
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("getLatestStreamCheckpoint_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("topicName:");
if (this.topicName == null) {
sb.append("null");
} else {
sb.append(this.topicName);
}
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 getLatestStreamCheckpoint_argsStandardSchemeFactory implements SchemeFactory {
public getLatestStreamCheckpoint_argsStandardScheme getScheme() {
return new getLatestStreamCheckpoint_argsStandardScheme();
}
}
private static class getLatestStreamCheckpoint_argsStandardScheme extends StandardScheme<getLatestStreamCheckpoint_args> {
public void read(libthrift091.protocol.TProtocol iprot, getLatestStreamCheckpoint_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TOPIC_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(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, getLatestStreamCheckpoint_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.topicName != null) {
oprot.writeFieldBegin(TOPIC_NAME_FIELD_DESC);
oprot.writeString(struct.topicName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getLatestStreamCheckpoint_argsTupleSchemeFactory implements SchemeFactory {
public getLatestStreamCheckpoint_argsTupleScheme getScheme() {
return new getLatestStreamCheckpoint_argsTupleScheme();
}
}
private static class getLatestStreamCheckpoint_argsTupleScheme extends TupleScheme<getLatestStreamCheckpoint_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getLatestStreamCheckpoint_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetTopicName()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetTopicName()) {
oprot.writeString(struct.topicName);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getLatestStreamCheckpoint_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
}
}
}
}
public static class getLatestStreamCheckpoint_result implements libthrift091.TBase<getLatestStreamCheckpoint_result, getLatestStreamCheckpoint_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLatestStreamCheckpoint_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getLatestStreamCheckpoint_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getLatestStreamCheckpoint_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getLatestStreamCheckpoint_resultTupleSchemeFactory());
}
public StreamCheckpoint success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, StreamCheckpoint.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getLatestStreamCheckpoint_result.class, metaDataMap);
}
public getLatestStreamCheckpoint_result() {
}
public getLatestStreamCheckpoint_result(
StreamCheckpoint success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getLatestStreamCheckpoint_result(getLatestStreamCheckpoint_result other) {
if (other.isSetSuccess()) {
this.success = new StreamCheckpoint(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getLatestStreamCheckpoint_result deepCopy() {
return new getLatestStreamCheckpoint_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public StreamCheckpoint getSuccess() {
return this.success;
}
public getLatestStreamCheckpoint_result setSuccess(StreamCheckpoint 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getLatestStreamCheckpoint_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((StreamCheckpoint)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getLatestStreamCheckpoint_result)
return this.equals((getLatestStreamCheckpoint_result)that);
return false;
}
public boolean equals(getLatestStreamCheckpoint_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getLatestStreamCheckpoint_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getLatestStreamCheckpoint_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getLatestStreamCheckpoint_resultStandardSchemeFactory implements SchemeFactory {
public getLatestStreamCheckpoint_resultStandardScheme getScheme() {
return new getLatestStreamCheckpoint_resultStandardScheme();
}
}
private static class getLatestStreamCheckpoint_resultStandardScheme extends StandardScheme<getLatestStreamCheckpoint_result> {
public void read(libthrift091.protocol.TProtocol iprot, getLatestStreamCheckpoint_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 StreamCheckpoint();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getLatestStreamCheckpoint_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getLatestStreamCheckpoint_resultTupleSchemeFactory implements SchemeFactory {
public getLatestStreamCheckpoint_resultTupleScheme getScheme() {
return new getLatestStreamCheckpoint_resultTupleScheme();
}
}
private static class getLatestStreamCheckpoint_resultTupleScheme extends TupleScheme<getLatestStreamCheckpoint_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getLatestStreamCheckpoint_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getLatestStreamCheckpoint_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new StreamCheckpoint();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getFloorStreamCheckpoint_args implements libthrift091.TBase<getFloorStreamCheckpoint_args, getFloorStreamCheckpoint_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFloorStreamCheckpoint_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getFloorStreamCheckpoint_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField TOPIC_NAME_FIELD_DESC = new libthrift091.protocol.TField("topicName", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField TIMESTAMP_FIELD_DESC = new libthrift091.protocol.TField("timestamp", libthrift091.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getFloorStreamCheckpoint_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getFloorStreamCheckpoint_argsTupleSchemeFactory());
}
public String tableName; // required
public String topicName; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
TOPIC_NAME((short)2, "topicName"),
TIMESTAMP((short)3, "timestamp");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // TOPIC_NAME
return TOPIC_NAME;
case 3: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TOPIC_NAME, new libthrift091.meta_data.FieldMetaData("topicName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TIMESTAMP, new libthrift091.meta_data.FieldMetaData("timestamp", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getFloorStreamCheckpoint_args.class, metaDataMap);
}
public getFloorStreamCheckpoint_args() {
}
public getFloorStreamCheckpoint_args(
String tableName,
String topicName,
long timestamp)
{
this();
this.tableName = tableName;
this.topicName = topicName;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getFloorStreamCheckpoint_args(getFloorStreamCheckpoint_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetTopicName()) {
this.topicName = other.topicName;
}
this.timestamp = other.timestamp;
}
public getFloorStreamCheckpoint_args deepCopy() {
return new getFloorStreamCheckpoint_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.topicName = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
public String getTableName() {
return this.tableName;
}
public getFloorStreamCheckpoint_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getTopicName() {
return this.topicName;
}
public getFloorStreamCheckpoint_args setTopicName(String topicName) {
this.topicName = topicName;
return this;
}
public void unsetTopicName() {
this.topicName = null;
}
/** Returns true if field topicName is set (has been assigned a value) and false otherwise */
public boolean isSetTopicName() {
return this.topicName != null;
}
public void setTopicNameIsSet(boolean value) {
if (!value) {
this.topicName = null;
}
}
public long getTimestamp() {
return this.timestamp;
}
public getFloorStreamCheckpoint_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case TOPIC_NAME:
if (value == null) {
unsetTopicName();
} else {
setTopicName((String)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case TOPIC_NAME:
return getTopicName();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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 TABLE_NAME:
return isSetTableName();
case TOPIC_NAME:
return isSetTopicName();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getFloorStreamCheckpoint_args)
return this.equals((getFloorStreamCheckpoint_args)that);
return false;
}
public boolean equals(getFloorStreamCheckpoint_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_topicName = true && this.isSetTopicName();
boolean that_present_topicName = true && that.isSetTopicName();
if (this_present_topicName || that_present_topicName) {
if (!(this_present_topicName && that_present_topicName))
return false;
if (!this.topicName.equals(that.topicName))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_topicName = true && (isSetTopicName());
list.add(present_topicName);
if (present_topicName)
list.add(topicName);
boolean present_timestamp = true;
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
return list.hashCode();
}
@Override
public int compareTo(getFloorStreamCheckpoint_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTopicName()).compareTo(other.isSetTopicName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTopicName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.topicName, other.topicName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.timestamp, other.timestamp);
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("getFloorStreamCheckpoint_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("topicName:");
if (this.topicName == null) {
sb.append("null");
} else {
sb.append(this.topicName);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class getFloorStreamCheckpoint_argsStandardSchemeFactory implements SchemeFactory {
public getFloorStreamCheckpoint_argsStandardScheme getScheme() {
return new getFloorStreamCheckpoint_argsStandardScheme();
}
}
private static class getFloorStreamCheckpoint_argsStandardScheme extends StandardScheme<getFloorStreamCheckpoint_args> {
public void read(libthrift091.protocol.TProtocol iprot, getFloorStreamCheckpoint_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TOPIC_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TIMESTAMP
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, getFloorStreamCheckpoint_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.topicName != null) {
oprot.writeFieldBegin(TOPIC_NAME_FIELD_DESC);
oprot.writeString(struct.topicName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getFloorStreamCheckpoint_argsTupleSchemeFactory implements SchemeFactory {
public getFloorStreamCheckpoint_argsTupleScheme getScheme() {
return new getFloorStreamCheckpoint_argsTupleScheme();
}
}
private static class getFloorStreamCheckpoint_argsTupleScheme extends TupleScheme<getFloorStreamCheckpoint_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getFloorStreamCheckpoint_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetTopicName()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetTopicName()) {
oprot.writeString(struct.topicName);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getFloorStreamCheckpoint_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class getFloorStreamCheckpoint_result implements libthrift091.TBase<getFloorStreamCheckpoint_result, getFloorStreamCheckpoint_result._Fields>, java.io.Serializable, Cloneable, Comparable<getFloorStreamCheckpoint_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getFloorStreamCheckpoint_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getFloorStreamCheckpoint_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getFloorStreamCheckpoint_resultTupleSchemeFactory());
}
public StreamCheckpoint success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, StreamCheckpoint.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getFloorStreamCheckpoint_result.class, metaDataMap);
}
public getFloorStreamCheckpoint_result() {
}
public getFloorStreamCheckpoint_result(
StreamCheckpoint success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getFloorStreamCheckpoint_result(getFloorStreamCheckpoint_result other) {
if (other.isSetSuccess()) {
this.success = new StreamCheckpoint(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getFloorStreamCheckpoint_result deepCopy() {
return new getFloorStreamCheckpoint_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public StreamCheckpoint getSuccess() {
return this.success;
}
public getFloorStreamCheckpoint_result setSuccess(StreamCheckpoint 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getFloorStreamCheckpoint_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((StreamCheckpoint)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getFloorStreamCheckpoint_result)
return this.equals((getFloorStreamCheckpoint_result)that);
return false;
}
public boolean equals(getFloorStreamCheckpoint_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getFloorStreamCheckpoint_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getFloorStreamCheckpoint_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getFloorStreamCheckpoint_resultStandardSchemeFactory implements SchemeFactory {
public getFloorStreamCheckpoint_resultStandardScheme getScheme() {
return new getFloorStreamCheckpoint_resultStandardScheme();
}
}
private static class getFloorStreamCheckpoint_resultStandardScheme extends StandardScheme<getFloorStreamCheckpoint_result> {
public void read(libthrift091.protocol.TProtocol iprot, getFloorStreamCheckpoint_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 StreamCheckpoint();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getFloorStreamCheckpoint_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getFloorStreamCheckpoint_resultTupleSchemeFactory implements SchemeFactory {
public getFloorStreamCheckpoint_resultTupleScheme getScheme() {
return new getFloorStreamCheckpoint_resultTupleScheme();
}
}
private static class getFloorStreamCheckpoint_resultTupleScheme extends TupleScheme<getFloorStreamCheckpoint_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getFloorStreamCheckpoint_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getFloorStreamCheckpoint_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new StreamCheckpoint();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class getCeilStreamCheckpoint_args implements libthrift091.TBase<getCeilStreamCheckpoint_args, getCeilStreamCheckpoint_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCeilStreamCheckpoint_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getCeilStreamCheckpoint_args");
private static final libthrift091.protocol.TField TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("tableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField TOPIC_NAME_FIELD_DESC = new libthrift091.protocol.TField("topicName", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField TIMESTAMP_FIELD_DESC = new libthrift091.protocol.TField("timestamp", libthrift091.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getCeilStreamCheckpoint_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getCeilStreamCheckpoint_argsTupleSchemeFactory());
}
public String tableName; // required
public String topicName; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
TABLE_NAME((short)1, "tableName"),
TOPIC_NAME((short)2, "topicName"),
TIMESTAMP((short)3, "timestamp");
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: // TABLE_NAME
return TABLE_NAME;
case 2: // TOPIC_NAME
return TOPIC_NAME;
case 3: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.TABLE_NAME, new libthrift091.meta_data.FieldMetaData("tableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TOPIC_NAME, new libthrift091.meta_data.FieldMetaData("topicName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TIMESTAMP, new libthrift091.meta_data.FieldMetaData("timestamp", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getCeilStreamCheckpoint_args.class, metaDataMap);
}
public getCeilStreamCheckpoint_args() {
}
public getCeilStreamCheckpoint_args(
String tableName,
String topicName,
long timestamp)
{
this();
this.tableName = tableName;
this.topicName = topicName;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getCeilStreamCheckpoint_args(getCeilStreamCheckpoint_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetTopicName()) {
this.topicName = other.topicName;
}
this.timestamp = other.timestamp;
}
public getCeilStreamCheckpoint_args deepCopy() {
return new getCeilStreamCheckpoint_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.topicName = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
public String getTableName() {
return this.tableName;
}
public getCeilStreamCheckpoint_args setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public String getTopicName() {
return this.topicName;
}
public getCeilStreamCheckpoint_args setTopicName(String topicName) {
this.topicName = topicName;
return this;
}
public void unsetTopicName() {
this.topicName = null;
}
/** Returns true if field topicName is set (has been assigned a value) and false otherwise */
public boolean isSetTopicName() {
return this.topicName != null;
}
public void setTopicNameIsSet(boolean value) {
if (!value) {
this.topicName = null;
}
}
public long getTimestamp() {
return this.timestamp;
}
public getCeilStreamCheckpoint_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case TOPIC_NAME:
if (value == null) {
unsetTopicName();
} else {
setTopicName((String)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case TOPIC_NAME:
return getTopicName();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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 TABLE_NAME:
return isSetTableName();
case TOPIC_NAME:
return isSetTopicName();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getCeilStreamCheckpoint_args)
return this.equals((getCeilStreamCheckpoint_args)that);
return false;
}
public boolean equals(getCeilStreamCheckpoint_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_topicName = true && this.isSetTopicName();
boolean that_present_topicName = true && that.isSetTopicName();
if (this_present_topicName || that_present_topicName) {
if (!(this_present_topicName && that_present_topicName))
return false;
if (!this.topicName.equals(that.topicName))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
boolean present_topicName = true && (isSetTopicName());
list.add(present_topicName);
if (present_topicName)
list.add(topicName);
boolean present_timestamp = true;
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
return list.hashCode();
}
@Override
public int compareTo(getCeilStreamCheckpoint_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableName, other.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTopicName()).compareTo(other.isSetTopicName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTopicName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.topicName, other.topicName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.timestamp, other.timestamp);
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("getCeilStreamCheckpoint_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("topicName:");
if (this.topicName == null) {
sb.append("null");
} else {
sb.append(this.topicName);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class getCeilStreamCheckpoint_argsStandardSchemeFactory implements SchemeFactory {
public getCeilStreamCheckpoint_argsStandardScheme getScheme() {
return new getCeilStreamCheckpoint_argsStandardScheme();
}
}
private static class getCeilStreamCheckpoint_argsStandardScheme extends StandardScheme<getCeilStreamCheckpoint_args> {
public void read(libthrift091.protocol.TProtocol iprot, getCeilStreamCheckpoint_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: // TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TOPIC_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TIMESTAMP
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, getCeilStreamCheckpoint_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.topicName != null) {
oprot.writeFieldBegin(TOPIC_NAME_FIELD_DESC);
oprot.writeString(struct.topicName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getCeilStreamCheckpoint_argsTupleSchemeFactory implements SchemeFactory {
public getCeilStreamCheckpoint_argsTupleScheme getScheme() {
return new getCeilStreamCheckpoint_argsTupleScheme();
}
}
private static class getCeilStreamCheckpoint_argsTupleScheme extends TupleScheme<getCeilStreamCheckpoint_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getCeilStreamCheckpoint_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetTopicName()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeString(struct.tableName);
}
if (struct.isSetTopicName()) {
oprot.writeString(struct.topicName);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getCeilStreamCheckpoint_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class getCeilStreamCheckpoint_result implements libthrift091.TBase<getCeilStreamCheckpoint_result, getCeilStreamCheckpoint_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCeilStreamCheckpoint_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getCeilStreamCheckpoint_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 SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getCeilStreamCheckpoint_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getCeilStreamCheckpoint_resultTupleSchemeFactory());
}
public StreamCheckpoint success; // required
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // 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"),
SE((short)1, "se");
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 0: // SUCCESS
return SUCCESS;
case 1: // SE
return SE;
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, StreamCheckpoint.class)));
tmpMap.put(_Fields.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getCeilStreamCheckpoint_result.class, metaDataMap);
}
public getCeilStreamCheckpoint_result() {
}
public getCeilStreamCheckpoint_result(
StreamCheckpoint success,
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.success = success;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getCeilStreamCheckpoint_result(getCeilStreamCheckpoint_result other) {
if (other.isSetSuccess()) {
this.success = new StreamCheckpoint(other.success);
}
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public getCeilStreamCheckpoint_result deepCopy() {
return new getCeilStreamCheckpoint_result(this);
}
@Override
public void clear() {
this.success = null;
this.se = null;
}
public StreamCheckpoint getSuccess() {
return this.success;
}
public getCeilStreamCheckpoint_result setSuccess(StreamCheckpoint 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 com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public getCeilStreamCheckpoint_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((StreamCheckpoint)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getCeilStreamCheckpoint_result)
return this.equals((getCeilStreamCheckpoint_result)that);
return false;
}
public boolean equals(getCeilStreamCheckpoint_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_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(getCeilStreamCheckpoint_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(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("getCeilStreamCheckpoint_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("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 getCeilStreamCheckpoint_resultStandardSchemeFactory implements SchemeFactory {
public getCeilStreamCheckpoint_resultStandardScheme getScheme() {
return new getCeilStreamCheckpoint_resultStandardScheme();
}
}
private static class getCeilStreamCheckpoint_resultStandardScheme extends StandardScheme<getCeilStreamCheckpoint_result> {
public void read(libthrift091.protocol.TProtocol iprot, getCeilStreamCheckpoint_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 StreamCheckpoint();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, getCeilStreamCheckpoint_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.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getCeilStreamCheckpoint_resultTupleSchemeFactory implements SchemeFactory {
public getCeilStreamCheckpoint_resultTupleScheme getScheme() {
return new getCeilStreamCheckpoint_resultTupleScheme();
}
}
private static class getCeilStreamCheckpoint_resultTupleScheme extends TupleScheme<getCeilStreamCheckpoint_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, getCeilStreamCheckpoint_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, getCeilStreamCheckpoint_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new StreamCheckpoint();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class recoverTable_args implements libthrift091.TBase<recoverTable_args, recoverTable_args._Fields>, java.io.Serializable, Cloneable, Comparable<recoverTable_args> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("recoverTable_args");
private static final libthrift091.protocol.TField SRC_TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("srcTableName", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new libthrift091.protocol.TField("destTableName", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField TOPIC_NAME_FIELD_DESC = new libthrift091.protocol.TField("topicName", libthrift091.protocol.TType.STRING, (short)3);
private static final libthrift091.protocol.TField TIMESTAMP_FIELD_DESC = new libthrift091.protocol.TField("timestamp", libthrift091.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new recoverTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new recoverTable_argsTupleSchemeFactory());
}
public String srcTableName; // required
public String destTableName; // required
public String topicName; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SRC_TABLE_NAME((short)1, "srcTableName"),
DEST_TABLE_NAME((short)2, "destTableName"),
TOPIC_NAME((short)3, "topicName"),
TIMESTAMP((short)4, "timestamp");
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: // SRC_TABLE_NAME
return SRC_TABLE_NAME;
case 2: // DEST_TABLE_NAME
return DEST_TABLE_NAME;
case 3: // TOPIC_NAME
return TOPIC_NAME;
case 4: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.SRC_TABLE_NAME, new libthrift091.meta_data.FieldMetaData("srcTableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.DEST_TABLE_NAME, new libthrift091.meta_data.FieldMetaData("destTableName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TOPIC_NAME, new libthrift091.meta_data.FieldMetaData("topicName", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TIMESTAMP, new libthrift091.meta_data.FieldMetaData("timestamp", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(recoverTable_args.class, metaDataMap);
}
public recoverTable_args() {
}
public recoverTable_args(
String srcTableName,
String destTableName,
String topicName,
long timestamp)
{
this();
this.srcTableName = srcTableName;
this.destTableName = destTableName;
this.topicName = topicName;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public recoverTable_args(recoverTable_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetSrcTableName()) {
this.srcTableName = other.srcTableName;
}
if (other.isSetDestTableName()) {
this.destTableName = other.destTableName;
}
if (other.isSetTopicName()) {
this.topicName = other.topicName;
}
this.timestamp = other.timestamp;
}
public recoverTable_args deepCopy() {
return new recoverTable_args(this);
}
@Override
public void clear() {
this.srcTableName = null;
this.destTableName = null;
this.topicName = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
public String getSrcTableName() {
return this.srcTableName;
}
public recoverTable_args setSrcTableName(String srcTableName) {
this.srcTableName = srcTableName;
return this;
}
public void unsetSrcTableName() {
this.srcTableName = null;
}
/** Returns true if field srcTableName is set (has been assigned a value) and false otherwise */
public boolean isSetSrcTableName() {
return this.srcTableName != null;
}
public void setSrcTableNameIsSet(boolean value) {
if (!value) {
this.srcTableName = null;
}
}
public String getDestTableName() {
return this.destTableName;
}
public recoverTable_args setDestTableName(String destTableName) {
this.destTableName = destTableName;
return this;
}
public void unsetDestTableName() {
this.destTableName = null;
}
/** Returns true if field destTableName is set (has been assigned a value) and false otherwise */
public boolean isSetDestTableName() {
return this.destTableName != null;
}
public void setDestTableNameIsSet(boolean value) {
if (!value) {
this.destTableName = null;
}
}
public String getTopicName() {
return this.topicName;
}
public recoverTable_args setTopicName(String topicName) {
this.topicName = topicName;
return this;
}
public void unsetTopicName() {
this.topicName = null;
}
/** Returns true if field topicName is set (has been assigned a value) and false otherwise */
public boolean isSetTopicName() {
return this.topicName != null;
}
public void setTopicNameIsSet(boolean value) {
if (!value) {
this.topicName = null;
}
}
public long getTimestamp() {
return this.timestamp;
}
public recoverTable_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SRC_TABLE_NAME:
if (value == null) {
unsetSrcTableName();
} else {
setSrcTableName((String)value);
}
break;
case DEST_TABLE_NAME:
if (value == null) {
unsetDestTableName();
} else {
setDestTableName((String)value);
}
break;
case TOPIC_NAME:
if (value == null) {
unsetTopicName();
} else {
setTopicName((String)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SRC_TABLE_NAME:
return getSrcTableName();
case DEST_TABLE_NAME:
return getDestTableName();
case TOPIC_NAME:
return getTopicName();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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 SRC_TABLE_NAME:
return isSetSrcTableName();
case DEST_TABLE_NAME:
return isSetDestTableName();
case TOPIC_NAME:
return isSetTopicName();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof recoverTable_args)
return this.equals((recoverTable_args)that);
return false;
}
public boolean equals(recoverTable_args that) {
if (that == null)
return false;
boolean this_present_srcTableName = true && this.isSetSrcTableName();
boolean that_present_srcTableName = true && that.isSetSrcTableName();
if (this_present_srcTableName || that_present_srcTableName) {
if (!(this_present_srcTableName && that_present_srcTableName))
return false;
if (!this.srcTableName.equals(that.srcTableName))
return false;
}
boolean this_present_destTableName = true && this.isSetDestTableName();
boolean that_present_destTableName = true && that.isSetDestTableName();
if (this_present_destTableName || that_present_destTableName) {
if (!(this_present_destTableName && that_present_destTableName))
return false;
if (!this.destTableName.equals(that.destTableName))
return false;
}
boolean this_present_topicName = true && this.isSetTopicName();
boolean that_present_topicName = true && that.isSetTopicName();
if (this_present_topicName || that_present_topicName) {
if (!(this_present_topicName && that_present_topicName))
return false;
if (!this.topicName.equals(that.topicName))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_srcTableName = true && (isSetSrcTableName());
list.add(present_srcTableName);
if (present_srcTableName)
list.add(srcTableName);
boolean present_destTableName = true && (isSetDestTableName());
list.add(present_destTableName);
if (present_destTableName)
list.add(destTableName);
boolean present_topicName = true && (isSetTopicName());
list.add(present_topicName);
if (present_topicName)
list.add(topicName);
boolean present_timestamp = true;
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
return list.hashCode();
}
@Override
public int compareTo(recoverTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSrcTableName()).compareTo(other.isSetSrcTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSrcTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.srcTableName, other.srcTableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDestTableName()).compareTo(other.isSetDestTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDestTableName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.destTableName, other.destTableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTopicName()).compareTo(other.isSetTopicName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTopicName()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.topicName, other.topicName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.timestamp, other.timestamp);
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("recoverTable_args(");
boolean first = true;
sb.append("srcTableName:");
if (this.srcTableName == null) {
sb.append("null");
} else {
sb.append(this.srcTableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("destTableName:");
if (this.destTableName == null) {
sb.append("null");
} else {
sb.append(this.destTableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("topicName:");
if (this.topicName == null) {
sb.append("null");
} else {
sb.append(this.topicName);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
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 {
// 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class recoverTable_argsStandardSchemeFactory implements SchemeFactory {
public recoverTable_argsStandardScheme getScheme() {
return new recoverTable_argsStandardScheme();
}
}
private static class recoverTable_argsStandardScheme extends StandardScheme<recoverTable_args> {
public void read(libthrift091.protocol.TProtocol iprot, recoverTable_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: // SRC_TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.srcTableName = iprot.readString();
struct.setSrcTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DEST_TABLE_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.destTableName = iprot.readString();
struct.setDestTableNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TOPIC_NAME
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, recoverTable_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.srcTableName != null) {
oprot.writeFieldBegin(SRC_TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.srcTableName);
oprot.writeFieldEnd();
}
if (struct.destTableName != null) {
oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC);
oprot.writeString(struct.destTableName);
oprot.writeFieldEnd();
}
if (struct.topicName != null) {
oprot.writeFieldBegin(TOPIC_NAME_FIELD_DESC);
oprot.writeString(struct.topicName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class recoverTable_argsTupleSchemeFactory implements SchemeFactory {
public recoverTable_argsTupleScheme getScheme() {
return new recoverTable_argsTupleScheme();
}
}
private static class recoverTable_argsTupleScheme extends TupleScheme<recoverTable_args> {
@Override
public void write(libthrift091.protocol.TProtocol prot, recoverTable_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSrcTableName()) {
optionals.set(0);
}
if (struct.isSetDestTableName()) {
optionals.set(1);
}
if (struct.isSetTopicName()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetSrcTableName()) {
oprot.writeString(struct.srcTableName);
}
if (struct.isSetDestTableName()) {
oprot.writeString(struct.destTableName);
}
if (struct.isSetTopicName()) {
oprot.writeString(struct.topicName);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, recoverTable_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.srcTableName = iprot.readString();
struct.setSrcTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.destTableName = iprot.readString();
struct.setDestTableNameIsSet(true);
}
if (incoming.get(2)) {
struct.topicName = iprot.readString();
struct.setTopicNameIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class recoverTable_result implements libthrift091.TBase<recoverTable_result, recoverTable_result._Fields>, java.io.Serializable, Cloneable, Comparable<recoverTable_result> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("recoverTable_result");
private static final libthrift091.protocol.TField SE_FIELD_DESC = new libthrift091.protocol.TField("se", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new recoverTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new recoverTable_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SE((short)1, "se");
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: // SE
return SE;
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.SE, new libthrift091.meta_data.FieldMetaData("se", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(recoverTable_result.class, metaDataMap);
}
public recoverTable_result() {
}
public recoverTable_result(
com.xiaomi.infra.galaxy.sds.thrift.ServiceException se)
{
this();
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public recoverTable_result(recoverTable_result other) {
if (other.isSetSe()) {
this.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException(other.se);
}
}
public recoverTable_result deepCopy() {
return new recoverTable_result(this);
}
@Override
public void clear() {
this.se = null;
}
public com.xiaomi.infra.galaxy.sds.thrift.ServiceException getSe() {
return this.se;
}
public recoverTable_result setSe(com.xiaomi.infra.galaxy.sds.thrift.ServiceException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SE:
if (value == null) {
unsetSe();
} else {
setSe((com.xiaomi.infra.galaxy.sds.thrift.ServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof recoverTable_result)
return this.equals((recoverTable_result)that);
return false;
}
public boolean equals(recoverTable_result that) {
if (that == null)
return false;
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_se = true && (isSetSe());
list.add(present_se);
if (present_se)
list.add(se);
return list.hashCode();
}
@Override
public int compareTo(recoverTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.se, other.se);
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("recoverTable_result(");
boolean first = true;
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
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 recoverTable_resultStandardSchemeFactory implements SchemeFactory {
public recoverTable_resultStandardScheme getScheme() {
return new recoverTable_resultStandardScheme();
}
}
private static class recoverTable_resultStandardScheme extends StandardScheme<recoverTable_result> {
public void read(libthrift091.protocol.TProtocol iprot, recoverTable_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: // SE
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(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, recoverTable_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class recoverTable_resultTupleSchemeFactory implements SchemeFactory {
public recoverTable_resultTupleScheme getScheme() {
return new recoverTable_resultTupleScheme();
}
}
private static class recoverTable_resultTupleScheme extends TupleScheme<recoverTable_result> {
@Override
public void write(libthrift091.protocol.TProtocol prot, recoverTable_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSe()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, recoverTable_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.se = new com.xiaomi.infra.galaxy.sds.thrift.ServiceException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
}