Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.xiaomi.infra.galaxy.talos.thrift.TopicService Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.talos.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-11-11")
public class TopicService {
public interface Iface extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.Iface {
/**
* createTopic, one must be a Developer that call this method;
*
*
* @param request
*/
public CreateTopicResponse createTopic(CreateTopicRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* deleteTopic, the caller must have CHANGE_TOPIC permission;
*
*
* @param request
*/
public void deleteTopic(DeleteTopicRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* changeTopicAttribute, the caller must have CHANGE_TOPIC permission;
*
*
* @param request
*/
public void changeTopicAttribute(ChangeTopicAttributeRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* describeTopic, the caller must have DESCRIBE_TOPIC permission;
*
*
* @param request
*/
public DescribeTopicResponse describeTopic(DescribeTopicRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* listTopics for the developer that call this method, and this method will
* only return the topics that owned by the call developer, if none,
* listTopics will return nothing.
*
*/
public ListTopicsResponse listTopics() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* setTopicQuota, the caller must be talos admin or topic owner
*
*
* @param request
*/
public void setTopicQuota(SetTopicQuotaRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* queryTopicQuota, the caller must be talos admin or topic owner
*
*
* @param request
*/
public QueryTopicQuotaResponse queryTopicQuota(QueryTopicQuotaRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* deleteTopicQuota, the caller must be talos admin or topic owner
*
*
* @param request
*/
public void deleteTopicQuota(DeleteTopicQuotaRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* setPermission, the caller must be owner/Talos admin, and the operation
* permission devolution is not be allowed, the old permission will be
* overwrite after setPermission.
*
*
* @param request
*/
public void setPermission(SetPermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* revokePermission, the caller must be owner/Talos admin, and you can't
* revokePermission for the topic owner, the accountId will have
* NONE permission after revokePermission;
*
*
* @param request
*/
public void revokePermission(RevokePermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* listPermission, the caller must have DESCRIBE_TOPIC permission;
*
*
* @param request
*/
public ListPermissionResponse listPermission(ListPermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* getPermission, the caller must hava DESCRIBE_TOPIC permission;
*
*
* @param request
*/
public GetPermissionResponse getPermission(GetPermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
/**
* addSubResourceName, the caller must be a developer owner of topic
*
*
* @param request
*/
public void addSubResourceName(AddSubResourceNameRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException;
}
public interface AsyncIface extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService .AsyncIface {
public void createTopic(CreateTopicRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deleteTopic(DeleteTopicRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void changeTopicAttribute(ChangeTopicAttributeRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void describeTopic(DescribeTopicRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void listTopics(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void setTopicQuota(SetTopicQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void queryTopicQuota(QueryTopicQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deleteTopicQuota(DeleteTopicQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void setPermission(SetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void revokePermission(RevokePermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void listPermission(ListPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void getPermission(GetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void addSubResourceName(AddSubResourceNameRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
}
public static class Client extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.Client implements Iface {
public static class Factory implements libthrift091.TServiceClientFactory {
public Factory() {}
public Client getClient(libthrift091.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(libthrift091.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public CreateTopicResponse createTopic(CreateTopicRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_createTopic(request);
return recv_createTopic();
}
public void send_createTopic(CreateTopicRequest request) throws libthrift091.TException
{
createTopic_args args = new createTopic_args();
args.setRequest(request);
sendBase("createTopic", args);
}
public CreateTopicResponse recv_createTopic() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
createTopic_result result = new createTopic_result();
receiveBase(result, "createTopic");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "createTopic failed: unknown result");
}
public void deleteTopic(DeleteTopicRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_deleteTopic(request);
recv_deleteTopic();
}
public void send_deleteTopic(DeleteTopicRequest request) throws libthrift091.TException
{
deleteTopic_args args = new deleteTopic_args();
args.setRequest(request);
sendBase("deleteTopic", args);
}
public void recv_deleteTopic() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
deleteTopic_result result = new deleteTopic_result();
receiveBase(result, "deleteTopic");
if (result.e != null) {
throw result.e;
}
return;
}
public void changeTopicAttribute(ChangeTopicAttributeRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_changeTopicAttribute(request);
recv_changeTopicAttribute();
}
public void send_changeTopicAttribute(ChangeTopicAttributeRequest request) throws libthrift091.TException
{
changeTopicAttribute_args args = new changeTopicAttribute_args();
args.setRequest(request);
sendBase("changeTopicAttribute", args);
}
public void recv_changeTopicAttribute() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
changeTopicAttribute_result result = new changeTopicAttribute_result();
receiveBase(result, "changeTopicAttribute");
if (result.e != null) {
throw result.e;
}
return;
}
public DescribeTopicResponse describeTopic(DescribeTopicRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_describeTopic(request);
return recv_describeTopic();
}
public void send_describeTopic(DescribeTopicRequest request) throws libthrift091.TException
{
describeTopic_args args = new describeTopic_args();
args.setRequest(request);
sendBase("describeTopic", args);
}
public DescribeTopicResponse recv_describeTopic() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
describeTopic_result result = new describeTopic_result();
receiveBase(result, "describeTopic");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "describeTopic failed: unknown result");
}
public ListTopicsResponse listTopics() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_listTopics();
return recv_listTopics();
}
public void send_listTopics() throws libthrift091.TException
{
listTopics_args args = new listTopics_args();
sendBase("listTopics", args);
}
public ListTopicsResponse recv_listTopics() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
listTopics_result result = new listTopics_result();
receiveBase(result, "listTopics");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listTopics failed: unknown result");
}
public void setTopicQuota(SetTopicQuotaRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_setTopicQuota(request);
recv_setTopicQuota();
}
public void send_setTopicQuota(SetTopicQuotaRequest request) throws libthrift091.TException
{
setTopicQuota_args args = new setTopicQuota_args();
args.setRequest(request);
sendBase("setTopicQuota", args);
}
public void recv_setTopicQuota() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
setTopicQuota_result result = new setTopicQuota_result();
receiveBase(result, "setTopicQuota");
if (result.e != null) {
throw result.e;
}
return;
}
public QueryTopicQuotaResponse queryTopicQuota(QueryTopicQuotaRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_queryTopicQuota(request);
return recv_queryTopicQuota();
}
public void send_queryTopicQuota(QueryTopicQuotaRequest request) throws libthrift091.TException
{
queryTopicQuota_args args = new queryTopicQuota_args();
args.setRequest(request);
sendBase("queryTopicQuota", args);
}
public QueryTopicQuotaResponse recv_queryTopicQuota() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
queryTopicQuota_result result = new queryTopicQuota_result();
receiveBase(result, "queryTopicQuota");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "queryTopicQuota failed: unknown result");
}
public void deleteTopicQuota(DeleteTopicQuotaRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_deleteTopicQuota(request);
recv_deleteTopicQuota();
}
public void send_deleteTopicQuota(DeleteTopicQuotaRequest request) throws libthrift091.TException
{
deleteTopicQuota_args args = new deleteTopicQuota_args();
args.setRequest(request);
sendBase("deleteTopicQuota", args);
}
public void recv_deleteTopicQuota() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
deleteTopicQuota_result result = new deleteTopicQuota_result();
receiveBase(result, "deleteTopicQuota");
if (result.e != null) {
throw result.e;
}
return;
}
public void setPermission(SetPermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_setPermission(request);
recv_setPermission();
}
public void send_setPermission(SetPermissionRequest request) throws libthrift091.TException
{
setPermission_args args = new setPermission_args();
args.setRequest(request);
sendBase("setPermission", args);
}
public void recv_setPermission() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
setPermission_result result = new setPermission_result();
receiveBase(result, "setPermission");
if (result.e != null) {
throw result.e;
}
return;
}
public void revokePermission(RevokePermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_revokePermission(request);
recv_revokePermission();
}
public void send_revokePermission(RevokePermissionRequest request) throws libthrift091.TException
{
revokePermission_args args = new revokePermission_args();
args.setRequest(request);
sendBase("revokePermission", args);
}
public void recv_revokePermission() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
revokePermission_result result = new revokePermission_result();
receiveBase(result, "revokePermission");
if (result.e != null) {
throw result.e;
}
return;
}
public ListPermissionResponse listPermission(ListPermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_listPermission(request);
return recv_listPermission();
}
public void send_listPermission(ListPermissionRequest request) throws libthrift091.TException
{
listPermission_args args = new listPermission_args();
args.setRequest(request);
sendBase("listPermission", args);
}
public ListPermissionResponse recv_listPermission() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
listPermission_result result = new listPermission_result();
receiveBase(result, "listPermission");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listPermission failed: unknown result");
}
public GetPermissionResponse getPermission(GetPermissionRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_getPermission(request);
return recv_getPermission();
}
public void send_getPermission(GetPermissionRequest request) throws libthrift091.TException
{
getPermission_args args = new getPermission_args();
args.setRequest(request);
sendBase("getPermission", args);
}
public GetPermissionResponse recv_getPermission() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
getPermission_result result = new getPermission_result();
receiveBase(result, "getPermission");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getPermission failed: unknown result");
}
public void addSubResourceName(AddSubResourceNameRequest request) throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
send_addSubResourceName(request);
recv_addSubResourceName();
}
public void send_addSubResourceName(AddSubResourceNameRequest request) throws libthrift091.TException
{
addSubResourceName_args args = new addSubResourceName_args();
args.setRequest(request);
sendBase("addSubResourceName", args);
}
public void recv_addSubResourceName() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException
{
addSubResourceName_result result = new addSubResourceName_result();
receiveBase(result, "addSubResourceName");
if (result.e != null) {
throw result.e;
}
return;
}
}
public static class AsyncClient extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.AsyncClient implements AsyncIface {
public static class Factory implements libthrift091.async.TAsyncClientFactory {
private libthrift091.async.TAsyncClientManager clientManager;
private libthrift091.protocol.TProtocolFactory protocolFactory;
public Factory(libthrift091.async.TAsyncClientManager clientManager, libthrift091.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(libthrift091.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.async.TAsyncClientManager clientManager, libthrift091.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void createTopic(CreateTopicRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
createTopic_call method_call = new createTopic_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createTopic_call extends libthrift091.async.TAsyncMethodCall {
private CreateTopicRequest request;
public createTopic_call(CreateTopicRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("createTopic", libthrift091.protocol.TMessageType.CALL, 0));
createTopic_args args = new createTopic_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public CreateTopicResponse getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_createTopic();
}
}
public void deleteTopic(DeleteTopicRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deleteTopic_call method_call = new deleteTopic_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteTopic_call extends libthrift091.async.TAsyncMethodCall {
private DeleteTopicRequest request;
public deleteTopic_call(DeleteTopicRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteTopic", libthrift091.protocol.TMessageType.CALL, 0));
deleteTopic_args args = new deleteTopic_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_deleteTopic();
}
}
public void changeTopicAttribute(ChangeTopicAttributeRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
changeTopicAttribute_call method_call = new changeTopicAttribute_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class changeTopicAttribute_call extends libthrift091.async.TAsyncMethodCall {
private ChangeTopicAttributeRequest request;
public changeTopicAttribute_call(ChangeTopicAttributeRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("changeTopicAttribute", libthrift091.protocol.TMessageType.CALL, 0));
changeTopicAttribute_args args = new changeTopicAttribute_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_changeTopicAttribute();
}
}
public void describeTopic(DescribeTopicRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
describeTopic_call method_call = new describeTopic_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class describeTopic_call extends libthrift091.async.TAsyncMethodCall {
private DescribeTopicRequest request;
public describeTopic_call(DescribeTopicRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("describeTopic", libthrift091.protocol.TMessageType.CALL, 0));
describeTopic_args args = new describeTopic_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public DescribeTopicResponse getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_describeTopic();
}
}
public void listTopics(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listTopics_call method_call = new listTopics_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listTopics_call extends libthrift091.async.TAsyncMethodCall {
public listTopics_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("listTopics", libthrift091.protocol.TMessageType.CALL, 0));
listTopics_args args = new listTopics_args();
args.write(prot);
prot.writeMessageEnd();
}
public ListTopicsResponse getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_listTopics();
}
}
public void setTopicQuota(SetTopicQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
setTopicQuota_call method_call = new setTopicQuota_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setTopicQuota_call extends libthrift091.async.TAsyncMethodCall {
private SetTopicQuotaRequest request;
public setTopicQuota_call(SetTopicQuotaRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("setTopicQuota", libthrift091.protocol.TMessageType.CALL, 0));
setTopicQuota_args args = new setTopicQuota_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_setTopicQuota();
}
}
public void queryTopicQuota(QueryTopicQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
queryTopicQuota_call method_call = new queryTopicQuota_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class queryTopicQuota_call extends libthrift091.async.TAsyncMethodCall {
private QueryTopicQuotaRequest request;
public queryTopicQuota_call(QueryTopicQuotaRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("queryTopicQuota", libthrift091.protocol.TMessageType.CALL, 0));
queryTopicQuota_args args = new queryTopicQuota_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public QueryTopicQuotaResponse getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_queryTopicQuota();
}
}
public void deleteTopicQuota(DeleteTopicQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deleteTopicQuota_call method_call = new deleteTopicQuota_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteTopicQuota_call extends libthrift091.async.TAsyncMethodCall {
private DeleteTopicQuotaRequest request;
public deleteTopicQuota_call(DeleteTopicQuotaRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteTopicQuota", libthrift091.protocol.TMessageType.CALL, 0));
deleteTopicQuota_args args = new deleteTopicQuota_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_deleteTopicQuota();
}
}
public void setPermission(SetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
setPermission_call method_call = new setPermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setPermission_call extends libthrift091.async.TAsyncMethodCall {
private SetPermissionRequest request;
public setPermission_call(SetPermissionRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("setPermission", libthrift091.protocol.TMessageType.CALL, 0));
setPermission_args args = new setPermission_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_setPermission();
}
}
public void revokePermission(RevokePermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
revokePermission_call method_call = new revokePermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class revokePermission_call extends libthrift091.async.TAsyncMethodCall {
private RevokePermissionRequest request;
public revokePermission_call(RevokePermissionRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("revokePermission", libthrift091.protocol.TMessageType.CALL, 0));
revokePermission_args args = new revokePermission_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_revokePermission();
}
}
public void listPermission(ListPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listPermission_call method_call = new listPermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listPermission_call extends libthrift091.async.TAsyncMethodCall {
private ListPermissionRequest request;
public listPermission_call(ListPermissionRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("listPermission", libthrift091.protocol.TMessageType.CALL, 0));
listPermission_args args = new listPermission_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public ListPermissionResponse getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_listPermission();
}
}
public void getPermission(GetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
getPermission_call method_call = new getPermission_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getPermission_call extends libthrift091.async.TAsyncMethodCall {
private GetPermissionRequest request;
public getPermission_call(GetPermissionRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("getPermission", libthrift091.protocol.TMessageType.CALL, 0));
getPermission_args args = new getPermission_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public GetPermissionResponse getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_getPermission();
}
}
public void addSubResourceName(AddSubResourceNameRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
addSubResourceName_call method_call = new addSubResourceName_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addSubResourceName_call extends libthrift091.async.TAsyncMethodCall {
private AddSubResourceNameRequest request;
public addSubResourceName_call(AddSubResourceNameRequest request, 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.request = request;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("addSubResourceName", libthrift091.protocol.TMessageType.CALL, 0));
addSubResourceName_args args = new addSubResourceName_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, 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_addSubResourceName();
}
}
}
public static class Processor extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.Processor implements libthrift091.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected Processor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("createTopic", new createTopic());
processMap.put("deleteTopic", new deleteTopic());
processMap.put("changeTopicAttribute", new changeTopicAttribute());
processMap.put("describeTopic", new describeTopic());
processMap.put("listTopics", new listTopics());
processMap.put("setTopicQuota", new setTopicQuota());
processMap.put("queryTopicQuota", new queryTopicQuota());
processMap.put("deleteTopicQuota", new deleteTopicQuota());
processMap.put("setPermission", new setPermission());
processMap.put("revokePermission", new revokePermission());
processMap.put("listPermission", new listPermission());
processMap.put("getPermission", new getPermission());
processMap.put("addSubResourceName", new addSubResourceName());
return processMap;
}
public static class createTopic extends libthrift091.ProcessFunction {
public createTopic() {
super("createTopic");
}
public createTopic_args getEmptyArgsInstance() {
return new createTopic_args();
}
protected boolean isOneway() {
return false;
}
public createTopic_result getResult(I iface, createTopic_args args) throws libthrift091.TException {
createTopic_result result = new createTopic_result();
try {
result.success = iface.createTopic(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class deleteTopic extends libthrift091.ProcessFunction {
public deleteTopic() {
super("deleteTopic");
}
public deleteTopic_args getEmptyArgsInstance() {
return new deleteTopic_args();
}
protected boolean isOneway() {
return false;
}
public deleteTopic_result getResult(I iface, deleteTopic_args args) throws libthrift091.TException {
deleteTopic_result result = new deleteTopic_result();
try {
iface.deleteTopic(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class changeTopicAttribute extends libthrift091.ProcessFunction {
public changeTopicAttribute() {
super("changeTopicAttribute");
}
public changeTopicAttribute_args getEmptyArgsInstance() {
return new changeTopicAttribute_args();
}
protected boolean isOneway() {
return false;
}
public changeTopicAttribute_result getResult(I iface, changeTopicAttribute_args args) throws libthrift091.TException {
changeTopicAttribute_result result = new changeTopicAttribute_result();
try {
iface.changeTopicAttribute(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class describeTopic extends libthrift091.ProcessFunction {
public describeTopic() {
super("describeTopic");
}
public describeTopic_args getEmptyArgsInstance() {
return new describeTopic_args();
}
protected boolean isOneway() {
return false;
}
public describeTopic_result getResult(I iface, describeTopic_args args) throws libthrift091.TException {
describeTopic_result result = new describeTopic_result();
try {
result.success = iface.describeTopic(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class listTopics extends libthrift091.ProcessFunction {
public listTopics() {
super("listTopics");
}
public listTopics_args getEmptyArgsInstance() {
return new listTopics_args();
}
protected boolean isOneway() {
return false;
}
public listTopics_result getResult(I iface, listTopics_args args) throws libthrift091.TException {
listTopics_result result = new listTopics_result();
try {
result.success = iface.listTopics();
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class setTopicQuota extends libthrift091.ProcessFunction {
public setTopicQuota() {
super("setTopicQuota");
}
public setTopicQuota_args getEmptyArgsInstance() {
return new setTopicQuota_args();
}
protected boolean isOneway() {
return false;
}
public setTopicQuota_result getResult(I iface, setTopicQuota_args args) throws libthrift091.TException {
setTopicQuota_result result = new setTopicQuota_result();
try {
iface.setTopicQuota(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class queryTopicQuota extends libthrift091.ProcessFunction {
public queryTopicQuota() {
super("queryTopicQuota");
}
public queryTopicQuota_args getEmptyArgsInstance() {
return new queryTopicQuota_args();
}
protected boolean isOneway() {
return false;
}
public queryTopicQuota_result getResult(I iface, queryTopicQuota_args args) throws libthrift091.TException {
queryTopicQuota_result result = new queryTopicQuota_result();
try {
result.success = iface.queryTopicQuota(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class deleteTopicQuota extends libthrift091.ProcessFunction {
public deleteTopicQuota() {
super("deleteTopicQuota");
}
public deleteTopicQuota_args getEmptyArgsInstance() {
return new deleteTopicQuota_args();
}
protected boolean isOneway() {
return false;
}
public deleteTopicQuota_result getResult(I iface, deleteTopicQuota_args args) throws libthrift091.TException {
deleteTopicQuota_result result = new deleteTopicQuota_result();
try {
iface.deleteTopicQuota(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class setPermission extends libthrift091.ProcessFunction {
public setPermission() {
super("setPermission");
}
public setPermission_args getEmptyArgsInstance() {
return new setPermission_args();
}
protected boolean isOneway() {
return false;
}
public setPermission_result getResult(I iface, setPermission_args args) throws libthrift091.TException {
setPermission_result result = new setPermission_result();
try {
iface.setPermission(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class revokePermission extends libthrift091.ProcessFunction {
public revokePermission() {
super("revokePermission");
}
public revokePermission_args getEmptyArgsInstance() {
return new revokePermission_args();
}
protected boolean isOneway() {
return false;
}
public revokePermission_result getResult(I iface, revokePermission_args args) throws libthrift091.TException {
revokePermission_result result = new revokePermission_result();
try {
iface.revokePermission(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class listPermission extends libthrift091.ProcessFunction {
public listPermission() {
super("listPermission");
}
public listPermission_args getEmptyArgsInstance() {
return new listPermission_args();
}
protected boolean isOneway() {
return false;
}
public listPermission_result getResult(I iface, listPermission_args args) throws libthrift091.TException {
listPermission_result result = new listPermission_result();
try {
result.success = iface.listPermission(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class getPermission extends libthrift091.ProcessFunction {
public getPermission() {
super("getPermission");
}
public getPermission_args getEmptyArgsInstance() {
return new getPermission_args();
}
protected boolean isOneway() {
return false;
}
public getPermission_result getResult(I iface, getPermission_args args) throws libthrift091.TException {
getPermission_result result = new getPermission_result();
try {
result.success = iface.getPermission(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
public static class addSubResourceName extends libthrift091.ProcessFunction {
public addSubResourceName() {
super("addSubResourceName");
}
public addSubResourceName_args getEmptyArgsInstance() {
return new addSubResourceName_args();
}
protected boolean isOneway() {
return false;
}
public addSubResourceName_result getResult(I iface, addSubResourceName_args args) throws libthrift091.TException {
addSubResourceName_result result = new addSubResourceName_result();
try {
iface.addSubResourceName(args.request);
} catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
result.e = e;
}
return result;
}
}
}
public static class AsyncProcessor extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.AsyncProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected AsyncProcessor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("createTopic", new createTopic());
processMap.put("deleteTopic", new deleteTopic());
processMap.put("changeTopicAttribute", new changeTopicAttribute());
processMap.put("describeTopic", new describeTopic());
processMap.put("listTopics", new listTopics());
processMap.put("setTopicQuota", new setTopicQuota());
processMap.put("queryTopicQuota", new queryTopicQuota());
processMap.put("deleteTopicQuota", new deleteTopicQuota());
processMap.put("setPermission", new setPermission());
processMap.put("revokePermission", new revokePermission());
processMap.put("listPermission", new listPermission());
processMap.put("getPermission", new getPermission());
processMap.put("addSubResourceName", new addSubResourceName());
return processMap;
}
public static class createTopic extends libthrift091.AsyncProcessFunction {
public createTopic() {
super("createTopic");
}
public createTopic_args getEmptyArgsInstance() {
return new createTopic_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(CreateTopicResponse o) {
createTopic_result result = new createTopic_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;
createTopic_result result = new createTopic_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createTopic_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.createTopic(args.request,resultHandler);
}
}
public static class deleteTopic extends libthrift091.AsyncProcessFunction {
public deleteTopic() {
super("deleteTopic");
}
public deleteTopic_args getEmptyArgsInstance() {
return new deleteTopic_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
deleteTopic_result result = new deleteTopic_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;
deleteTopic_result result = new deleteTopic_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteTopic_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deleteTopic(args.request,resultHandler);
}
}
public static class changeTopicAttribute extends libthrift091.AsyncProcessFunction {
public changeTopicAttribute() {
super("changeTopicAttribute");
}
public changeTopicAttribute_args getEmptyArgsInstance() {
return new changeTopicAttribute_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
changeTopicAttribute_result result = new changeTopicAttribute_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;
changeTopicAttribute_result result = new changeTopicAttribute_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, changeTopicAttribute_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.changeTopicAttribute(args.request,resultHandler);
}
}
public static class describeTopic extends libthrift091.AsyncProcessFunction {
public describeTopic() {
super("describeTopic");
}
public describeTopic_args getEmptyArgsInstance() {
return new describeTopic_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(DescribeTopicResponse o) {
describeTopic_result result = new describeTopic_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;
describeTopic_result result = new describeTopic_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, describeTopic_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.describeTopic(args.request,resultHandler);
}
}
public static class listTopics extends libthrift091.AsyncProcessFunction {
public listTopics() {
super("listTopics");
}
public listTopics_args getEmptyArgsInstance() {
return new listTopics_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(ListTopicsResponse o) {
listTopics_result result = new listTopics_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;
listTopics_result result = new listTopics_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, listTopics_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.listTopics(resultHandler);
}
}
public static class setTopicQuota extends libthrift091.AsyncProcessFunction {
public setTopicQuota() {
super("setTopicQuota");
}
public setTopicQuota_args getEmptyArgsInstance() {
return new setTopicQuota_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
setTopicQuota_result result = new setTopicQuota_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;
setTopicQuota_result result = new setTopicQuota_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, setTopicQuota_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.setTopicQuota(args.request,resultHandler);
}
}
public static class queryTopicQuota extends libthrift091.AsyncProcessFunction {
public queryTopicQuota() {
super("queryTopicQuota");
}
public queryTopicQuota_args getEmptyArgsInstance() {
return new queryTopicQuota_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(QueryTopicQuotaResponse o) {
queryTopicQuota_result result = new queryTopicQuota_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;
queryTopicQuota_result result = new queryTopicQuota_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, queryTopicQuota_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.queryTopicQuota(args.request,resultHandler);
}
}
public static class deleteTopicQuota extends libthrift091.AsyncProcessFunction {
public deleteTopicQuota() {
super("deleteTopicQuota");
}
public deleteTopicQuota_args getEmptyArgsInstance() {
return new deleteTopicQuota_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
deleteTopicQuota_result result = new deleteTopicQuota_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;
deleteTopicQuota_result result = new deleteTopicQuota_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteTopicQuota_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deleteTopicQuota(args.request,resultHandler);
}
}
public static class setPermission extends libthrift091.AsyncProcessFunction {
public setPermission() {
super("setPermission");
}
public setPermission_args getEmptyArgsInstance() {
return new setPermission_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
setPermission_result result = new setPermission_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;
setPermission_result result = new setPermission_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, setPermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.setPermission(args.request,resultHandler);
}
}
public static class revokePermission extends libthrift091.AsyncProcessFunction {
public revokePermission() {
super("revokePermission");
}
public revokePermission_args getEmptyArgsInstance() {
return new revokePermission_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
revokePermission_result result = new revokePermission_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;
revokePermission_result result = new revokePermission_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, revokePermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.revokePermission(args.request,resultHandler);
}
}
public static class listPermission extends libthrift091.AsyncProcessFunction {
public listPermission() {
super("listPermission");
}
public listPermission_args getEmptyArgsInstance() {
return new listPermission_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(ListPermissionResponse o) {
listPermission_result result = new listPermission_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;
listPermission_result result = new listPermission_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, listPermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.listPermission(args.request,resultHandler);
}
}
public static class getPermission extends libthrift091.AsyncProcessFunction {
public getPermission() {
super("getPermission");
}
public getPermission_args getEmptyArgsInstance() {
return new getPermission_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(GetPermissionResponse o) {
getPermission_result result = new getPermission_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;
getPermission_result result = new getPermission_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getPermission_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.getPermission(args.request,resultHandler);
}
}
public static class addSubResourceName extends libthrift091.AsyncProcessFunction {
public addSubResourceName() {
super("addSubResourceName");
}
public addSubResourceName_args getEmptyArgsInstance() {
return new addSubResourceName_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
addSubResourceName_result result = new addSubResourceName_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;
addSubResourceName_result result = new addSubResourceName_result();
if (e instanceof com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) {
result.e = (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, addSubResourceName_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.addSubResourceName(args.request,resultHandler);
}
}
}
public static class createTopic_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createTopic_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createTopic_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new createTopic_argsTupleSchemeFactory());
}
public CreateTopicRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REQUEST
return REQUEST;
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.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, CreateTopicRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createTopic_args.class, metaDataMap);
}
public createTopic_args() {
}
public createTopic_args(
CreateTopicRequest request)
{
this();
this.request = request;
}
/**
* Performs a deep copy on other .
*/
public createTopic_args(createTopic_args other) {
if (other.isSetRequest()) {
this.request = new CreateTopicRequest(other.request);
}
}
public createTopic_args deepCopy() {
return new createTopic_args(this);
}
@Override
public void clear() {
this.request = null;
}
public CreateTopicRequest getRequest() {
return this.request;
}
public createTopic_args setRequest(CreateTopicRequest request) {
this.request = request;
return this;
}
public void unsetRequest() {
this.request = null;
}
/** Returns true if field request is set (has been assigned a value) and false otherwise */
public boolean isSetRequest() {
return this.request != null;
}
public void setRequestIsSet(boolean value) {
if (!value) {
this.request = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REQUEST:
if (value == null) {
unsetRequest();
} else {
setRequest((CreateTopicRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REQUEST:
return getRequest();
}
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 REQUEST:
return isSetRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createTopic_args)
return this.equals((createTopic_args)that);
return false;
}
public boolean equals(createTopic_args that) {
if (that == null)
return false;
boolean this_present_request = true && this.isSetRequest();
boolean that_present_request = true && that.isSetRequest();
if (this_present_request || that_present_request) {
if (!(this_present_request && that_present_request))
return false;
if (!this.request.equals(that.request))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_request = true && (isSetRequest());
list.add(present_request);
if (present_request)
list.add(request);
return list.hashCode();
}
@Override
public int compareTo(createTopic_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
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("createTopic_args(");
boolean first = true;
sb.append("request:");
if (this.request == null) {
sb.append("null");
} else {
sb.append(this.request);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (request != null) {
request.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 createTopic_argsStandardSchemeFactory implements SchemeFactory {
public createTopic_argsStandardScheme getScheme() {
return new createTopic_argsStandardScheme();
}
}
private static class createTopic_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, createTopic_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: // REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.request = new CreateTopicRequest();
struct.request.read(iprot);
struct.setRequestIsSet(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, createTopic_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.request != null) {
oprot.writeFieldBegin(REQUEST_FIELD_DESC);
struct.request.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTopic_argsTupleSchemeFactory implements SchemeFactory {
public createTopic_argsTupleScheme getScheme() {
return new createTopic_argsTupleScheme();
}
}
private static class createTopic_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, createTopic_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRequest()) {
struct.request.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, createTopic_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.request = new CreateTopicRequest();
struct.request.read(iprot);
struct.setRequestIsSet(true);
}
}
}
}
public static class createTopic_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createTopic_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createTopic_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new createTopic_resultTupleSchemeFactory());
}
public CreateTopicResponse success; // required
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, CreateTopicResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createTopic_result.class, metaDataMap);
}
public createTopic_result() {
}
public createTopic_result(
CreateTopicResponse success,
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public createTopic_result(createTopic_result other) {
if (other.isSetSuccess()) {
this.success = new CreateTopicResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public createTopic_result deepCopy() {
return new createTopic_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public CreateTopicResponse getSuccess() {
return this.success;
}
public createTopic_result setSuccess(CreateTopicResponse 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.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public createTopic_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((CreateTopicResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createTopic_result)
return this.equals((createTopic_result)that);
return false;
}
public boolean equals(createTopic_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(createTopic_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createTopic_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class createTopic_resultStandardSchemeFactory implements SchemeFactory {
public createTopic_resultStandardScheme getScheme() {
return new createTopic_resultStandardScheme();
}
}
private static class createTopic_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, createTopic_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 CreateTopicResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, createTopic_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTopic_resultTupleSchemeFactory implements SchemeFactory {
public createTopic_resultTupleScheme getScheme() {
return new createTopic_resultTupleScheme();
}
}
private static class createTopic_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, createTopic_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, createTopic_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new CreateTopicResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class deleteTopic_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTopic_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteTopic_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteTopic_argsTupleSchemeFactory());
}
public DeleteTopicRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REQUEST
return REQUEST;
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.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteTopicRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteTopic_args.class, metaDataMap);
}
public deleteTopic_args() {
}
public deleteTopic_args(
DeleteTopicRequest request)
{
this();
this.request = request;
}
/**
* Performs a deep copy on other .
*/
public deleteTopic_args(deleteTopic_args other) {
if (other.isSetRequest()) {
this.request = new DeleteTopicRequest(other.request);
}
}
public deleteTopic_args deepCopy() {
return new deleteTopic_args(this);
}
@Override
public void clear() {
this.request = null;
}
public DeleteTopicRequest getRequest() {
return this.request;
}
public deleteTopic_args setRequest(DeleteTopicRequest request) {
this.request = request;
return this;
}
public void unsetRequest() {
this.request = null;
}
/** Returns true if field request is set (has been assigned a value) and false otherwise */
public boolean isSetRequest() {
return this.request != null;
}
public void setRequestIsSet(boolean value) {
if (!value) {
this.request = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REQUEST:
if (value == null) {
unsetRequest();
} else {
setRequest((DeleteTopicRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REQUEST:
return getRequest();
}
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 REQUEST:
return isSetRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteTopic_args)
return this.equals((deleteTopic_args)that);
return false;
}
public boolean equals(deleteTopic_args that) {
if (that == null)
return false;
boolean this_present_request = true && this.isSetRequest();
boolean that_present_request = true && that.isSetRequest();
if (this_present_request || that_present_request) {
if (!(this_present_request && that_present_request))
return false;
if (!this.request.equals(that.request))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_request = true && (isSetRequest());
list.add(present_request);
if (present_request)
list.add(request);
return list.hashCode();
}
@Override
public int compareTo(deleteTopic_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
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("deleteTopic_args(");
boolean first = true;
sb.append("request:");
if (this.request == null) {
sb.append("null");
} else {
sb.append(this.request);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (request != null) {
request.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 deleteTopic_argsStandardSchemeFactory implements SchemeFactory {
public deleteTopic_argsStandardScheme getScheme() {
return new deleteTopic_argsStandardScheme();
}
}
private static class deleteTopic_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, deleteTopic_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: // REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.request = new DeleteTopicRequest();
struct.request.read(iprot);
struct.setRequestIsSet(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, deleteTopic_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.request != null) {
oprot.writeFieldBegin(REQUEST_FIELD_DESC);
struct.request.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteTopic_argsTupleSchemeFactory implements SchemeFactory {
public deleteTopic_argsTupleScheme getScheme() {
return new deleteTopic_argsTupleScheme();
}
}
private static class deleteTopic_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteTopic_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRequest()) {
struct.request.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteTopic_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.request = new DeleteTopicRequest();
struct.request.read(iprot);
struct.setRequestIsSet(true);
}
}
}
}
public static class deleteTopic_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTopic_result");
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteTopic_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteTopic_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteTopic_result.class, metaDataMap);
}
public deleteTopic_result() {
}
public deleteTopic_result(
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public deleteTopic_result(deleteTopic_result other) {
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public deleteTopic_result deepCopy() {
return new deleteTopic_result(this);
}
@Override
public void clear() {
this.e = null;
}
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public deleteTopic_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteTopic_result)
return this.equals((deleteTopic_result)that);
return false;
}
public boolean equals(deleteTopic_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(deleteTopic_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteTopic_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteTopic_resultStandardSchemeFactory implements SchemeFactory {
public deleteTopic_resultStandardScheme getScheme() {
return new deleteTopic_resultStandardScheme();
}
}
private static class deleteTopic_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, deleteTopic_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, deleteTopic_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteTopic_resultTupleSchemeFactory implements SchemeFactory {
public deleteTopic_resultTupleScheme getScheme() {
return new deleteTopic_resultTupleScheme();
}
}
private static class deleteTopic_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteTopic_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetE()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteTopic_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class changeTopicAttribute_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeTopicAttribute_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new changeTopicAttribute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new changeTopicAttribute_argsTupleSchemeFactory());
}
public ChangeTopicAttributeRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REQUEST
return REQUEST;
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.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeTopicAttributeRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeTopicAttribute_args.class, metaDataMap);
}
public changeTopicAttribute_args() {
}
public changeTopicAttribute_args(
ChangeTopicAttributeRequest request)
{
this();
this.request = request;
}
/**
* Performs a deep copy on other .
*/
public changeTopicAttribute_args(changeTopicAttribute_args other) {
if (other.isSetRequest()) {
this.request = new ChangeTopicAttributeRequest(other.request);
}
}
public changeTopicAttribute_args deepCopy() {
return new changeTopicAttribute_args(this);
}
@Override
public void clear() {
this.request = null;
}
public ChangeTopicAttributeRequest getRequest() {
return this.request;
}
public changeTopicAttribute_args setRequest(ChangeTopicAttributeRequest request) {
this.request = request;
return this;
}
public void unsetRequest() {
this.request = null;
}
/** Returns true if field request is set (has been assigned a value) and false otherwise */
public boolean isSetRequest() {
return this.request != null;
}
public void setRequestIsSet(boolean value) {
if (!value) {
this.request = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REQUEST:
if (value == null) {
unsetRequest();
} else {
setRequest((ChangeTopicAttributeRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REQUEST:
return getRequest();
}
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 REQUEST:
return isSetRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof changeTopicAttribute_args)
return this.equals((changeTopicAttribute_args)that);
return false;
}
public boolean equals(changeTopicAttribute_args that) {
if (that == null)
return false;
boolean this_present_request = true && this.isSetRequest();
boolean that_present_request = true && that.isSetRequest();
if (this_present_request || that_present_request) {
if (!(this_present_request && that_present_request))
return false;
if (!this.request.equals(that.request))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_request = true && (isSetRequest());
list.add(present_request);
if (present_request)
list.add(request);
return list.hashCode();
}
@Override
public int compareTo(changeTopicAttribute_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
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("changeTopicAttribute_args(");
boolean first = true;
sb.append("request:");
if (this.request == null) {
sb.append("null");
} else {
sb.append(this.request);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (request != null) {
request.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 changeTopicAttribute_argsStandardSchemeFactory implements SchemeFactory {
public changeTopicAttribute_argsStandardScheme getScheme() {
return new changeTopicAttribute_argsStandardScheme();
}
}
private static class changeTopicAttribute_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, changeTopicAttribute_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: // REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.request = new ChangeTopicAttributeRequest();
struct.request.read(iprot);
struct.setRequestIsSet(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, changeTopicAttribute_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.request != null) {
oprot.writeFieldBegin(REQUEST_FIELD_DESC);
struct.request.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class changeTopicAttribute_argsTupleSchemeFactory implements SchemeFactory {
public changeTopicAttribute_argsTupleScheme getScheme() {
return new changeTopicAttribute_argsTupleScheme();
}
}
private static class changeTopicAttribute_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, changeTopicAttribute_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRequest()) {
struct.request.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, changeTopicAttribute_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.request = new ChangeTopicAttributeRequest();
struct.request.read(iprot);
struct.setRequestIsSet(true);
}
}
}
}
public static class changeTopicAttribute_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeTopicAttribute_result");
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new changeTopicAttribute_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new changeTopicAttribute_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeTopicAttribute_result.class, metaDataMap);
}
public changeTopicAttribute_result() {
}
public changeTopicAttribute_result(
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public changeTopicAttribute_result(changeTopicAttribute_result other) {
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public changeTopicAttribute_result deepCopy() {
return new changeTopicAttribute_result(this);
}
@Override
public void clear() {
this.e = null;
}
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public changeTopicAttribute_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof changeTopicAttribute_result)
return this.equals((changeTopicAttribute_result)that);
return false;
}
public boolean equals(changeTopicAttribute_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(changeTopicAttribute_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("changeTopicAttribute_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class changeTopicAttribute_resultStandardSchemeFactory implements SchemeFactory {
public changeTopicAttribute_resultStandardScheme getScheme() {
return new changeTopicAttribute_resultStandardScheme();
}
}
private static class changeTopicAttribute_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, changeTopicAttribute_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, changeTopicAttribute_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class changeTopicAttribute_resultTupleSchemeFactory implements SchemeFactory {
public changeTopicAttribute_resultTupleScheme getScheme() {
return new changeTopicAttribute_resultTupleScheme();
}
}
private static class changeTopicAttribute_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, changeTopicAttribute_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetE()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, changeTopicAttribute_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class describeTopic_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeTopic_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new describeTopic_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new describeTopic_argsTupleSchemeFactory());
}
public DescribeTopicRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REQUEST
return REQUEST;
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.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DescribeTopicRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeTopic_args.class, metaDataMap);
}
public describeTopic_args() {
}
public describeTopic_args(
DescribeTopicRequest request)
{
this();
this.request = request;
}
/**
* Performs a deep copy on other .
*/
public describeTopic_args(describeTopic_args other) {
if (other.isSetRequest()) {
this.request = new DescribeTopicRequest(other.request);
}
}
public describeTopic_args deepCopy() {
return new describeTopic_args(this);
}
@Override
public void clear() {
this.request = null;
}
public DescribeTopicRequest getRequest() {
return this.request;
}
public describeTopic_args setRequest(DescribeTopicRequest request) {
this.request = request;
return this;
}
public void unsetRequest() {
this.request = null;
}
/** Returns true if field request is set (has been assigned a value) and false otherwise */
public boolean isSetRequest() {
return this.request != null;
}
public void setRequestIsSet(boolean value) {
if (!value) {
this.request = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REQUEST:
if (value == null) {
unsetRequest();
} else {
setRequest((DescribeTopicRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REQUEST:
return getRequest();
}
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 REQUEST:
return isSetRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof describeTopic_args)
return this.equals((describeTopic_args)that);
return false;
}
public boolean equals(describeTopic_args that) {
if (that == null)
return false;
boolean this_present_request = true && this.isSetRequest();
boolean that_present_request = true && that.isSetRequest();
if (this_present_request || that_present_request) {
if (!(this_present_request && that_present_request))
return false;
if (!this.request.equals(that.request))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_request = true && (isSetRequest());
list.add(present_request);
if (present_request)
list.add(request);
return list.hashCode();
}
@Override
public int compareTo(describeTopic_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
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("describeTopic_args(");
boolean first = true;
sb.append("request:");
if (this.request == null) {
sb.append("null");
} else {
sb.append(this.request);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (request != null) {
request.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 describeTopic_argsStandardSchemeFactory implements SchemeFactory {
public describeTopic_argsStandardScheme getScheme() {
return new describeTopic_argsStandardScheme();
}
}
private static class describeTopic_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, describeTopic_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: // REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.request = new DescribeTopicRequest();
struct.request.read(iprot);
struct.setRequestIsSet(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, describeTopic_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.request != null) {
oprot.writeFieldBegin(REQUEST_FIELD_DESC);
struct.request.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class describeTopic_argsTupleSchemeFactory implements SchemeFactory {
public describeTopic_argsTupleScheme getScheme() {
return new describeTopic_argsTupleScheme();
}
}
private static class describeTopic_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, describeTopic_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRequest()) {
struct.request.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, describeTopic_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.request = new DescribeTopicRequest();
struct.request.read(iprot);
struct.setRequestIsSet(true);
}
}
}
}
public static class describeTopic_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("describeTopic_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new describeTopic_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new describeTopic_resultTupleSchemeFactory());
}
public DescribeTopicResponse success; // required
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DescribeTopicResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(describeTopic_result.class, metaDataMap);
}
public describeTopic_result() {
}
public describeTopic_result(
DescribeTopicResponse success,
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public describeTopic_result(describeTopic_result other) {
if (other.isSetSuccess()) {
this.success = new DescribeTopicResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public describeTopic_result deepCopy() {
return new describeTopic_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public DescribeTopicResponse getSuccess() {
return this.success;
}
public describeTopic_result setSuccess(DescribeTopicResponse 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.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public describeTopic_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((DescribeTopicResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof describeTopic_result)
return this.equals((describeTopic_result)that);
return false;
}
public boolean equals(describeTopic_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(describeTopic_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("describeTopic_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class describeTopic_resultStandardSchemeFactory implements SchemeFactory {
public describeTopic_resultStandardScheme getScheme() {
return new describeTopic_resultStandardScheme();
}
}
private static class describeTopic_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, describeTopic_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 DescribeTopicResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, describeTopic_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class describeTopic_resultTupleSchemeFactory implements SchemeFactory {
public describeTopic_resultTupleScheme getScheme() {
return new describeTopic_resultTupleScheme();
}
}
private static class describeTopic_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, describeTopic_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, describeTopic_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new DescribeTopicResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class listTopics_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listTopics_args");
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listTopics_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new listTopics_argsTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
;
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listTopics_args.class, metaDataMap);
}
public listTopics_args() {
}
/**
* Performs a deep copy on other .
*/
public listTopics_args(listTopics_args other) {
}
public listTopics_args deepCopy() {
return new listTopics_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 listTopics_args)
return this.equals((listTopics_args)that);
return false;
}
public boolean equals(listTopics_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
return list.hashCode();
}
@Override
public int compareTo(listTopics_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("listTopics_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 listTopics_argsStandardSchemeFactory implements SchemeFactory {
public listTopics_argsStandardScheme getScheme() {
return new listTopics_argsStandardScheme();
}
}
private static class listTopics_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, listTopics_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, listTopics_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listTopics_argsTupleSchemeFactory implements SchemeFactory {
public listTopics_argsTupleScheme getScheme() {
return new listTopics_argsTupleScheme();
}
}
private static class listTopics_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, listTopics_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listTopics_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class listTopics_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listTopics_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listTopics_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new listTopics_resultTupleSchemeFactory());
}
public ListTopicsResponse success; // required
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ListTopicsResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listTopics_result.class, metaDataMap);
}
public listTopics_result() {
}
public listTopics_result(
ListTopicsResponse success,
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public listTopics_result(listTopics_result other) {
if (other.isSetSuccess()) {
this.success = new ListTopicsResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public listTopics_result deepCopy() {
return new listTopics_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public ListTopicsResponse getSuccess() {
return this.success;
}
public listTopics_result setSuccess(ListTopicsResponse 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.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public listTopics_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ListTopicsResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listTopics_result)
return this.equals((listTopics_result)that);
return false;
}
public boolean equals(listTopics_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(listTopics_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("listTopics_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class listTopics_resultStandardSchemeFactory implements SchemeFactory {
public listTopics_resultStandardScheme getScheme() {
return new listTopics_resultStandardScheme();
}
}
private static class listTopics_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, listTopics_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 ListTopicsResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, listTopics_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listTopics_resultTupleSchemeFactory implements SchemeFactory {
public listTopics_resultTupleScheme getScheme() {
return new listTopics_resultTupleScheme();
}
}
private static class listTopics_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, listTopics_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, listTopics_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new ListTopicsResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class setTopicQuota_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setTopicQuota_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new setTopicQuota_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new setTopicQuota_argsTupleSchemeFactory());
}
public SetTopicQuotaRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REQUEST
return REQUEST;
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.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SetTopicQuotaRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setTopicQuota_args.class, metaDataMap);
}
public setTopicQuota_args() {
}
public setTopicQuota_args(
SetTopicQuotaRequest request)
{
this();
this.request = request;
}
/**
* Performs a deep copy on other .
*/
public setTopicQuota_args(setTopicQuota_args other) {
if (other.isSetRequest()) {
this.request = new SetTopicQuotaRequest(other.request);
}
}
public setTopicQuota_args deepCopy() {
return new setTopicQuota_args(this);
}
@Override
public void clear() {
this.request = null;
}
public SetTopicQuotaRequest getRequest() {
return this.request;
}
public setTopicQuota_args setRequest(SetTopicQuotaRequest request) {
this.request = request;
return this;
}
public void unsetRequest() {
this.request = null;
}
/** Returns true if field request is set (has been assigned a value) and false otherwise */
public boolean isSetRequest() {
return this.request != null;
}
public void setRequestIsSet(boolean value) {
if (!value) {
this.request = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REQUEST:
if (value == null) {
unsetRequest();
} else {
setRequest((SetTopicQuotaRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REQUEST:
return getRequest();
}
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 REQUEST:
return isSetRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setTopicQuota_args)
return this.equals((setTopicQuota_args)that);
return false;
}
public boolean equals(setTopicQuota_args that) {
if (that == null)
return false;
boolean this_present_request = true && this.isSetRequest();
boolean that_present_request = true && that.isSetRequest();
if (this_present_request || that_present_request) {
if (!(this_present_request && that_present_request))
return false;
if (!this.request.equals(that.request))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_request = true && (isSetRequest());
list.add(present_request);
if (present_request)
list.add(request);
return list.hashCode();
}
@Override
public int compareTo(setTopicQuota_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
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("setTopicQuota_args(");
boolean first = true;
sb.append("request:");
if (this.request == null) {
sb.append("null");
} else {
sb.append(this.request);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (request != null) {
request.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 setTopicQuota_argsStandardSchemeFactory implements SchemeFactory {
public setTopicQuota_argsStandardScheme getScheme() {
return new setTopicQuota_argsStandardScheme();
}
}
private static class setTopicQuota_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, setTopicQuota_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: // REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.request = new SetTopicQuotaRequest();
struct.request.read(iprot);
struct.setRequestIsSet(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, setTopicQuota_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.request != null) {
oprot.writeFieldBegin(REQUEST_FIELD_DESC);
struct.request.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class setTopicQuota_argsTupleSchemeFactory implements SchemeFactory {
public setTopicQuota_argsTupleScheme getScheme() {
return new setTopicQuota_argsTupleScheme();
}
}
private static class setTopicQuota_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, setTopicQuota_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRequest()) {
struct.request.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, setTopicQuota_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.request = new SetTopicQuotaRequest();
struct.request.read(iprot);
struct.setRequestIsSet(true);
}
}
}
}
public static class setTopicQuota_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setTopicQuota_result");
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new setTopicQuota_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new setTopicQuota_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setTopicQuota_result.class, metaDataMap);
}
public setTopicQuota_result() {
}
public setTopicQuota_result(
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public setTopicQuota_result(setTopicQuota_result other) {
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public setTopicQuota_result deepCopy() {
return new setTopicQuota_result(this);
}
@Override
public void clear() {
this.e = null;
}
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public setTopicQuota_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setTopicQuota_result)
return this.equals((setTopicQuota_result)that);
return false;
}
public boolean equals(setTopicQuota_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(setTopicQuota_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setTopicQuota_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class setTopicQuota_resultStandardSchemeFactory implements SchemeFactory {
public setTopicQuota_resultStandardScheme getScheme() {
return new setTopicQuota_resultStandardScheme();
}
}
private static class setTopicQuota_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, setTopicQuota_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, setTopicQuota_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class setTopicQuota_resultTupleSchemeFactory implements SchemeFactory {
public setTopicQuota_resultTupleScheme getScheme() {
return new setTopicQuota_resultTupleScheme();
}
}
private static class setTopicQuota_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, setTopicQuota_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetE()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, setTopicQuota_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class queryTopicQuota_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryTopicQuota_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new queryTopicQuota_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new queryTopicQuota_argsTupleSchemeFactory());
}
public QueryTopicQuotaRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REQUEST
return REQUEST;
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.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, QueryTopicQuotaRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryTopicQuota_args.class, metaDataMap);
}
public queryTopicQuota_args() {
}
public queryTopicQuota_args(
QueryTopicQuotaRequest request)
{
this();
this.request = request;
}
/**
* Performs a deep copy on other .
*/
public queryTopicQuota_args(queryTopicQuota_args other) {
if (other.isSetRequest()) {
this.request = new QueryTopicQuotaRequest(other.request);
}
}
public queryTopicQuota_args deepCopy() {
return new queryTopicQuota_args(this);
}
@Override
public void clear() {
this.request = null;
}
public QueryTopicQuotaRequest getRequest() {
return this.request;
}
public queryTopicQuota_args setRequest(QueryTopicQuotaRequest request) {
this.request = request;
return this;
}
public void unsetRequest() {
this.request = null;
}
/** Returns true if field request is set (has been assigned a value) and false otherwise */
public boolean isSetRequest() {
return this.request != null;
}
public void setRequestIsSet(boolean value) {
if (!value) {
this.request = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case REQUEST:
if (value == null) {
unsetRequest();
} else {
setRequest((QueryTopicQuotaRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case REQUEST:
return getRequest();
}
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 REQUEST:
return isSetRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof queryTopicQuota_args)
return this.equals((queryTopicQuota_args)that);
return false;
}
public boolean equals(queryTopicQuota_args that) {
if (that == null)
return false;
boolean this_present_request = true && this.isSetRequest();
boolean that_present_request = true && that.isSetRequest();
if (this_present_request || that_present_request) {
if (!(this_present_request && that_present_request))
return false;
if (!this.request.equals(that.request))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_request = true && (isSetRequest());
list.add(present_request);
if (present_request)
list.add(request);
return list.hashCode();
}
@Override
public int compareTo(queryTopicQuota_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
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("queryTopicQuota_args(");
boolean first = true;
sb.append("request:");
if (this.request == null) {
sb.append("null");
} else {
sb.append(this.request);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (request != null) {
request.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 queryTopicQuota_argsStandardSchemeFactory implements SchemeFactory {
public queryTopicQuota_argsStandardScheme getScheme() {
return new queryTopicQuota_argsStandardScheme();
}
}
private static class queryTopicQuota_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, queryTopicQuota_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: // REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.request = new QueryTopicQuotaRequest();
struct.request.read(iprot);
struct.setRequestIsSet(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, queryTopicQuota_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.request != null) {
oprot.writeFieldBegin(REQUEST_FIELD_DESC);
struct.request.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class queryTopicQuota_argsTupleSchemeFactory implements SchemeFactory {
public queryTopicQuota_argsTupleScheme getScheme() {
return new queryTopicQuota_argsTupleScheme();
}
}
private static class queryTopicQuota_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, queryTopicQuota_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetRequest()) {
struct.request.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, queryTopicQuota_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.request = new QueryTopicQuotaRequest();
struct.request.read(iprot);
struct.setRequestIsSet(true);
}
}
}
}
public static class queryTopicQuota_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryTopicQuota_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new queryTopicQuota_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new queryTopicQuota_resultTupleSchemeFactory());
}
public QueryTopicQuotaResponse success; // required
public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, QueryTopicQuotaResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryTopicQuota_result.class, metaDataMap);
}
public queryTopicQuota_result() {
}
public queryTopicQuota_result(
QueryTopicQuotaResponse success,
com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public queryTopicQuota_result(queryTopicQuota_result other) {
if (other.isSetSuccess()) {
this.success = new QueryTopicQuotaResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e);
}
}
public queryTopicQuota_result deepCopy() {
return new queryTopicQuota_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public QueryTopicQuotaResponse getSuccess() {
return this.success;
}
public queryTopicQuota_result setSuccess(QueryTopicQuotaResponse 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.talos.thrift.GalaxyTalosException getE() {
return this.e;
}
public queryTopicQuota_result setE(com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((QueryTopicQuotaResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof queryTopicQuota_result)
return this.equals((queryTopicQuota_result)that);
return false;
}
public boolean equals(queryTopicQuota_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(queryTopicQuota_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("queryTopicQuota_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class queryTopicQuota_resultStandardSchemeFactory implements SchemeFactory {
public queryTopicQuota_resultStandardScheme getScheme() {
return new queryTopicQuota_resultStandardScheme();
}
}
private static class queryTopicQuota_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, queryTopicQuota_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 QueryTopicQuotaResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, queryTopicQuota_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class queryTopicQuota_resultTupleSchemeFactory implements SchemeFactory {
public queryTopicQuota_resultTupleScheme getScheme() {
return new queryTopicQuota_resultTupleScheme();
}
}
private static class queryTopicQuota_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, queryTopicQuota_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, queryTopicQuota_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new QueryTopicQuotaResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class deleteTopicQuota_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTopicQuota_args");
private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteTopicQuota_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteTopicQuota_argsTupleSchemeFactory());
}
public DeleteTopicQuotaRequest request; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
REQUEST((short)1, "request");
private static final Map