/** * 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 = "2017-1-20") 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; public ListTopicsResponse getBindTopics() 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 getBindTopics(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<Client> { public Factory() {} public Client getClient(libthrift091.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(libthrift091.protocol.TProtocol prot) { super(prot, prot); } public Client(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) { super(iprot, oprot); } public 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 ListTopicsResponse getBindTopics() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException { send_getBindTopics(); return recv_getBindTopics(); } public void send_getBindTopics() throws libthrift091.TException { getBindTopics_args args = new getBindTopics_args(); sendBase("getBindTopics", args); } public ListTopicsResponse recv_getBindTopics() throws com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException, libthrift091.TException { getBindTopics_result result = new getBindTopics_result(); receiveBase(result, "getBindTopics"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getBindTopics 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<AsyncClient> { private libthrift091.async.TAsyncClientManager clientManager; private libthrift091.protocol.TProtocolFactory protocolFactory; public Factory(libthrift091.async.TAsyncClientManager clientManager, libthrift091.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(libthrift091.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.async.TAsyncClientManager clientManager, libthrift091.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void 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 getBindTopics(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException { checkReady(); getBindTopics_call method_call = new getBindTopics_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getBindTopics_call extends libthrift091.async.TAsyncMethodCall { public getBindTopics_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("getBindTopics", libthrift091.protocol.TMessageType.CALL, 0)); getBindTopics_args args = new getBindTopics_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_getBindTopics(); } } 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<I extends Iface> extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.Processor<I> implements libthrift091.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>>())); } protected Processor(I iface, Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> getProcessMap(Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> processMap) { processMap.put("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("getBindTopics", new getBindTopics()); 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<I extends Iface> extends libthrift091.ProcessFunction<I, createTopic_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, deleteTopic_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, changeTopicAttribute_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, describeTopic_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, listTopics_args> { 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 getBindTopics<I extends Iface> extends libthrift091.ProcessFunction<I, getBindTopics_args> { public getBindTopics() { super("getBindTopics"); } public getBindTopics_args getEmptyArgsInstance() { return new getBindTopics_args(); } protected boolean isOneway() { return false; } public getBindTopics_result getResult(I iface, getBindTopics_args args) throws libthrift091.TException { getBindTopics_result result = new getBindTopics_result(); try { result.success = iface.getBindTopics(); } catch (com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { result.e = e; } return result; } } public static class setTopicQuota<I extends Iface> extends libthrift091.ProcessFunction<I, setTopicQuota_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, queryTopicQuota_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, deleteTopicQuota_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, setPermission_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, revokePermission_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, listPermission_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, getPermission_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, addSubResourceName_args> { 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<I extends AsyncIface> extends com.xiaomi.infra.galaxy.talos.thrift.TalosBaseService.AsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase,?>> getProcessMap(Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>> processMap) { processMap.put("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("getBindTopics", new getBindTopics()); 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<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, createTopic_args, CreateTopicResponse> { public createTopic() { super("createTopic"); } public createTopic_args getEmptyArgsInstance() { return new createTopic_args(); } public AsyncMethodCallback<CreateTopicResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<CreateTopicResponse>() { 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<CreateTopicResponse> resultHandler) throws TException { iface.createTopic(args.request,resultHandler); } } public static class deleteTopic<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deleteTopic_args, Void> { public deleteTopic() { super("deleteTopic"); } public deleteTopic_args getEmptyArgsInstance() { return new deleteTopic_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.deleteTopic(args.request,resultHandler); } } public static class changeTopicAttribute<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, changeTopicAttribute_args, Void> { public changeTopicAttribute() { super("changeTopicAttribute"); } public changeTopicAttribute_args getEmptyArgsInstance() { return new changeTopicAttribute_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.changeTopicAttribute(args.request,resultHandler); } } public static class describeTopic<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, describeTopic_args, DescribeTopicResponse> { public describeTopic() { super("describeTopic"); } public describeTopic_args getEmptyArgsInstance() { return new describeTopic_args(); } public AsyncMethodCallback<DescribeTopicResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<DescribeTopicResponse>() { 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<DescribeTopicResponse> resultHandler) throws TException { iface.describeTopic(args.request,resultHandler); } } public static class listTopics<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, listTopics_args, ListTopicsResponse> { public listTopics() { super("listTopics"); } public listTopics_args getEmptyArgsInstance() { return new listTopics_args(); } public AsyncMethodCallback<ListTopicsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ListTopicsResponse>() { 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<ListTopicsResponse> resultHandler) throws TException { iface.listTopics(resultHandler); } } public static class getBindTopics<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getBindTopics_args, ListTopicsResponse> { public getBindTopics() { super("getBindTopics"); } public getBindTopics_args getEmptyArgsInstance() { return new getBindTopics_args(); } public AsyncMethodCallback<ListTopicsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ListTopicsResponse>() { public void onComplete(ListTopicsResponse o) { getBindTopics_result result = new getBindTopics_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; getBindTopics_result result = new getBindTopics_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, getBindTopics_args args, libthrift091.async.AsyncMethodCallback<ListTopicsResponse> resultHandler) throws TException { iface.getBindTopics(resultHandler); } } public static class setTopicQuota<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, setTopicQuota_args, Void> { public setTopicQuota() { super("setTopicQuota"); } public setTopicQuota_args getEmptyArgsInstance() { return new setTopicQuota_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.setTopicQuota(args.request,resultHandler); } } public static class queryTopicQuota<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, queryTopicQuota_args, QueryTopicQuotaResponse> { public queryTopicQuota() { super("queryTopicQuota"); } public queryTopicQuota_args getEmptyArgsInstance() { return new queryTopicQuota_args(); } public AsyncMethodCallback<QueryTopicQuotaResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<QueryTopicQuotaResponse>() { 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<QueryTopicQuotaResponse> resultHandler) throws TException { iface.queryTopicQuota(args.request,resultHandler); } } public static class deleteTopicQuota<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deleteTopicQuota_args, Void> { public deleteTopicQuota() { super("deleteTopicQuota"); } public deleteTopicQuota_args getEmptyArgsInstance() { return new deleteTopicQuota_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.deleteTopicQuota(args.request,resultHandler); } } public static class setPermission<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, setPermission_args, Void> { public setPermission() { super("setPermission"); } public setPermission_args getEmptyArgsInstance() { return new setPermission_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.setPermission(args.request,resultHandler); } } public static class revokePermission<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, revokePermission_args, Void> { public revokePermission() { super("revokePermission"); } public revokePermission_args getEmptyArgsInstance() { return new revokePermission_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.revokePermission(args.request,resultHandler); } } public static class listPermission<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, listPermission_args, ListPermissionResponse> { public listPermission() { super("listPermission"); } public listPermission_args getEmptyArgsInstance() { return new listPermission_args(); } public AsyncMethodCallback<ListPermissionResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ListPermissionResponse>() { 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<ListPermissionResponse> resultHandler) throws TException { iface.listPermission(args.request,resultHandler); } } public static class getPermission<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, getPermission_args, GetPermissionResponse> { public getPermission() { super("getPermission"); } public getPermission_args getEmptyArgsInstance() { return new getPermission_args(); } public AsyncMethodCallback<GetPermissionResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetPermissionResponse>() { 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<GetPermissionResponse> resultHandler) throws TException { iface.getPermission(args.request,resultHandler); } } public static class addSubResourceName<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, addSubResourceName_args, Void> { public addSubResourceName() { super("addSubResourceName"); } public addSubResourceName_args getEmptyArgsInstance() { return new addSubResourceName_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { 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<Void> resultHandler) throws TException { iface.addSubResourceName(args.request,resultHandler); } } } public static class createTopic_args implements libthrift091.TBase<createTopic_args, createTopic_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTopic_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<createTopic_args> { 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<createTopic_args> { @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<createTopic_result, createTopic_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTopic_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<createTopic_result> { 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<createTopic_result> { @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<deleteTopic_args, deleteTopic_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteTopic_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<deleteTopic_args> { 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<deleteTopic_args> { @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<deleteTopic_result, deleteTopic_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteTopic_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<deleteTopic_result> { 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<deleteTopic_result> { @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<changeTopicAttribute_args, changeTopicAttribute_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTopicAttribute_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<changeTopicAttribute_args> { 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<changeTopicAttribute_args> { @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<changeTopicAttribute_result, changeTopicAttribute_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTopicAttribute_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<changeTopicAttribute_result> { 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<changeTopicAttribute_result> { @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<describeTopic_args, describeTopic_args._Fields>, java.io.Serializable, Cloneable, Comparable<describeTopic_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<describeTopic_args> { 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<describeTopic_args> { @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<describeTopic_result, describeTopic_result._Fields>, java.io.Serializable, Cloneable, Comparable<describeTopic_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<describeTopic_result> { 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<describeTopic_result> { @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<listTopics_args, listTopics_args._Fields>, java.io.Serializable, Cloneable, Comparable<listTopics_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listTopics_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listTopics_args.class, metaDataMap); } public listTopics_args() { } /** * Performs a deep copy on <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<listTopics_args> { 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<listTopics_args> { @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<listTopics_result, listTopics_result._Fields>, java.io.Serializable, Cloneable, Comparable<listTopics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<listTopics_result> { 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<listTopics_result> { @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 getBindTopics_args implements libthrift091.TBase<getBindTopics_args, getBindTopics_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBindTopics_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getBindTopics_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getBindTopics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getBindTopics_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getBindTopics_args.class, metaDataMap); } public getBindTopics_args() { } /** * Performs a deep copy on <i>other</i>. */ public getBindTopics_args(getBindTopics_args other) { } public getBindTopics_args deepCopy() { return new getBindTopics_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 getBindTopics_args) return this.equals((getBindTopics_args)that); return false; } public boolean equals(getBindTopics_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(getBindTopics_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("getBindTopics_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 getBindTopics_argsStandardSchemeFactory implements SchemeFactory { public getBindTopics_argsStandardScheme getScheme() { return new getBindTopics_argsStandardScheme(); } } private static class getBindTopics_argsStandardScheme extends StandardScheme<getBindTopics_args> { public void read(libthrift091.protocol.TProtocol iprot, getBindTopics_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, getBindTopics_args struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getBindTopics_argsTupleSchemeFactory implements SchemeFactory { public getBindTopics_argsTupleScheme getScheme() { return new getBindTopics_argsTupleScheme(); } } private static class getBindTopics_argsTupleScheme extends TupleScheme<getBindTopics_args> { @Override public void write(libthrift091.protocol.TProtocol prot, getBindTopics_args struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(libthrift091.protocol.TProtocol prot, getBindTopics_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class getBindTopics_result implements libthrift091.TBase<getBindTopics_result, getBindTopics_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBindTopics_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getBindTopics_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getBindTopics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getBindTopics_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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(getBindTopics_result.class, metaDataMap); } public getBindTopics_result() { } public getBindTopics_result( ListTopicsResponse success, com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getBindTopics_result(getBindTopics_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 getBindTopics_result deepCopy() { return new getBindTopics_result(this); } @Override public void clear() { this.success = null; this.e = null; } public ListTopicsResponse getSuccess() { return this.success; } public getBindTopics_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 getBindTopics_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 getBindTopics_result) return this.equals((getBindTopics_result)that); return false; } public boolean equals(getBindTopics_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<Object> list = new ArrayList<Object>(); 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(getBindTopics_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("getBindTopics_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 getBindTopics_resultStandardSchemeFactory implements SchemeFactory { public getBindTopics_resultStandardScheme getScheme() { return new getBindTopics_resultStandardScheme(); } } private static class getBindTopics_resultStandardScheme extends StandardScheme<getBindTopics_result> { public void read(libthrift091.protocol.TProtocol iprot, getBindTopics_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, getBindTopics_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 getBindTopics_resultTupleSchemeFactory implements SchemeFactory { public getBindTopics_resultTupleScheme getScheme() { return new getBindTopics_resultTupleScheme(); } } private static class getBindTopics_resultTupleScheme extends TupleScheme<getBindTopics_result> { @Override public void write(libthrift091.protocol.TProtocol prot, getBindTopics_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, getBindTopics_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<setTopicQuota_args, setTopicQuota_args._Fields>, java.io.Serializable, Cloneable, Comparable<setTopicQuota_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<setTopicQuota_args> { 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<setTopicQuota_args> { @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<setTopicQuota_result, setTopicQuota_result._Fields>, java.io.Serializable, Cloneable, Comparable<setTopicQuota_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<setTopicQuota_result> { 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<setTopicQuota_result> { @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<queryTopicQuota_args, queryTopicQuota_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryTopicQuota_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<queryTopicQuota_args> { 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<queryTopicQuota_args> { @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<queryTopicQuota_result, queryTopicQuota_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryTopicQuota_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<queryTopicQuota_result> { 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<queryTopicQuota_result> { @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<deleteTopicQuota_args, deleteTopicQuota_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteTopicQuota_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, DeleteTopicQuotaRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteTopicQuota_args.class, metaDataMap); } public deleteTopicQuota_args() { } public deleteTopicQuota_args( DeleteTopicQuotaRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public deleteTopicQuota_args(deleteTopicQuota_args other) { if (other.isSetRequest()) { this.request = new DeleteTopicQuotaRequest(other.request); } } public deleteTopicQuota_args deepCopy() { return new deleteTopicQuota_args(this); } @Override public void clear() { this.request = null; } public DeleteTopicQuotaRequest getRequest() { return this.request; } public deleteTopicQuota_args setRequest(DeleteTopicQuotaRequest 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((DeleteTopicQuotaRequest)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 deleteTopicQuota_args) return this.equals((deleteTopicQuota_args)that); return false; } public boolean equals(deleteTopicQuota_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<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(deleteTopicQuota_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("deleteTopicQuota_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 deleteTopicQuota_argsStandardSchemeFactory implements SchemeFactory { public deleteTopicQuota_argsStandardScheme getScheme() { return new deleteTopicQuota_argsStandardScheme(); } } private static class deleteTopicQuota_argsStandardScheme extends StandardScheme<deleteTopicQuota_args> { public void read(libthrift091.protocol.TProtocol iprot, deleteTopicQuota_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 DeleteTopicQuotaRequest(); 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, deleteTopicQuota_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 deleteTopicQuota_argsTupleSchemeFactory implements SchemeFactory { public deleteTopicQuota_argsTupleScheme getScheme() { return new deleteTopicQuota_argsTupleScheme(); } } private static class deleteTopicQuota_argsTupleScheme extends TupleScheme<deleteTopicQuota_args> { @Override public void write(libthrift091.protocol.TProtocol prot, deleteTopicQuota_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, deleteTopicQuota_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new DeleteTopicQuotaRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class deleteTopicQuota_result implements libthrift091.TBase<deleteTopicQuota_result, deleteTopicQuota_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteTopicQuota_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTopicQuota_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteTopicQuota_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteTopicQuota_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(deleteTopicQuota_result.class, metaDataMap); } public deleteTopicQuota_result() { } public deleteTopicQuota_result( com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public deleteTopicQuota_result(deleteTopicQuota_result other) { if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e); } } public deleteTopicQuota_result deepCopy() { return new deleteTopicQuota_result(this); } @Override public void clear() { this.e = null; } public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() { return this.e; } public deleteTopicQuota_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 deleteTopicQuota_result) return this.equals((deleteTopicQuota_result)that); return false; } public boolean equals(deleteTopicQuota_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<Object> list = new ArrayList<Object>(); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(deleteTopicQuota_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("deleteTopicQuota_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 deleteTopicQuota_resultStandardSchemeFactory implements SchemeFactory { public deleteTopicQuota_resultStandardScheme getScheme() { return new deleteTopicQuota_resultStandardScheme(); } } private static class deleteTopicQuota_resultStandardScheme extends StandardScheme<deleteTopicQuota_result> { public void read(libthrift091.protocol.TProtocol iprot, deleteTopicQuota_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, deleteTopicQuota_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 deleteTopicQuota_resultTupleSchemeFactory implements SchemeFactory { public deleteTopicQuota_resultTupleScheme getScheme() { return new deleteTopicQuota_resultTupleScheme(); } } private static class deleteTopicQuota_resultTupleScheme extends TupleScheme<deleteTopicQuota_result> { @Override public void write(libthrift091.protocol.TProtocol prot, deleteTopicQuota_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, deleteTopicQuota_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 setPermission_args implements libthrift091.TBase<setPermission_args, setPermission_args._Fields>, java.io.Serializable, Cloneable, Comparable<setPermission_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setPermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setPermission_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new setPermission_argsTupleSchemeFactory()); } public SetPermissionRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, SetPermissionRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setPermission_args.class, metaDataMap); } public setPermission_args() { } public setPermission_args( SetPermissionRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public setPermission_args(setPermission_args other) { if (other.isSetRequest()) { this.request = new SetPermissionRequest(other.request); } } public setPermission_args deepCopy() { return new setPermission_args(this); } @Override public void clear() { this.request = null; } public SetPermissionRequest getRequest() { return this.request; } public setPermission_args setRequest(SetPermissionRequest 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((SetPermissionRequest)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 setPermission_args) return this.equals((setPermission_args)that); return false; } public boolean equals(setPermission_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<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(setPermission_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("setPermission_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 setPermission_argsStandardSchemeFactory implements SchemeFactory { public setPermission_argsStandardScheme getScheme() { return new setPermission_argsStandardScheme(); } } private static class setPermission_argsStandardScheme extends StandardScheme<setPermission_args> { public void read(libthrift091.protocol.TProtocol iprot, setPermission_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 SetPermissionRequest(); 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, setPermission_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 setPermission_argsTupleSchemeFactory implements SchemeFactory { public setPermission_argsTupleScheme getScheme() { return new setPermission_argsTupleScheme(); } } private static class setPermission_argsTupleScheme extends TupleScheme<setPermission_args> { @Override public void write(libthrift091.protocol.TProtocol prot, setPermission_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, setPermission_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new SetPermissionRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class setPermission_result implements libthrift091.TBase<setPermission_result, setPermission_result._Fields>, java.io.Serializable, Cloneable, Comparable<setPermission_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setPermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setPermission_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new setPermission_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(setPermission_result.class, metaDataMap); } public setPermission_result() { } public setPermission_result( com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public setPermission_result(setPermission_result other) { if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e); } } public setPermission_result deepCopy() { return new setPermission_result(this); } @Override public void clear() { this.e = null; } public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() { return this.e; } public setPermission_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 setPermission_result) return this.equals((setPermission_result)that); return false; } public boolean equals(setPermission_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<Object> list = new ArrayList<Object>(); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(setPermission_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("setPermission_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 setPermission_resultStandardSchemeFactory implements SchemeFactory { public setPermission_resultStandardScheme getScheme() { return new setPermission_resultStandardScheme(); } } private static class setPermission_resultStandardScheme extends StandardScheme<setPermission_result> { public void read(libthrift091.protocol.TProtocol iprot, setPermission_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, setPermission_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 setPermission_resultTupleSchemeFactory implements SchemeFactory { public setPermission_resultTupleScheme getScheme() { return new setPermission_resultTupleScheme(); } } private static class setPermission_resultTupleScheme extends TupleScheme<setPermission_result> { @Override public void write(libthrift091.protocol.TProtocol prot, setPermission_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, setPermission_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 revokePermission_args implements libthrift091.TBase<revokePermission_args, revokePermission_args._Fields>, java.io.Serializable, Cloneable, Comparable<revokePermission_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("revokePermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revokePermission_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new revokePermission_argsTupleSchemeFactory()); } public RevokePermissionRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, RevokePermissionRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(revokePermission_args.class, metaDataMap); } public revokePermission_args() { } public revokePermission_args( RevokePermissionRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public revokePermission_args(revokePermission_args other) { if (other.isSetRequest()) { this.request = new RevokePermissionRequest(other.request); } } public revokePermission_args deepCopy() { return new revokePermission_args(this); } @Override public void clear() { this.request = null; } public RevokePermissionRequest getRequest() { return this.request; } public revokePermission_args setRequest(RevokePermissionRequest 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((RevokePermissionRequest)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 revokePermission_args) return this.equals((revokePermission_args)that); return false; } public boolean equals(revokePermission_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<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(revokePermission_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("revokePermission_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 revokePermission_argsStandardSchemeFactory implements SchemeFactory { public revokePermission_argsStandardScheme getScheme() { return new revokePermission_argsStandardScheme(); } } private static class revokePermission_argsStandardScheme extends StandardScheme<revokePermission_args> { public void read(libthrift091.protocol.TProtocol iprot, revokePermission_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 RevokePermissionRequest(); 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, revokePermission_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 revokePermission_argsTupleSchemeFactory implements SchemeFactory { public revokePermission_argsTupleScheme getScheme() { return new revokePermission_argsTupleScheme(); } } private static class revokePermission_argsTupleScheme extends TupleScheme<revokePermission_args> { @Override public void write(libthrift091.protocol.TProtocol prot, revokePermission_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, revokePermission_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new RevokePermissionRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class revokePermission_result implements libthrift091.TBase<revokePermission_result, revokePermission_result._Fields>, java.io.Serializable, Cloneable, Comparable<revokePermission_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("revokePermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revokePermission_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new revokePermission_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(revokePermission_result.class, metaDataMap); } public revokePermission_result() { } public revokePermission_result( com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public revokePermission_result(revokePermission_result other) { if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e); } } public revokePermission_result deepCopy() { return new revokePermission_result(this); } @Override public void clear() { this.e = null; } public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() { return this.e; } public revokePermission_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 revokePermission_result) return this.equals((revokePermission_result)that); return false; } public boolean equals(revokePermission_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<Object> list = new ArrayList<Object>(); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(revokePermission_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("revokePermission_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 revokePermission_resultStandardSchemeFactory implements SchemeFactory { public revokePermission_resultStandardScheme getScheme() { return new revokePermission_resultStandardScheme(); } } private static class revokePermission_resultStandardScheme extends StandardScheme<revokePermission_result> { public void read(libthrift091.protocol.TProtocol iprot, revokePermission_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, revokePermission_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 revokePermission_resultTupleSchemeFactory implements SchemeFactory { public revokePermission_resultTupleScheme getScheme() { return new revokePermission_resultTupleScheme(); } } private static class revokePermission_resultTupleScheme extends TupleScheme<revokePermission_result> { @Override public void write(libthrift091.protocol.TProtocol prot, revokePermission_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, revokePermission_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 listPermission_args implements libthrift091.TBase<listPermission_args, listPermission_args._Fields>, java.io.Serializable, Cloneable, Comparable<listPermission_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listPermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new listPermission_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new listPermission_argsTupleSchemeFactory()); } public ListPermissionRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, ListPermissionRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listPermission_args.class, metaDataMap); } public listPermission_args() { } public listPermission_args( ListPermissionRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public listPermission_args(listPermission_args other) { if (other.isSetRequest()) { this.request = new ListPermissionRequest(other.request); } } public listPermission_args deepCopy() { return new listPermission_args(this); } @Override public void clear() { this.request = null; } public ListPermissionRequest getRequest() { return this.request; } public listPermission_args setRequest(ListPermissionRequest 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((ListPermissionRequest)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 listPermission_args) return this.equals((listPermission_args)that); return false; } public boolean equals(listPermission_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<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(listPermission_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("listPermission_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 listPermission_argsStandardSchemeFactory implements SchemeFactory { public listPermission_argsStandardScheme getScheme() { return new listPermission_argsStandardScheme(); } } private static class listPermission_argsStandardScheme extends StandardScheme<listPermission_args> { public void read(libthrift091.protocol.TProtocol iprot, listPermission_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 ListPermissionRequest(); 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, listPermission_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 listPermission_argsTupleSchemeFactory implements SchemeFactory { public listPermission_argsTupleScheme getScheme() { return new listPermission_argsTupleScheme(); } } private static class listPermission_argsTupleScheme extends TupleScheme<listPermission_args> { @Override public void write(libthrift091.protocol.TProtocol prot, listPermission_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, listPermission_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new ListPermissionRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class listPermission_result implements libthrift091.TBase<listPermission_result, listPermission_result._Fields>, java.io.Serializable, Cloneable, Comparable<listPermission_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listPermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new listPermission_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new listPermission_resultTupleSchemeFactory()); } public ListPermissionResponse 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, ListPermissionResponse.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(listPermission_result.class, metaDataMap); } public listPermission_result() { } public listPermission_result( ListPermissionResponse success, com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public listPermission_result(listPermission_result other) { if (other.isSetSuccess()) { this.success = new ListPermissionResponse(other.success); } if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e); } } public listPermission_result deepCopy() { return new listPermission_result(this); } @Override public void clear() { this.success = null; this.e = null; } public ListPermissionResponse getSuccess() { return this.success; } public listPermission_result setSuccess(ListPermissionResponse 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 listPermission_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((ListPermissionResponse)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 listPermission_result) return this.equals((listPermission_result)that); return false; } public boolean equals(listPermission_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<Object> list = new ArrayList<Object>(); 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(listPermission_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("listPermission_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 listPermission_resultStandardSchemeFactory implements SchemeFactory { public listPermission_resultStandardScheme getScheme() { return new listPermission_resultStandardScheme(); } } private static class listPermission_resultStandardScheme extends StandardScheme<listPermission_result> { public void read(libthrift091.protocol.TProtocol iprot, listPermission_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 ListPermissionResponse(); 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, listPermission_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 listPermission_resultTupleSchemeFactory implements SchemeFactory { public listPermission_resultTupleScheme getScheme() { return new listPermission_resultTupleScheme(); } } private static class listPermission_resultTupleScheme extends TupleScheme<listPermission_result> { @Override public void write(libthrift091.protocol.TProtocol prot, listPermission_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, listPermission_result struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new ListPermissionResponse(); 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 getPermission_args implements libthrift091.TBase<getPermission_args, getPermission_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPermission_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getPermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getPermission_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getPermission_argsTupleSchemeFactory()); } public GetPermissionRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, GetPermissionRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getPermission_args.class, metaDataMap); } public getPermission_args() { } public getPermission_args( GetPermissionRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public getPermission_args(getPermission_args other) { if (other.isSetRequest()) { this.request = new GetPermissionRequest(other.request); } } public getPermission_args deepCopy() { return new getPermission_args(this); } @Override public void clear() { this.request = null; } public GetPermissionRequest getRequest() { return this.request; } public getPermission_args setRequest(GetPermissionRequest 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((GetPermissionRequest)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 getPermission_args) return this.equals((getPermission_args)that); return false; } public boolean equals(getPermission_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<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(getPermission_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("getPermission_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 getPermission_argsStandardSchemeFactory implements SchemeFactory { public getPermission_argsStandardScheme getScheme() { return new getPermission_argsStandardScheme(); } } private static class getPermission_argsStandardScheme extends StandardScheme<getPermission_args> { public void read(libthrift091.protocol.TProtocol iprot, getPermission_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 GetPermissionRequest(); 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, getPermission_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 getPermission_argsTupleSchemeFactory implements SchemeFactory { public getPermission_argsTupleScheme getScheme() { return new getPermission_argsTupleScheme(); } } private static class getPermission_argsTupleScheme extends TupleScheme<getPermission_args> { @Override public void write(libthrift091.protocol.TProtocol prot, getPermission_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, getPermission_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new GetPermissionRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class getPermission_result implements libthrift091.TBase<getPermission_result, getPermission_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPermission_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getPermission_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getPermission_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getPermission_resultTupleSchemeFactory()); } public GetPermissionResponse 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, GetPermissionResponse.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(getPermission_result.class, metaDataMap); } public getPermission_result() { } public getPermission_result( GetPermissionResponse success, com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getPermission_result(getPermission_result other) { if (other.isSetSuccess()) { this.success = new GetPermissionResponse(other.success); } if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e); } } public getPermission_result deepCopy() { return new getPermission_result(this); } @Override public void clear() { this.success = null; this.e = null; } public GetPermissionResponse getSuccess() { return this.success; } public getPermission_result setSuccess(GetPermissionResponse 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 getPermission_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((GetPermissionResponse)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 getPermission_result) return this.equals((getPermission_result)that); return false; } public boolean equals(getPermission_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<Object> list = new ArrayList<Object>(); 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(getPermission_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("getPermission_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 getPermission_resultStandardSchemeFactory implements SchemeFactory { public getPermission_resultStandardScheme getScheme() { return new getPermission_resultStandardScheme(); } } private static class getPermission_resultStandardScheme extends StandardScheme<getPermission_result> { public void read(libthrift091.protocol.TProtocol iprot, getPermission_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 GetPermissionResponse(); 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, getPermission_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 getPermission_resultTupleSchemeFactory implements SchemeFactory { public getPermission_resultTupleScheme getScheme() { return new getPermission_resultTupleScheme(); } } private static class getPermission_resultTupleScheme extends TupleScheme<getPermission_result> { @Override public void write(libthrift091.protocol.TProtocol prot, getPermission_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, getPermission_result struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetPermissionResponse(); 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 addSubResourceName_args implements libthrift091.TBase<addSubResourceName_args, addSubResourceName_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSubResourceName_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addSubResourceName_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addSubResourceName_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new addSubResourceName_argsTupleSchemeFactory()); } public AddSubResourceNameRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, AddSubResourceNameRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(addSubResourceName_args.class, metaDataMap); } public addSubResourceName_args() { } public addSubResourceName_args( AddSubResourceNameRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public addSubResourceName_args(addSubResourceName_args other) { if (other.isSetRequest()) { this.request = new AddSubResourceNameRequest(other.request); } } public addSubResourceName_args deepCopy() { return new addSubResourceName_args(this); } @Override public void clear() { this.request = null; } public AddSubResourceNameRequest getRequest() { return this.request; } public addSubResourceName_args setRequest(AddSubResourceNameRequest 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((AddSubResourceNameRequest)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 addSubResourceName_args) return this.equals((addSubResourceName_args)that); return false; } public boolean equals(addSubResourceName_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<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(addSubResourceName_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("addSubResourceName_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 addSubResourceName_argsStandardSchemeFactory implements SchemeFactory { public addSubResourceName_argsStandardScheme getScheme() { return new addSubResourceName_argsStandardScheme(); } } private static class addSubResourceName_argsStandardScheme extends StandardScheme<addSubResourceName_args> { public void read(libthrift091.protocol.TProtocol iprot, addSubResourceName_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 AddSubResourceNameRequest(); 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, addSubResourceName_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 addSubResourceName_argsTupleSchemeFactory implements SchemeFactory { public addSubResourceName_argsTupleScheme getScheme() { return new addSubResourceName_argsTupleScheme(); } } private static class addSubResourceName_argsTupleScheme extends TupleScheme<addSubResourceName_args> { @Override public void write(libthrift091.protocol.TProtocol prot, addSubResourceName_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, addSubResourceName_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new AddSubResourceNameRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class addSubResourceName_result implements libthrift091.TBase<addSubResourceName_result, addSubResourceName_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSubResourceName_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("addSubResourceName_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addSubResourceName_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new addSubResourceName_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(addSubResourceName_result.class, metaDataMap); } public addSubResourceName_result() { } public addSubResourceName_result( com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public addSubResourceName_result(addSubResourceName_result other) { if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException(other.e); } } public addSubResourceName_result deepCopy() { return new addSubResourceName_result(this); } @Override public void clear() { this.e = null; } public com.xiaomi.infra.galaxy.talos.thrift.GalaxyTalosException getE() { return this.e; } public addSubResourceName_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 addSubResourceName_result) return this.equals((addSubResourceName_result)that); return false; } public boolean equals(addSubResourceName_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<Object> list = new ArrayList<Object>(); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(addSubResourceName_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("addSubResourceName_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 addSubResourceName_resultStandardSchemeFactory implements SchemeFactory { public addSubResourceName_resultStandardScheme getScheme() { return new addSubResourceName_resultStandardScheme(); } } private static class addSubResourceName_resultStandardScheme extends StandardScheme<addSubResourceName_result> { public void read(libthrift091.protocol.TProtocol iprot, addSubResourceName_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, addSubResourceName_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 addSubResourceName_resultTupleSchemeFactory implements SchemeFactory { public addSubResourceName_resultTupleScheme getScheme() { return new addSubResourceName_resultTupleScheme(); } } private static class addSubResourceName_resultTupleScheme extends TupleScheme<addSubResourceName_result> { @Override public void write(libthrift091.protocol.TProtocol prot, addSubResourceName_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, addSubResourceName_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); } } } } }