/** * Autogenerated by Thrift Compiler (0.9.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.opendaylight.netvirt.bgpmanager.thrift.gen; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.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 org.slf4j.Logger; import org.slf4j.LoggerFactory; public class BgpConfigurator { public interface Iface { public int startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) throws org.apache.thrift.TException; public int stopBgp(int asNumber) throws org.apache.thrift.TException; public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException; public int deletePeer(String ipAddress) throws org.apache.thrift.TException; public int addVrf(String rd, List irts, List erts) throws org.apache.thrift.TException; public int delVrf(String rd) throws org.apache.thrift.TException; public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException; public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException; public int setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException; public int unsetEbgpMultihop(String peerIp) throws org.apache.thrift.TException; public int setUpdateSource(String peerIp, String srcIp) throws org.apache.thrift.TException; public int unsetUpdateSource(String peerIp) throws org.apache.thrift.TException; public int enableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException; public int disableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException; public int setLogConfig(String logFileName, String logLevel) throws org.apache.thrift.TException; public int enableGracefulRestart(int stalepathTime) throws org.apache.thrift.TException; public int disableGracefulRestart() throws org.apache.thrift.TException; public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException; } public interface AsyncIface { public void startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void stopBgp(int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void addVrf(String rd, List irts, List erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setEbgpMultihop(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void unsetEbgpMultihop(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setUpdateSource(String peerIp, String srcIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void unsetUpdateSource(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void enableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void disableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setLogConfig(String logFileName, String logLevel, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void enableGracefulRestart(int stalepathTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void disableGracefulRestart(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public int startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) throws org.apache.thrift.TException { send_startBgp(asNumber, routerId, port, holdTime, keepAliveTime, stalepathTime, announceFbit); return recv_startBgp(); } public void send_startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) throws org.apache.thrift.TException { startBgp_args args = new startBgp_args(); args.setAsNumber(asNumber); args.setRouterId(routerId); args.setPort(port); args.setHoldTime(holdTime); args.setKeepAliveTime(keepAliveTime); args.setStalepathTime(stalepathTime); args.setAnnounceFbit(announceFbit); sendBase("startBgp", args); } public int recv_startBgp() throws org.apache.thrift.TException { startBgp_result result = new startBgp_result(); receiveBase(result, "startBgp"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startBgp failed: unknown result"); } public int stopBgp(int asNumber) throws org.apache.thrift.TException { send_stopBgp(asNumber); return recv_stopBgp(); } public void send_stopBgp(int asNumber) throws org.apache.thrift.TException { stopBgp_args args = new stopBgp_args(); args.setAsNumber(asNumber); sendBase("stopBgp", args); } public int recv_stopBgp() throws org.apache.thrift.TException { stopBgp_result result = new stopBgp_result(); receiveBase(result, "stopBgp"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stopBgp failed: unknown result"); } public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException { send_createPeer(ipAddress, asNumber); return recv_createPeer(); } public void send_createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException { createPeer_args args = new createPeer_args(); args.setIpAddress(ipAddress); args.setAsNumber(asNumber); sendBase("createPeer", args); } public int recv_createPeer() throws org.apache.thrift.TException { createPeer_result result = new createPeer_result(); receiveBase(result, "createPeer"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPeer failed: unknown result"); } public int deletePeer(String ipAddress) throws org.apache.thrift.TException { send_deletePeer(ipAddress); return recv_deletePeer(); } public void send_deletePeer(String ipAddress) throws org.apache.thrift.TException { deletePeer_args args = new deletePeer_args(); args.setIpAddress(ipAddress); sendBase("deletePeer", args); } public int recv_deletePeer() throws org.apache.thrift.TException { deletePeer_result result = new deletePeer_result(); receiveBase(result, "deletePeer"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deletePeer failed: unknown result"); } public int addVrf(String rd, List irts, List erts) throws org.apache.thrift.TException { send_addVrf(rd, irts, erts); return recv_addVrf(); } public void send_addVrf(String rd, List irts, List erts) throws org.apache.thrift.TException { addVrf_args args = new addVrf_args(); args.setRd(rd); args.setIrts(irts); args.setErts(erts); sendBase("addVrf", args); } public int recv_addVrf() throws org.apache.thrift.TException { addVrf_result result = new addVrf_result(); receiveBase(result, "addVrf"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addVrf failed: unknown result"); } public int delVrf(String rd) throws org.apache.thrift.TException { send_delVrf(rd); return recv_delVrf(); } public void send_delVrf(String rd) throws org.apache.thrift.TException { delVrf_args args = new delVrf_args(); args.setRd(rd); sendBase("delVrf", args); } public int recv_delVrf() throws org.apache.thrift.TException { delVrf_result result = new delVrf_result(); receiveBase(result, "delVrf"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delVrf failed: unknown result"); } public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException { send_pushRoute(prefix, nexthop, rd, label); return recv_pushRoute(); } public void send_pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException { pushRoute_args args = new pushRoute_args(); args.setPrefix(prefix); args.setNexthop(nexthop); args.setRd(rd); args.setLabel(label); sendBase("pushRoute", args); } public int recv_pushRoute() throws org.apache.thrift.TException { pushRoute_result result = new pushRoute_result(); receiveBase(result, "pushRoute"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushRoute failed: unknown result"); } public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException { send_withdrawRoute(prefix, rd); return recv_withdrawRoute(); } public void send_withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException { withdrawRoute_args args = new withdrawRoute_args(); args.setPrefix(prefix); args.setRd(rd); sendBase("withdrawRoute", args); } public int recv_withdrawRoute() throws org.apache.thrift.TException { withdrawRoute_result result = new withdrawRoute_result(); receiveBase(result, "withdrawRoute"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "withdrawRoute failed: unknown result"); } public int setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException { send_setEbgpMultihop(peerIp, nHops); return recv_setEbgpMultihop(); } public void send_setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException { setEbgpMultihop_args args = new setEbgpMultihop_args(); args.setPeerIp(peerIp); args.setNHops(nHops); sendBase("setEbgpMultihop", args); } public int recv_setEbgpMultihop() throws org.apache.thrift.TException { setEbgpMultihop_result result = new setEbgpMultihop_result(); receiveBase(result, "setEbgpMultihop"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setEbgpMultihop failed: unknown result"); } public int unsetEbgpMultihop(String peerIp) throws org.apache.thrift.TException { send_unsetEbgpMultihop(peerIp); return recv_unsetEbgpMultihop(); } public void send_unsetEbgpMultihop(String peerIp) throws org.apache.thrift.TException { unsetEbgpMultihop_args args = new unsetEbgpMultihop_args(); args.setPeerIp(peerIp); sendBase("unsetEbgpMultihop", args); } public int recv_unsetEbgpMultihop() throws org.apache.thrift.TException { unsetEbgpMultihop_result result = new unsetEbgpMultihop_result(); receiveBase(result, "unsetEbgpMultihop"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unsetEbgpMultihop failed: unknown result"); } public int setUpdateSource(String peerIp, String srcIp) throws org.apache.thrift.TException { send_setUpdateSource(peerIp, srcIp); return recv_setUpdateSource(); } public void send_setUpdateSource(String peerIp, String srcIp) throws org.apache.thrift.TException { setUpdateSource_args args = new setUpdateSource_args(); args.setPeerIp(peerIp); args.setSrcIp(srcIp); sendBase("setUpdateSource", args); } public int recv_setUpdateSource() throws org.apache.thrift.TException { setUpdateSource_result result = new setUpdateSource_result(); receiveBase(result, "setUpdateSource"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUpdateSource failed: unknown result"); } public int unsetUpdateSource(String peerIp) throws org.apache.thrift.TException { send_unsetUpdateSource(peerIp); return recv_unsetUpdateSource(); } public void send_unsetUpdateSource(String peerIp) throws org.apache.thrift.TException { unsetUpdateSource_args args = new unsetUpdateSource_args(); args.setPeerIp(peerIp); sendBase("unsetUpdateSource", args); } public int recv_unsetUpdateSource() throws org.apache.thrift.TException { unsetUpdateSource_result result = new unsetUpdateSource_result(); receiveBase(result, "unsetUpdateSource"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unsetUpdateSource failed: unknown result"); } public int enableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException { send_enableAddressFamily(peerIp, afi, safi); return recv_enableAddressFamily(); } public void send_enableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException { enableAddressFamily_args args = new enableAddressFamily_args(); args.setPeerIp(peerIp); args.setAfi(afi); args.setSafi(safi); sendBase("enableAddressFamily", args); } public int recv_enableAddressFamily() throws org.apache.thrift.TException { enableAddressFamily_result result = new enableAddressFamily_result(); receiveBase(result, "enableAddressFamily"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableAddressFamily failed: unknown result"); } public int disableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException { send_disableAddressFamily(peerIp, afi, safi); return recv_disableAddressFamily(); } public void send_disableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException { disableAddressFamily_args args = new disableAddressFamily_args(); args.setPeerIp(peerIp); args.setAfi(afi); args.setSafi(safi); sendBase("disableAddressFamily", args); } public int recv_disableAddressFamily() throws org.apache.thrift.TException { disableAddressFamily_result result = new disableAddressFamily_result(); receiveBase(result, "disableAddressFamily"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "disableAddressFamily failed: unknown result"); } public int setLogConfig(String logFileName, String logLevel) throws org.apache.thrift.TException { send_setLogConfig(logFileName, logLevel); return recv_setLogConfig(); } public void send_setLogConfig(String logFileName, String logLevel) throws org.apache.thrift.TException { setLogConfig_args args = new setLogConfig_args(); args.setLogFileName(logFileName); args.setLogLevel(logLevel); sendBase("setLogConfig", args); } public int recv_setLogConfig() throws org.apache.thrift.TException { setLogConfig_result result = new setLogConfig_result(); receiveBase(result, "setLogConfig"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setLogConfig failed: unknown result"); } public int enableGracefulRestart(int stalepathTime) throws org.apache.thrift.TException { send_enableGracefulRestart(stalepathTime); return recv_enableGracefulRestart(); } public void send_enableGracefulRestart(int stalepathTime) throws org.apache.thrift.TException { enableGracefulRestart_args args = new enableGracefulRestart_args(); args.setStalepathTime(stalepathTime); sendBase("enableGracefulRestart", args); } public int recv_enableGracefulRestart() throws org.apache.thrift.TException { enableGracefulRestart_result result = new enableGracefulRestart_result(); receiveBase(result, "enableGracefulRestart"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableGracefulRestart failed: unknown result"); } public int disableGracefulRestart() throws org.apache.thrift.TException { send_disableGracefulRestart(); return recv_disableGracefulRestart(); } public void send_disableGracefulRestart() throws org.apache.thrift.TException { disableGracefulRestart_args args = new disableGracefulRestart_args(); sendBase("disableGracefulRestart", args); } public int recv_disableGracefulRestart() throws org.apache.thrift.TException { disableGracefulRestart_result result = new disableGracefulRestart_result(); receiveBase(result, "disableGracefulRestart"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "disableGracefulRestart failed: unknown result"); } public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException { send_getRoutes(optype, winSize); return recv_getRoutes(); } public void send_getRoutes(int optype, int winSize) throws org.apache.thrift.TException { getRoutes_args args = new getRoutes_args(); args.setOptype(optype); args.setWinSize(winSize); sendBase("getRoutes", args); } public Routes recv_getRoutes() throws org.apache.thrift.TException { getRoutes_result result = new getRoutes_result(); receiveBase(result, "getRoutes"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRoutes failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); startBgp_call method_call = new startBgp_call(asNumber, routerId, port, holdTime, keepAliveTime, stalepathTime, announceFbit, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class startBgp_call extends org.apache.thrift.async.TAsyncMethodCall { private int asNumber; private String routerId; private int port; private int holdTime; private int keepAliveTime; private int stalepathTime; private boolean announceFbit; public startBgp_call(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.asNumber = asNumber; this.routerId = routerId; this.port = port; this.holdTime = holdTime; this.keepAliveTime = keepAliveTime; this.stalepathTime = stalepathTime; this.announceFbit = announceFbit; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startBgp", org.apache.thrift.protocol.TMessageType.CALL, 0)); startBgp_args args = new startBgp_args(); args.setAsNumber(asNumber); args.setRouterId(routerId); args.setPort(port); args.setHoldTime(holdTime); args.setKeepAliveTime(keepAliveTime); args.setStalepathTime(stalepathTime); args.setAnnounceFbit(announceFbit); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_startBgp(); } } public void stopBgp(int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); stopBgp_call method_call = new stopBgp_call(asNumber, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class stopBgp_call extends org.apache.thrift.async.TAsyncMethodCall { private int asNumber; public stopBgp_call(int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.asNumber = asNumber; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stopBgp", org.apache.thrift.protocol.TMessageType.CALL, 0)); stopBgp_args args = new stopBgp_args(); args.setAsNumber(asNumber); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_stopBgp(); } } public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); createPeer_call method_call = new createPeer_call(ipAddress, asNumber, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createPeer_call extends org.apache.thrift.async.TAsyncMethodCall { private String ipAddress; private int asNumber; public createPeer_call(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.ipAddress = ipAddress; this.asNumber = asNumber; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPeer", org.apache.thrift.protocol.TMessageType.CALL, 0)); createPeer_args args = new createPeer_args(); args.setIpAddress(ipAddress); args.setAsNumber(asNumber); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_createPeer(); } } public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deletePeer_call method_call = new deletePeer_call(ipAddress, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deletePeer_call extends org.apache.thrift.async.TAsyncMethodCall { private String ipAddress; public deletePeer_call(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.ipAddress = ipAddress; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deletePeer", org.apache.thrift.protocol.TMessageType.CALL, 0)); deletePeer_args args = new deletePeer_args(); args.setIpAddress(ipAddress); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_deletePeer(); } } public void addVrf(String rd, List irts, List erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addVrf_call method_call = new addVrf_call(rd, irts, erts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addVrf_call extends org.apache.thrift.async.TAsyncMethodCall { private String rd; private List irts; private List erts; public addVrf_call(String rd, List irts, List erts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rd = rd; this.irts = irts; this.erts = erts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVrf", org.apache.thrift.protocol.TMessageType.CALL, 0)); addVrf_args args = new addVrf_args(); args.setRd(rd); args.setIrts(irts); args.setErts(erts); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_addVrf(); } } public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); delVrf_call method_call = new delVrf_call(rd, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delVrf_call extends org.apache.thrift.async.TAsyncMethodCall { private String rd; public delVrf_call(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rd = rd; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delVrf", org.apache.thrift.protocol.TMessageType.CALL, 0)); delVrf_args args = new delVrf_args(); args.setRd(rd); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_delVrf(); } } public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); pushRoute_call method_call = new pushRoute_call(prefix, nexthop, rd, label, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class pushRoute_call extends org.apache.thrift.async.TAsyncMethodCall { private String prefix; private String nexthop; private String rd; private int label; public pushRoute_call(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.prefix = prefix; this.nexthop = nexthop; this.rd = rd; this.label = label; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0)); pushRoute_args args = new pushRoute_args(); args.setPrefix(prefix); args.setNexthop(nexthop); args.setRd(rd); args.setLabel(label); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_pushRoute(); } } public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); withdrawRoute_call method_call = new withdrawRoute_call(prefix, rd, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class withdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall { private String prefix; private String rd; public withdrawRoute_call(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.prefix = prefix; this.rd = rd; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("withdrawRoute", org.apache.thrift.protocol.TMessageType.CALL, 0)); withdrawRoute_args args = new withdrawRoute_args(); args.setPrefix(prefix); args.setRd(rd); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_withdrawRoute(); } } public void setEbgpMultihop(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setEbgpMultihop_call method_call = new setEbgpMultihop_call(peerIp, nHops, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setEbgpMultihop_call extends org.apache.thrift.async.TAsyncMethodCall { private String peerIp; private int nHops; public setEbgpMultihop_call(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.peerIp = peerIp; this.nHops = nHops; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setEbgpMultihop", org.apache.thrift.protocol.TMessageType.CALL, 0)); setEbgpMultihop_args args = new setEbgpMultihop_args(); args.setPeerIp(peerIp); args.setNHops(nHops); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_setEbgpMultihop(); } } public void unsetEbgpMultihop(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); unsetEbgpMultihop_call method_call = new unsetEbgpMultihop_call(peerIp, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class unsetEbgpMultihop_call extends org.apache.thrift.async.TAsyncMethodCall { private String peerIp; public unsetEbgpMultihop_call(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.peerIp = peerIp; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unsetEbgpMultihop", org.apache.thrift.protocol.TMessageType.CALL, 0)); unsetEbgpMultihop_args args = new unsetEbgpMultihop_args(); args.setPeerIp(peerIp); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_unsetEbgpMultihop(); } } public void setUpdateSource(String peerIp, String srcIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setUpdateSource_call method_call = new setUpdateSource_call(peerIp, srcIp, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setUpdateSource_call extends org.apache.thrift.async.TAsyncMethodCall { private String peerIp; private String srcIp; public setUpdateSource_call(String peerIp, String srcIp, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.peerIp = peerIp; this.srcIp = srcIp; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUpdateSource", org.apache.thrift.protocol.TMessageType.CALL, 0)); setUpdateSource_args args = new setUpdateSource_args(); args.setPeerIp(peerIp); args.setSrcIp(srcIp); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_setUpdateSource(); } } public void unsetUpdateSource(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); unsetUpdateSource_call method_call = new unsetUpdateSource_call(peerIp, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class unsetUpdateSource_call extends org.apache.thrift.async.TAsyncMethodCall { private String peerIp; public unsetUpdateSource_call(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.peerIp = peerIp; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unsetUpdateSource", org.apache.thrift.protocol.TMessageType.CALL, 0)); unsetUpdateSource_args args = new unsetUpdateSource_args(); args.setPeerIp(peerIp); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_unsetUpdateSource(); } } public void enableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); enableAddressFamily_call method_call = new enableAddressFamily_call(peerIp, afi, safi, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class enableAddressFamily_call extends org.apache.thrift.async.TAsyncMethodCall { private String peerIp; private af_afi afi; private af_safi safi; public enableAddressFamily_call(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.peerIp = peerIp; this.afi = afi; this.safi = safi; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableAddressFamily", org.apache.thrift.protocol.TMessageType.CALL, 0)); enableAddressFamily_args args = new enableAddressFamily_args(); args.setPeerIp(peerIp); args.setAfi(afi); args.setSafi(safi); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_enableAddressFamily(); } } public void disableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); disableAddressFamily_call method_call = new disableAddressFamily_call(peerIp, afi, safi, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class disableAddressFamily_call extends org.apache.thrift.async.TAsyncMethodCall { private String peerIp; private af_afi afi; private af_safi safi; public disableAddressFamily_call(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.peerIp = peerIp; this.afi = afi; this.safi = safi; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableAddressFamily", org.apache.thrift.protocol.TMessageType.CALL, 0)); disableAddressFamily_args args = new disableAddressFamily_args(); args.setPeerIp(peerIp); args.setAfi(afi); args.setSafi(safi); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_disableAddressFamily(); } } public void setLogConfig(String logFileName, String logLevel, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setLogConfig_call method_call = new setLogConfig_call(logFileName, logLevel, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setLogConfig_call extends org.apache.thrift.async.TAsyncMethodCall { private String logFileName; private String logLevel; public setLogConfig_call(String logFileName, String logLevel, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.logFileName = logFileName; this.logLevel = logLevel; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setLogConfig", org.apache.thrift.protocol.TMessageType.CALL, 0)); setLogConfig_args args = new setLogConfig_args(); args.setLogFileName(logFileName); args.setLogLevel(logLevel); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_setLogConfig(); } } public void enableGracefulRestart(int stalepathTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); enableGracefulRestart_call method_call = new enableGracefulRestart_call(stalepathTime, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class enableGracefulRestart_call extends org.apache.thrift.async.TAsyncMethodCall { private int stalepathTime; public enableGracefulRestart_call(int stalepathTime, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.stalepathTime = stalepathTime; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableGracefulRestart", org.apache.thrift.protocol.TMessageType.CALL, 0)); enableGracefulRestart_args args = new enableGracefulRestart_args(); args.setStalepathTime(stalepathTime); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_enableGracefulRestart(); } } public void disableGracefulRestart(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); disableGracefulRestart_call method_call = new disableGracefulRestart_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class disableGracefulRestart_call extends org.apache.thrift.async.TAsyncMethodCall { public disableGracefulRestart_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableGracefulRestart", org.apache.thrift.protocol.TMessageType.CALL, 0)); disableGracefulRestart_args args = new disableGracefulRestart_args(); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_disableGracefulRestart(); } } public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getRoutes_call method_call = new getRoutes_call(optype, winSize, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getRoutes_call extends org.apache.thrift.async.TAsyncMethodCall { private int optype; private int winSize; public getRoutes_call(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.optype = optype; this.winSize = winSize; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRoutes", org.apache.thrift.protocol.TMessageType.CALL, 0)); getRoutes_args args = new getRoutes_args(); args.setOptype(optype); args.setWinSize(winSize); args.write(prot); prot.writeMessageEnd(); } public Routes getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getRoutes(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("startBgp", new startBgp()); processMap.put("stopBgp", new stopBgp()); processMap.put("createPeer", new createPeer()); processMap.put("deletePeer", new deletePeer()); processMap.put("addVrf", new addVrf()); processMap.put("delVrf", new delVrf()); processMap.put("pushRoute", new pushRoute()); processMap.put("withdrawRoute", new withdrawRoute()); processMap.put("setEbgpMultihop", new setEbgpMultihop()); processMap.put("unsetEbgpMultihop", new unsetEbgpMultihop()); processMap.put("setUpdateSource", new setUpdateSource()); processMap.put("unsetUpdateSource", new unsetUpdateSource()); processMap.put("enableAddressFamily", new enableAddressFamily()); processMap.put("disableAddressFamily", new disableAddressFamily()); processMap.put("setLogConfig", new setLogConfig()); processMap.put("enableGracefulRestart", new enableGracefulRestart()); processMap.put("disableGracefulRestart", new disableGracefulRestart()); processMap.put("getRoutes", new getRoutes()); return processMap; } public static class startBgp extends org.apache.thrift.ProcessFunction { public startBgp() { super("startBgp"); } public startBgp_args getEmptyArgsInstance() { return new startBgp_args(); } protected boolean isOneway() { return false; } public startBgp_result getResult(I iface, startBgp_args args) throws org.apache.thrift.TException { startBgp_result result = new startBgp_result(); result.success = iface.startBgp(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime, args.stalepathTime, args.announceFbit); result.setSuccessIsSet(true); return result; } } public static class stopBgp extends org.apache.thrift.ProcessFunction { public stopBgp() { super("stopBgp"); } public stopBgp_args getEmptyArgsInstance() { return new stopBgp_args(); } protected boolean isOneway() { return false; } public stopBgp_result getResult(I iface, stopBgp_args args) throws org.apache.thrift.TException { stopBgp_result result = new stopBgp_result(); result.success = iface.stopBgp(args.asNumber); result.setSuccessIsSet(true); return result; } } public static class createPeer extends org.apache.thrift.ProcessFunction { public createPeer() { super("createPeer"); } public createPeer_args getEmptyArgsInstance() { return new createPeer_args(); } protected boolean isOneway() { return false; } public createPeer_result getResult(I iface, createPeer_args args) throws org.apache.thrift.TException { createPeer_result result = new createPeer_result(); result.success = iface.createPeer(args.ipAddress, args.asNumber); result.setSuccessIsSet(true); return result; } } public static class deletePeer extends org.apache.thrift.ProcessFunction { public deletePeer() { super("deletePeer"); } public deletePeer_args getEmptyArgsInstance() { return new deletePeer_args(); } protected boolean isOneway() { return false; } public deletePeer_result getResult(I iface, deletePeer_args args) throws org.apache.thrift.TException { deletePeer_result result = new deletePeer_result(); result.success = iface.deletePeer(args.ipAddress); result.setSuccessIsSet(true); return result; } } public static class addVrf extends org.apache.thrift.ProcessFunction { public addVrf() { super("addVrf"); } public addVrf_args getEmptyArgsInstance() { return new addVrf_args(); } protected boolean isOneway() { return false; } public addVrf_result getResult(I iface, addVrf_args args) throws org.apache.thrift.TException { addVrf_result result = new addVrf_result(); result.success = iface.addVrf(args.rd, args.irts, args.erts); result.setSuccessIsSet(true); return result; } } public static class delVrf extends org.apache.thrift.ProcessFunction { public delVrf() { super("delVrf"); } public delVrf_args getEmptyArgsInstance() { return new delVrf_args(); } protected boolean isOneway() { return false; } public delVrf_result getResult(I iface, delVrf_args args) throws org.apache.thrift.TException { delVrf_result result = new delVrf_result(); result.success = iface.delVrf(args.rd); result.setSuccessIsSet(true); return result; } } public static class pushRoute extends org.apache.thrift.ProcessFunction { public pushRoute() { super("pushRoute"); } public pushRoute_args getEmptyArgsInstance() { return new pushRoute_args(); } protected boolean isOneway() { return false; } public pushRoute_result getResult(I iface, pushRoute_args args) throws org.apache.thrift.TException { pushRoute_result result = new pushRoute_result(); result.success = iface.pushRoute(args.prefix, args.nexthop, args.rd, args.label); result.setSuccessIsSet(true); return result; } } public static class withdrawRoute extends org.apache.thrift.ProcessFunction { public withdrawRoute() { super("withdrawRoute"); } public withdrawRoute_args getEmptyArgsInstance() { return new withdrawRoute_args(); } protected boolean isOneway() { return false; } public withdrawRoute_result getResult(I iface, withdrawRoute_args args) throws org.apache.thrift.TException { withdrawRoute_result result = new withdrawRoute_result(); result.success = iface.withdrawRoute(args.prefix, args.rd); result.setSuccessIsSet(true); return result; } } public static class setEbgpMultihop extends org.apache.thrift.ProcessFunction { public setEbgpMultihop() { super("setEbgpMultihop"); } public setEbgpMultihop_args getEmptyArgsInstance() { return new setEbgpMultihop_args(); } protected boolean isOneway() { return false; } public setEbgpMultihop_result getResult(I iface, setEbgpMultihop_args args) throws org.apache.thrift.TException { setEbgpMultihop_result result = new setEbgpMultihop_result(); result.success = iface.setEbgpMultihop(args.peerIp, args.nHops); result.setSuccessIsSet(true); return result; } } public static class unsetEbgpMultihop extends org.apache.thrift.ProcessFunction { public unsetEbgpMultihop() { super("unsetEbgpMultihop"); } public unsetEbgpMultihop_args getEmptyArgsInstance() { return new unsetEbgpMultihop_args(); } protected boolean isOneway() { return false; } public unsetEbgpMultihop_result getResult(I iface, unsetEbgpMultihop_args args) throws org.apache.thrift.TException { unsetEbgpMultihop_result result = new unsetEbgpMultihop_result(); result.success = iface.unsetEbgpMultihop(args.peerIp); result.setSuccessIsSet(true); return result; } } public static class setUpdateSource extends org.apache.thrift.ProcessFunction { public setUpdateSource() { super("setUpdateSource"); } public setUpdateSource_args getEmptyArgsInstance() { return new setUpdateSource_args(); } protected boolean isOneway() { return false; } public setUpdateSource_result getResult(I iface, setUpdateSource_args args) throws org.apache.thrift.TException { setUpdateSource_result result = new setUpdateSource_result(); result.success = iface.setUpdateSource(args.peerIp, args.srcIp); result.setSuccessIsSet(true); return result; } } public static class unsetUpdateSource extends org.apache.thrift.ProcessFunction { public unsetUpdateSource() { super("unsetUpdateSource"); } public unsetUpdateSource_args getEmptyArgsInstance() { return new unsetUpdateSource_args(); } protected boolean isOneway() { return false; } public unsetUpdateSource_result getResult(I iface, unsetUpdateSource_args args) throws org.apache.thrift.TException { unsetUpdateSource_result result = new unsetUpdateSource_result(); result.success = iface.unsetUpdateSource(args.peerIp); result.setSuccessIsSet(true); return result; } } public static class enableAddressFamily extends org.apache.thrift.ProcessFunction { public enableAddressFamily() { super("enableAddressFamily"); } public enableAddressFamily_args getEmptyArgsInstance() { return new enableAddressFamily_args(); } protected boolean isOneway() { return false; } public enableAddressFamily_result getResult(I iface, enableAddressFamily_args args) throws org.apache.thrift.TException { enableAddressFamily_result result = new enableAddressFamily_result(); result.success = iface.enableAddressFamily(args.peerIp, args.afi, args.safi); result.setSuccessIsSet(true); return result; } } public static class disableAddressFamily extends org.apache.thrift.ProcessFunction { public disableAddressFamily() { super("disableAddressFamily"); } public disableAddressFamily_args getEmptyArgsInstance() { return new disableAddressFamily_args(); } protected boolean isOneway() { return false; } public disableAddressFamily_result getResult(I iface, disableAddressFamily_args args) throws org.apache.thrift.TException { disableAddressFamily_result result = new disableAddressFamily_result(); result.success = iface.disableAddressFamily(args.peerIp, args.afi, args.safi); result.setSuccessIsSet(true); return result; } } public static class setLogConfig extends org.apache.thrift.ProcessFunction { public setLogConfig() { super("setLogConfig"); } public setLogConfig_args getEmptyArgsInstance() { return new setLogConfig_args(); } protected boolean isOneway() { return false; } public setLogConfig_result getResult(I iface, setLogConfig_args args) throws org.apache.thrift.TException { setLogConfig_result result = new setLogConfig_result(); result.success = iface.setLogConfig(args.logFileName, args.logLevel); result.setSuccessIsSet(true); return result; } } public static class enableGracefulRestart extends org.apache.thrift.ProcessFunction { public enableGracefulRestart() { super("enableGracefulRestart"); } public enableGracefulRestart_args getEmptyArgsInstance() { return new enableGracefulRestart_args(); } protected boolean isOneway() { return false; } public enableGracefulRestart_result getResult(I iface, enableGracefulRestart_args args) throws org.apache.thrift.TException { enableGracefulRestart_result result = new enableGracefulRestart_result(); result.success = iface.enableGracefulRestart(args.stalepathTime); result.setSuccessIsSet(true); return result; } } public static class disableGracefulRestart extends org.apache.thrift.ProcessFunction { public disableGracefulRestart() { super("disableGracefulRestart"); } public disableGracefulRestart_args getEmptyArgsInstance() { return new disableGracefulRestart_args(); } protected boolean isOneway() { return false; } public disableGracefulRestart_result getResult(I iface, disableGracefulRestart_args args) throws org.apache.thrift.TException { disableGracefulRestart_result result = new disableGracefulRestart_result(); result.success = iface.disableGracefulRestart(); result.setSuccessIsSet(true); return result; } } public static class getRoutes extends org.apache.thrift.ProcessFunction { public getRoutes() { super("getRoutes"); } public getRoutes_args getEmptyArgsInstance() { return new getRoutes_args(); } protected boolean isOneway() { return false; } public getRoutes_result getResult(I iface, getRoutes_args args) throws org.apache.thrift.TException { getRoutes_result result = new getRoutes_result(); result.success = iface.getRoutes(args.optype, args.winSize); return result; } } } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected AsyncProcessor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("startBgp", new startBgp()); processMap.put("stopBgp", new stopBgp()); processMap.put("createPeer", new createPeer()); processMap.put("deletePeer", new deletePeer()); processMap.put("addVrf", new addVrf()); processMap.put("delVrf", new delVrf()); processMap.put("pushRoute", new pushRoute()); processMap.put("withdrawRoute", new withdrawRoute()); processMap.put("setEbgpMultihop", new setEbgpMultihop()); processMap.put("unsetEbgpMultihop", new unsetEbgpMultihop()); processMap.put("setUpdateSource", new setUpdateSource()); processMap.put("unsetUpdateSource", new unsetUpdateSource()); processMap.put("enableAddressFamily", new enableAddressFamily()); processMap.put("disableAddressFamily", new disableAddressFamily()); processMap.put("setLogConfig", new setLogConfig()); processMap.put("enableGracefulRestart", new enableGracefulRestart()); processMap.put("disableGracefulRestart", new disableGracefulRestart()); processMap.put("getRoutes", new getRoutes()); return processMap; } public static class startBgp extends org.apache.thrift.AsyncProcessFunction { public startBgp() { super("startBgp"); } public startBgp_args getEmptyArgsInstance() { return new startBgp_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { startBgp_result result = new startBgp_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; startBgp_result result = new startBgp_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, startBgp_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.startBgp(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime, args.stalepathTime, args.announceFbit,resultHandler); } } public static class stopBgp extends org.apache.thrift.AsyncProcessFunction { public stopBgp() { super("stopBgp"); } public stopBgp_args getEmptyArgsInstance() { return new stopBgp_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { stopBgp_result result = new stopBgp_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; stopBgp_result result = new stopBgp_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, stopBgp_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.stopBgp(args.asNumber,resultHandler); } } public static class createPeer extends org.apache.thrift.AsyncProcessFunction { public createPeer() { super("createPeer"); } public createPeer_args getEmptyArgsInstance() { return new createPeer_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { createPeer_result result = new createPeer_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; createPeer_result result = new createPeer_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, createPeer_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.createPeer(args.ipAddress, args.asNumber,resultHandler); } } public static class deletePeer extends org.apache.thrift.AsyncProcessFunction { public deletePeer() { super("deletePeer"); } public deletePeer_args getEmptyArgsInstance() { return new deletePeer_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { deletePeer_result result = new deletePeer_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; deletePeer_result result = new deletePeer_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, deletePeer_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.deletePeer(args.ipAddress,resultHandler); } } public static class addVrf extends org.apache.thrift.AsyncProcessFunction { public addVrf() { super("addVrf"); } public addVrf_args getEmptyArgsInstance() { return new addVrf_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { addVrf_result result = new addVrf_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; addVrf_result result = new addVrf_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, addVrf_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.addVrf(args.rd, args.irts, args.erts,resultHandler); } } public static class delVrf extends org.apache.thrift.AsyncProcessFunction { public delVrf() { super("delVrf"); } public delVrf_args getEmptyArgsInstance() { return new delVrf_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { delVrf_result result = new delVrf_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; delVrf_result result = new delVrf_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, delVrf_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.delVrf(args.rd,resultHandler); } } public static class pushRoute extends org.apache.thrift.AsyncProcessFunction { public pushRoute() { super("pushRoute"); } public pushRoute_args getEmptyArgsInstance() { return new pushRoute_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { pushRoute_result result = new pushRoute_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; pushRoute_result result = new pushRoute_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, pushRoute_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.pushRoute(args.prefix, args.nexthop, args.rd, args.label,resultHandler); } } public static class withdrawRoute extends org.apache.thrift.AsyncProcessFunction { public withdrawRoute() { super("withdrawRoute"); } public withdrawRoute_args getEmptyArgsInstance() { return new withdrawRoute_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { withdrawRoute_result result = new withdrawRoute_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; withdrawRoute_result result = new withdrawRoute_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, withdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.withdrawRoute(args.prefix, args.rd,resultHandler); } } public static class setEbgpMultihop extends org.apache.thrift.AsyncProcessFunction { public setEbgpMultihop() { super("setEbgpMultihop"); } public setEbgpMultihop_args getEmptyArgsInstance() { return new setEbgpMultihop_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { setEbgpMultihop_result result = new setEbgpMultihop_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; setEbgpMultihop_result result = new setEbgpMultihop_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, setEbgpMultihop_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.setEbgpMultihop(args.peerIp, args.nHops,resultHandler); } } public static class unsetEbgpMultihop extends org.apache.thrift.AsyncProcessFunction { public unsetEbgpMultihop() { super("unsetEbgpMultihop"); } public unsetEbgpMultihop_args getEmptyArgsInstance() { return new unsetEbgpMultihop_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { unsetEbgpMultihop_result result = new unsetEbgpMultihop_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; unsetEbgpMultihop_result result = new unsetEbgpMultihop_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, unsetEbgpMultihop_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.unsetEbgpMultihop(args.peerIp,resultHandler); } } public static class setUpdateSource extends org.apache.thrift.AsyncProcessFunction { public setUpdateSource() { super("setUpdateSource"); } public setUpdateSource_args getEmptyArgsInstance() { return new setUpdateSource_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { setUpdateSource_result result = new setUpdateSource_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; setUpdateSource_result result = new setUpdateSource_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, setUpdateSource_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.setUpdateSource(args.peerIp, args.srcIp,resultHandler); } } public static class unsetUpdateSource extends org.apache.thrift.AsyncProcessFunction { public unsetUpdateSource() { super("unsetUpdateSource"); } public unsetUpdateSource_args getEmptyArgsInstance() { return new unsetUpdateSource_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { unsetUpdateSource_result result = new unsetUpdateSource_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; unsetUpdateSource_result result = new unsetUpdateSource_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, unsetUpdateSource_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.unsetUpdateSource(args.peerIp,resultHandler); } } public static class enableAddressFamily extends org.apache.thrift.AsyncProcessFunction { public enableAddressFamily() { super("enableAddressFamily"); } public enableAddressFamily_args getEmptyArgsInstance() { return new enableAddressFamily_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { enableAddressFamily_result result = new enableAddressFamily_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; enableAddressFamily_result result = new enableAddressFamily_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, enableAddressFamily_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.enableAddressFamily(args.peerIp, args.afi, args.safi,resultHandler); } } public static class disableAddressFamily extends org.apache.thrift.AsyncProcessFunction { public disableAddressFamily() { super("disableAddressFamily"); } public disableAddressFamily_args getEmptyArgsInstance() { return new disableAddressFamily_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { disableAddressFamily_result result = new disableAddressFamily_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; disableAddressFamily_result result = new disableAddressFamily_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, disableAddressFamily_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.disableAddressFamily(args.peerIp, args.afi, args.safi,resultHandler); } } public static class setLogConfig extends org.apache.thrift.AsyncProcessFunction { public setLogConfig() { super("setLogConfig"); } public setLogConfig_args getEmptyArgsInstance() { return new setLogConfig_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { setLogConfig_result result = new setLogConfig_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; setLogConfig_result result = new setLogConfig_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, setLogConfig_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.setLogConfig(args.logFileName, args.logLevel,resultHandler); } } public static class enableGracefulRestart extends org.apache.thrift.AsyncProcessFunction { public enableGracefulRestart() { super("enableGracefulRestart"); } public enableGracefulRestart_args getEmptyArgsInstance() { return new enableGracefulRestart_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { enableGracefulRestart_result result = new enableGracefulRestart_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; enableGracefulRestart_result result = new enableGracefulRestart_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, enableGracefulRestart_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.enableGracefulRestart(args.stalepathTime,resultHandler); } } public static class disableGracefulRestart extends org.apache.thrift.AsyncProcessFunction { public disableGracefulRestart() { super("disableGracefulRestart"); } public disableGracefulRestart_args getEmptyArgsInstance() { return new disableGracefulRestart_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Integer o) { disableGracefulRestart_result result = new disableGracefulRestart_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; disableGracefulRestart_result result = new disableGracefulRestart_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, disableGracefulRestart_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.disableGracefulRestart(resultHandler); } } public static class getRoutes extends org.apache.thrift.AsyncProcessFunction { public getRoutes() { super("getRoutes"); } public getRoutes_args getEmptyArgsInstance() { return new getRoutes_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Routes o) { getRoutes_result result = new getRoutes_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getRoutes_result result = new getRoutes_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, getRoutes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.getRoutes(args.optype, args.winSize,resultHandler); } } } public static class startBgp_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgp_args"); private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField ROUTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("routerId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField HOLD_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("holdTime", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField KEEP_ALIVE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("keepAliveTime", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField STALEPATH_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("stalepathTime", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField ANNOUNCE_FBIT_FIELD_DESC = new org.apache.thrift.protocol.TField("announceFbit", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new startBgp_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new startBgp_argsTupleSchemeFactory()); } public int asNumber; // required public String routerId; // required public int port; // required public int holdTime; // required public int keepAliveTime; // required public int stalepathTime; // required public boolean announceFbit; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AS_NUMBER((short)1, "asNumber"), ROUTER_ID((short)2, "routerId"), PORT((short)3, "port"), HOLD_TIME((short)4, "holdTime"), KEEP_ALIVE_TIME((short)5, "keepAliveTime"), STALEPATH_TIME((short)6, "stalepathTime"), ANNOUNCE_FBIT((short)7, "announceFbit"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AS_NUMBER return AS_NUMBER; case 2: // ROUTER_ID return ROUTER_ID; case 3: // PORT return PORT; case 4: // HOLD_TIME return HOLD_TIME; case 5: // KEEP_ALIVE_TIME return KEEP_ALIVE_TIME; case 6: // STALEPATH_TIME return STALEPATH_TIME; case 7: // ANNOUNCE_FBIT return ANNOUNCE_FBIT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ASNUMBER_ISSET_ID = 0; private static final int __PORT_ISSET_ID = 1; private static final int __HOLDTIME_ISSET_ID = 2; private static final int __KEEPALIVETIME_ISSET_ID = 3; private static final int __STALEPATHTIME_ISSET_ID = 4; private static final int __ANNOUNCEFBIT_ISSET_ID = 5; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ROUTER_ID, new org.apache.thrift.meta_data.FieldMetaData("routerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.HOLD_TIME, new org.apache.thrift.meta_data.FieldMetaData("holdTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.KEEP_ALIVE_TIME, new org.apache.thrift.meta_data.FieldMetaData("keepAliveTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.STALEPATH_TIME, new org.apache.thrift.meta_data.FieldMetaData("stalepathTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ANNOUNCE_FBIT, new org.apache.thrift.meta_data.FieldMetaData("announceFbit", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgp_args.class, metaDataMap); } public startBgp_args() { } public startBgp_args( int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) { this(); this.asNumber = asNumber; setAsNumberIsSet(true); this.routerId = routerId; this.port = port; setPortIsSet(true); this.holdTime = holdTime; setHoldTimeIsSet(true); this.keepAliveTime = keepAliveTime; setKeepAliveTimeIsSet(true); this.stalepathTime = stalepathTime; setStalepathTimeIsSet(true); this.announceFbit = announceFbit; setAnnounceFbitIsSet(true); } /** * Performs a deep copy on other. */ public startBgp_args(startBgp_args other) { __isset_bitfield = other.__isset_bitfield; this.asNumber = other.asNumber; if (other.isSetRouterId()) { this.routerId = other.routerId; } this.port = other.port; this.holdTime = other.holdTime; this.keepAliveTime = other.keepAliveTime; this.stalepathTime = other.stalepathTime; this.announceFbit = other.announceFbit; } public startBgp_args deepCopy() { return new startBgp_args(this); } @Override public void clear() { setAsNumberIsSet(false); this.asNumber = 0; this.routerId = null; setPortIsSet(false); this.port = 0; setHoldTimeIsSet(false); this.holdTime = 0; setKeepAliveTimeIsSet(false); this.keepAliveTime = 0; setStalepathTimeIsSet(false); this.stalepathTime = 0; setAnnounceFbitIsSet(false); this.announceFbit = false; } public int getAsNumber() { return this.asNumber; } public startBgp_args setAsNumber(int asNumber) { this.asNumber = asNumber; setAsNumberIsSet(true); return this; } public void unsetAsNumber() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID); } /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */ public boolean isSetAsNumber() { return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID); } public void setAsNumberIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value); } public String getRouterId() { return this.routerId; } public startBgp_args setRouterId(String routerId) { this.routerId = routerId; return this; } public void unsetRouterId() { this.routerId = null; } /** Returns true if field routerId is set (has been assigned a value) and false otherwise */ public boolean isSetRouterId() { return this.routerId != null; } public void setRouterIdIsSet(boolean value) { if (!value) { this.routerId = null; } } public int getPort() { return this.port; } public startBgp_args setPort(int port) { this.port = port; setPortIsSet(true); return this; } public void unsetPort() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); } /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean isSetPort() { return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); } public void setPortIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); } public int getHoldTime() { return this.holdTime; } public startBgp_args setHoldTime(int holdTime) { this.holdTime = holdTime; setHoldTimeIsSet(true); return this; } public void unsetHoldTime() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID); } /** Returns true if field holdTime is set (has been assigned a value) and false otherwise */ public boolean isSetHoldTime() { return EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID); } public void setHoldTimeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value); } public int getKeepAliveTime() { return this.keepAliveTime; } public startBgp_args setKeepAliveTime(int keepAliveTime) { this.keepAliveTime = keepAliveTime; setKeepAliveTimeIsSet(true); return this; } public void unsetKeepAliveTime() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID); } /** Returns true if field keepAliveTime is set (has been assigned a value) and false otherwise */ public boolean isSetKeepAliveTime() { return EncodingUtils.testBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID); } public void setKeepAliveTimeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID, value); } public int getStalepathTime() { return this.stalepathTime; } public startBgp_args setStalepathTime(int stalepathTime) { this.stalepathTime = stalepathTime; setStalepathTimeIsSet(true); return this; } public void unsetStalepathTime() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID); } /** Returns true if field stalepathTime is set (has been assigned a value) and false otherwise */ public boolean isSetStalepathTime() { return EncodingUtils.testBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID); } public void setStalepathTimeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID, value); } public boolean isAnnounceFbit() { return this.announceFbit; } public startBgp_args setAnnounceFbit(boolean announceFbit) { this.announceFbit = announceFbit; setAnnounceFbitIsSet(true); return this; } public void unsetAnnounceFbit() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID); } /** Returns true if field announceFbit is set (has been assigned a value) and false otherwise */ public boolean isSetAnnounceFbit() { return EncodingUtils.testBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID); } public void setAnnounceFbitIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case AS_NUMBER: if (value == null) { unsetAsNumber(); } else { setAsNumber((Integer)value); } break; case ROUTER_ID: if (value == null) { unsetRouterId(); } else { setRouterId((String)value); } break; case PORT: if (value == null) { unsetPort(); } else { setPort((Integer)value); } break; case HOLD_TIME: if (value == null) { unsetHoldTime(); } else { setHoldTime((Integer)value); } break; case KEEP_ALIVE_TIME: if (value == null) { unsetKeepAliveTime(); } else { setKeepAliveTime((Integer)value); } break; case STALEPATH_TIME: if (value == null) { unsetStalepathTime(); } else { setStalepathTime((Integer)value); } break; case ANNOUNCE_FBIT: if (value == null) { unsetAnnounceFbit(); } else { setAnnounceFbit((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case AS_NUMBER: return Integer.valueOf(getAsNumber()); case ROUTER_ID: return getRouterId(); case PORT: return Integer.valueOf(getPort()); case HOLD_TIME: return Integer.valueOf(getHoldTime()); case KEEP_ALIVE_TIME: return Integer.valueOf(getKeepAliveTime()); case STALEPATH_TIME: return Integer.valueOf(getStalepathTime()); case ANNOUNCE_FBIT: return Boolean.valueOf(isAnnounceFbit()); } 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 AS_NUMBER: return isSetAsNumber(); case ROUTER_ID: return isSetRouterId(); case PORT: return isSetPort(); case HOLD_TIME: return isSetHoldTime(); case KEEP_ALIVE_TIME: return isSetKeepAliveTime(); case STALEPATH_TIME: return isSetStalepathTime(); case ANNOUNCE_FBIT: return isSetAnnounceFbit(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof startBgp_args) return this.equals((startBgp_args)that); return false; } public boolean equals(startBgp_args that) { if (that == null) return false; boolean this_present_asNumber = true; boolean that_present_asNumber = true; if (this_present_asNumber || that_present_asNumber) { if (!(this_present_asNumber && that_present_asNumber)) return false; if (this.asNumber != that.asNumber) return false; } boolean this_present_routerId = true && this.isSetRouterId(); boolean that_present_routerId = true && that.isSetRouterId(); if (this_present_routerId || that_present_routerId) { if (!(this_present_routerId && that_present_routerId)) return false; if (!this.routerId.equals(that.routerId)) return false; } boolean this_present_port = true; boolean that_present_port = true; if (this_present_port || that_present_port) { if (!(this_present_port && that_present_port)) return false; if (this.port != that.port) return false; } boolean this_present_holdTime = true; boolean that_present_holdTime = true; if (this_present_holdTime || that_present_holdTime) { if (!(this_present_holdTime && that_present_holdTime)) return false; if (this.holdTime != that.holdTime) return false; } boolean this_present_keepAliveTime = true; boolean that_present_keepAliveTime = true; if (this_present_keepAliveTime || that_present_keepAliveTime) { if (!(this_present_keepAliveTime && that_present_keepAliveTime)) return false; if (this.keepAliveTime != that.keepAliveTime) return false; } boolean this_present_stalepathTime = true; boolean that_present_stalepathTime = true; if (this_present_stalepathTime || that_present_stalepathTime) { if (!(this_present_stalepathTime && that_present_stalepathTime)) return false; if (this.stalepathTime != that.stalepathTime) return false; } boolean this_present_announceFbit = true; boolean that_present_announceFbit = true; if (this_present_announceFbit || that_present_announceFbit) { if (!(this_present_announceFbit && that_present_announceFbit)) return false; if (this.announceFbit != that.announceFbit) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(startBgp_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetAsNumber()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRouterId()).compareTo(other.isSetRouterId()); if (lastComparison != 0) { return lastComparison; } if (isSetRouterId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routerId, other.routerId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); if (lastComparison != 0) { return lastComparison; } if (isSetPort()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime()); if (lastComparison != 0) { return lastComparison; } if (isSetHoldTime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdTime, other.holdTime); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKeepAliveTime()).compareTo(other.isSetKeepAliveTime()); if (lastComparison != 0) { return lastComparison; } if (isSetKeepAliveTime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepAliveTime, other.keepAliveTime); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStalepathTime()).compareTo(other.isSetStalepathTime()); if (lastComparison != 0) { return lastComparison; } if (isSetStalepathTime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stalepathTime, other.stalepathTime); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAnnounceFbit()).compareTo(other.isSetAnnounceFbit()); if (lastComparison != 0) { return lastComparison; } if (isSetAnnounceFbit()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.announceFbit, other.announceFbit); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("startBgp_args("); boolean first = true; sb.append("asNumber:"); sb.append(this.asNumber); first = false; if (!first) sb.append(", "); sb.append("routerId:"); if (this.routerId == null) { sb.append("null"); } else { sb.append(this.routerId); } first = false; if (!first) sb.append(", "); sb.append("port:"); sb.append(this.port); first = false; if (!first) sb.append(", "); sb.append("holdTime:"); sb.append(this.holdTime); first = false; if (!first) sb.append(", "); sb.append("keepAliveTime:"); sb.append(this.keepAliveTime); first = false; if (!first) sb.append(", "); sb.append("stalepathTime:"); sb.append(this.stalepathTime); first = false; if (!first) sb.append(", "); sb.append("announceFbit:"); sb.append(this.announceFbit); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class startBgp_argsStandardSchemeFactory implements SchemeFactory { public startBgp_argsStandardScheme getScheme() { return new startBgp_argsStandardScheme(); } } private static class startBgp_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, startBgp_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AS_NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.asNumber = iprot.readI32(); struct.setAsNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ROUTER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.routerId = iprot.readString(); struct.setRouterIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PORT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // HOLD_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.holdTime = iprot.readI32(); struct.setHoldTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // KEEP_ALIVE_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.keepAliveTime = iprot.readI32(); struct.setKeepAliveTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // STALEPATH_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.stalepathTime = iprot.readI32(); struct.setStalepathTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // ANNOUNCE_FBIT if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.announceFbit = iprot.readBool(); struct.setAnnounceFbitIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, startBgp_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC); oprot.writeI32(struct.asNumber); oprot.writeFieldEnd(); if (struct.routerId != null) { oprot.writeFieldBegin(ROUTER_ID_FIELD_DESC); oprot.writeString(struct.routerId); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(struct.port); oprot.writeFieldEnd(); oprot.writeFieldBegin(HOLD_TIME_FIELD_DESC); oprot.writeI32(struct.holdTime); oprot.writeFieldEnd(); oprot.writeFieldBegin(KEEP_ALIVE_TIME_FIELD_DESC); oprot.writeI32(struct.keepAliveTime); oprot.writeFieldEnd(); oprot.writeFieldBegin(STALEPATH_TIME_FIELD_DESC); oprot.writeI32(struct.stalepathTime); oprot.writeFieldEnd(); oprot.writeFieldBegin(ANNOUNCE_FBIT_FIELD_DESC); oprot.writeBool(struct.announceFbit); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class startBgp_argsTupleSchemeFactory implements SchemeFactory { public startBgp_argsTupleScheme getScheme() { return new startBgp_argsTupleScheme(); } } private static class startBgp_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, startBgp_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetAsNumber()) { optionals.set(0); } if (struct.isSetRouterId()) { optionals.set(1); } if (struct.isSetPort()) { optionals.set(2); } if (struct.isSetHoldTime()) { optionals.set(3); } if (struct.isSetKeepAliveTime()) { optionals.set(4); } if (struct.isSetStalepathTime()) { optionals.set(5); } if (struct.isSetAnnounceFbit()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetAsNumber()) { oprot.writeI32(struct.asNumber); } if (struct.isSetRouterId()) { oprot.writeString(struct.routerId); } if (struct.isSetPort()) { oprot.writeI32(struct.port); } if (struct.isSetHoldTime()) { oprot.writeI32(struct.holdTime); } if (struct.isSetKeepAliveTime()) { oprot.writeI32(struct.keepAliveTime); } if (struct.isSetStalepathTime()) { oprot.writeI32(struct.stalepathTime); } if (struct.isSetAnnounceFbit()) { oprot.writeBool(struct.announceFbit); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, startBgp_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.asNumber = iprot.readI32(); struct.setAsNumberIsSet(true); } if (incoming.get(1)) { struct.routerId = iprot.readString(); struct.setRouterIdIsSet(true); } if (incoming.get(2)) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } if (incoming.get(3)) { struct.holdTime = iprot.readI32(); struct.setHoldTimeIsSet(true); } if (incoming.get(4)) { struct.keepAliveTime = iprot.readI32(); struct.setKeepAliveTimeIsSet(true); } if (incoming.get(5)) { struct.stalepathTime = iprot.readI32(); struct.setStalepathTimeIsSet(true); } if (incoming.get(6)) { struct.announceFbit = iprot.readBool(); struct.setAnnounceFbitIsSet(true); } } } } public static class startBgp_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgp_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new startBgp_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new startBgp_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgp_result.class, metaDataMap); } public startBgp_result() { } public startBgp_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public startBgp_result(startBgp_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public startBgp_result deepCopy() { return new startBgp_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public startBgp_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof startBgp_result) return this.equals((startBgp_result)that); return false; } public boolean equals(startBgp_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(startBgp_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("startBgp_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class startBgp_resultStandardSchemeFactory implements SchemeFactory { public startBgp_resultStandardScheme getScheme() { return new startBgp_resultStandardScheme(); } } private static class startBgp_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, startBgp_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, startBgp_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class startBgp_resultTupleSchemeFactory implements SchemeFactory { public startBgp_resultTupleScheme getScheme() { return new startBgp_resultTupleScheme(); } } private static class startBgp_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, startBgp_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, startBgp_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class stopBgp_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgp_args"); private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new stopBgp_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new stopBgp_argsTupleSchemeFactory()); } public int asNumber; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AS_NUMBER((short)1, "asNumber"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AS_NUMBER return AS_NUMBER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ASNUMBER_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgp_args.class, metaDataMap); } public stopBgp_args() { } public stopBgp_args( int asNumber) { this(); this.asNumber = asNumber; setAsNumberIsSet(true); } /** * Performs a deep copy on other. */ public stopBgp_args(stopBgp_args other) { __isset_bitfield = other.__isset_bitfield; this.asNumber = other.asNumber; } public stopBgp_args deepCopy() { return new stopBgp_args(this); } @Override public void clear() { setAsNumberIsSet(false); this.asNumber = 0; } public int getAsNumber() { return this.asNumber; } public stopBgp_args setAsNumber(int asNumber) { this.asNumber = asNumber; setAsNumberIsSet(true); return this; } public void unsetAsNumber() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID); } /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */ public boolean isSetAsNumber() { return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID); } public void setAsNumberIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case AS_NUMBER: if (value == null) { unsetAsNumber(); } else { setAsNumber((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case AS_NUMBER: return Integer.valueOf(getAsNumber()); } 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 AS_NUMBER: return isSetAsNumber(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof stopBgp_args) return this.equals((stopBgp_args)that); return false; } public boolean equals(stopBgp_args that) { if (that == null) return false; boolean this_present_asNumber = true; boolean that_present_asNumber = true; if (this_present_asNumber || that_present_asNumber) { if (!(this_present_asNumber && that_present_asNumber)) return false; if (this.asNumber != that.asNumber) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(stopBgp_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetAsNumber()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("stopBgp_args("); boolean first = true; sb.append("asNumber:"); sb.append(this.asNumber); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class stopBgp_argsStandardSchemeFactory implements SchemeFactory { public stopBgp_argsStandardScheme getScheme() { return new stopBgp_argsStandardScheme(); } } private static class stopBgp_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgp_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AS_NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.asNumber = iprot.readI32(); struct.setAsNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgp_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC); oprot.writeI32(struct.asNumber); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class stopBgp_argsTupleSchemeFactory implements SchemeFactory { public stopBgp_argsTupleScheme getScheme() { return new stopBgp_argsTupleScheme(); } } private static class stopBgp_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, stopBgp_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetAsNumber()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetAsNumber()) { oprot.writeI32(struct.asNumber); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, stopBgp_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.asNumber = iprot.readI32(); struct.setAsNumberIsSet(true); } } } } public static class stopBgp_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgp_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new stopBgp_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new stopBgp_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgp_result.class, metaDataMap); } public stopBgp_result() { } public stopBgp_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public stopBgp_result(stopBgp_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public stopBgp_result deepCopy() { return new stopBgp_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public stopBgp_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof stopBgp_result) return this.equals((stopBgp_result)that); return false; } public boolean equals(stopBgp_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(stopBgp_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("stopBgp_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class stopBgp_resultStandardSchemeFactory implements SchemeFactory { public stopBgp_resultStandardScheme getScheme() { return new stopBgp_resultStandardScheme(); } } private static class stopBgp_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgp_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgp_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class stopBgp_resultTupleSchemeFactory implements SchemeFactory { public stopBgp_resultTupleScheme getScheme() { return new stopBgp_resultTupleScheme(); } } private static class stopBgp_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, stopBgp_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, stopBgp_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class createPeer_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_args"); private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory()); } public String ipAddress; // required public int asNumber; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IP_ADDRESS((short)1, "ipAddress"), AS_NUMBER((short)2, "asNumber"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IP_ADDRESS return IP_ADDRESS; case 2: // AS_NUMBER return AS_NUMBER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ASNUMBER_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_args.class, metaDataMap); } public createPeer_args() { } public createPeer_args( String ipAddress, int asNumber) { this(); this.ipAddress = ipAddress; this.asNumber = asNumber; setAsNumberIsSet(true); } /** * Performs a deep copy on other. */ public createPeer_args(createPeer_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetIpAddress()) { this.ipAddress = other.ipAddress; } this.asNumber = other.asNumber; } public createPeer_args deepCopy() { return new createPeer_args(this); } @Override public void clear() { this.ipAddress = null; setAsNumberIsSet(false); this.asNumber = 0; } public String getIpAddress() { return this.ipAddress; } public createPeer_args setIpAddress(String ipAddress) { this.ipAddress = ipAddress; return this; } public void unsetIpAddress() { this.ipAddress = null; } /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */ public boolean isSetIpAddress() { return this.ipAddress != null; } public void setIpAddressIsSet(boolean value) { if (!value) { this.ipAddress = null; } } public int getAsNumber() { return this.asNumber; } public createPeer_args setAsNumber(int asNumber) { this.asNumber = asNumber; setAsNumberIsSet(true); return this; } public void unsetAsNumber() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID); } /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */ public boolean isSetAsNumber() { return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID); } public void setAsNumberIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case IP_ADDRESS: if (value == null) { unsetIpAddress(); } else { setIpAddress((String)value); } break; case AS_NUMBER: if (value == null) { unsetAsNumber(); } else { setAsNumber((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IP_ADDRESS: return getIpAddress(); case AS_NUMBER: return Integer.valueOf(getAsNumber()); } 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 IP_ADDRESS: return isSetIpAddress(); case AS_NUMBER: return isSetAsNumber(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof createPeer_args) return this.equals((createPeer_args)that); return false; } public boolean equals(createPeer_args that) { if (that == null) return false; boolean this_present_ipAddress = true && this.isSetIpAddress(); boolean that_present_ipAddress = true && that.isSetIpAddress(); if (this_present_ipAddress || that_present_ipAddress) { if (!(this_present_ipAddress && that_present_ipAddress)) return false; if (!this.ipAddress.equals(that.ipAddress)) return false; } boolean this_present_asNumber = true; boolean that_present_asNumber = true; if (this_present_asNumber || that_present_asNumber) { if (!(this_present_asNumber && that_present_asNumber)) return false; if (this.asNumber != that.asNumber) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(createPeer_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetIpAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetAsNumber()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("createPeer_args("); boolean first = true; sb.append("ipAddress:"); if (this.ipAddress == null) { sb.append("null"); } else { sb.append(this.ipAddress); } first = false; if (!first) sb.append(", "); sb.append("asNumber:"); sb.append(this.asNumber); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class createPeer_argsStandardSchemeFactory implements SchemeFactory { public createPeer_argsStandardScheme getScheme() { return new createPeer_argsStandardScheme(); } } private static class createPeer_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IP_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ipAddress = iprot.readString(); struct.setIpAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // AS_NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.asNumber = iprot.readI32(); struct.setAsNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ipAddress != null) { oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC); oprot.writeString(struct.ipAddress); oprot.writeFieldEnd(); } oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC); oprot.writeI32(struct.asNumber); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createPeer_argsTupleSchemeFactory implements SchemeFactory { public createPeer_argsTupleScheme getScheme() { return new createPeer_argsTupleScheme(); } } private static class createPeer_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetIpAddress()) { optionals.set(0); } if (struct.isSetAsNumber()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetIpAddress()) { oprot.writeString(struct.ipAddress); } if (struct.isSetAsNumber()) { oprot.writeI32(struct.asNumber); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.ipAddress = iprot.readString(); struct.setIpAddressIsSet(true); } if (incoming.get(1)) { struct.asNumber = iprot.readI32(); struct.setAsNumberIsSet(true); } } } } public static class createPeer_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_result.class, metaDataMap); } public createPeer_result() { } public createPeer_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public createPeer_result(createPeer_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public createPeer_result deepCopy() { return new createPeer_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public createPeer_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof createPeer_result) return this.equals((createPeer_result)that); return false; } public boolean equals(createPeer_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(createPeer_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("createPeer_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class createPeer_resultStandardSchemeFactory implements SchemeFactory { public createPeer_resultStandardScheme getScheme() { return new createPeer_resultStandardScheme(); } } private static class createPeer_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createPeer_resultTupleSchemeFactory implements SchemeFactory { public createPeer_resultTupleScheme getScheme() { return new createPeer_resultTupleScheme(); } } private static class createPeer_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class deletePeer_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_args"); private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory()); } public String ipAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IP_ADDRESS((short)1, "ipAddress"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IP_ADDRESS return IP_ADDRESS; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_args.class, metaDataMap); } public deletePeer_args() { } public deletePeer_args( String ipAddress) { this(); this.ipAddress = ipAddress; } /** * Performs a deep copy on other. */ public deletePeer_args(deletePeer_args other) { if (other.isSetIpAddress()) { this.ipAddress = other.ipAddress; } } public deletePeer_args deepCopy() { return new deletePeer_args(this); } @Override public void clear() { this.ipAddress = null; } public String getIpAddress() { return this.ipAddress; } public deletePeer_args setIpAddress(String ipAddress) { this.ipAddress = ipAddress; return this; } public void unsetIpAddress() { this.ipAddress = null; } /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */ public boolean isSetIpAddress() { return this.ipAddress != null; } public void setIpAddressIsSet(boolean value) { if (!value) { this.ipAddress = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case IP_ADDRESS: if (value == null) { unsetIpAddress(); } else { setIpAddress((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IP_ADDRESS: return getIpAddress(); } 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 IP_ADDRESS: return isSetIpAddress(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deletePeer_args) return this.equals((deletePeer_args)that); return false; } public boolean equals(deletePeer_args that) { if (that == null) return false; boolean this_present_ipAddress = true && this.isSetIpAddress(); boolean that_present_ipAddress = true && that.isSetIpAddress(); if (this_present_ipAddress || that_present_ipAddress) { if (!(this_present_ipAddress && that_present_ipAddress)) return false; if (!this.ipAddress.equals(that.ipAddress)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(deletePeer_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetIpAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deletePeer_args("); boolean first = true; sb.append("ipAddress:"); if (this.ipAddress == null) { sb.append("null"); } else { sb.append(this.ipAddress); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deletePeer_argsStandardSchemeFactory implements SchemeFactory { public deletePeer_argsStandardScheme getScheme() { return new deletePeer_argsStandardScheme(); } } private static class deletePeer_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IP_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ipAddress = iprot.readString(); struct.setIpAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ipAddress != null) { oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC); oprot.writeString(struct.ipAddress); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deletePeer_argsTupleSchemeFactory implements SchemeFactory { public deletePeer_argsTupleScheme getScheme() { return new deletePeer_argsTupleScheme(); } } private static class deletePeer_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetIpAddress()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetIpAddress()) { oprot.writeString(struct.ipAddress); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ipAddress = iprot.readString(); struct.setIpAddressIsSet(true); } } } } public static class deletePeer_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_result.class, metaDataMap); } public deletePeer_result() { } public deletePeer_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public deletePeer_result(deletePeer_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public deletePeer_result deepCopy() { return new deletePeer_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public deletePeer_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deletePeer_result) return this.equals((deletePeer_result)that); return false; } public boolean equals(deletePeer_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(deletePeer_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deletePeer_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deletePeer_resultStandardSchemeFactory implements SchemeFactory { public deletePeer_resultStandardScheme getScheme() { return new deletePeer_resultStandardScheme(); } } private static class deletePeer_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deletePeer_resultTupleSchemeFactory implements SchemeFactory { public deletePeer_resultTupleScheme getScheme() { return new deletePeer_resultTupleScheme(); } } private static class deletePeer_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class addVrf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_args"); private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IRTS_FIELD_DESC = new org.apache.thrift.protocol.TField("irts", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField ERTS_FIELD_DESC = new org.apache.thrift.protocol.TField("erts", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory()); } public String rd; // required public List irts; // required public List erts; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { RD((short)1, "rd"), IRTS((short)2, "irts"), ERTS((short)3, "erts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // RD return RD; case 2: // IRTS return IRTS; case 3: // ERTS return ERTS; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IRTS, new org.apache.thrift.meta_data.FieldMetaData("irts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.ERTS, new org.apache.thrift.meta_data.FieldMetaData("erts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_args.class, metaDataMap); } public addVrf_args() { } public addVrf_args( String rd, List irts, List erts) { this(); this.rd = rd; this.irts = irts; this.erts = erts; } /** * Performs a deep copy on other. */ public addVrf_args(addVrf_args other) { if (other.isSetRd()) { this.rd = other.rd; } if (other.isSetIrts()) { List __this__irts = new ArrayList(other.irts); this.irts = __this__irts; } if (other.isSetErts()) { List __this__erts = new ArrayList(other.erts); this.erts = __this__erts; } } public addVrf_args deepCopy() { return new addVrf_args(this); } @Override public void clear() { this.rd = null; this.irts = null; this.erts = null; } public String getRd() { return this.rd; } public addVrf_args setRd(String rd) { this.rd = rd; return this; } public void unsetRd() { this.rd = null; } /** Returns true if field rd is set (has been assigned a value) and false otherwise */ public boolean isSetRd() { return this.rd != null; } public void setRdIsSet(boolean value) { if (!value) { this.rd = null; } } public int getIrtsSize() { return (this.irts == null) ? 0 : this.irts.size(); } public java.util.Iterator getIrtsIterator() { return (this.irts == null) ? null : this.irts.iterator(); } public void addToIrts(String elem) { if (this.irts == null) { this.irts = new ArrayList(); } this.irts.add(elem); } public List getIrts() { return this.irts; } public addVrf_args setIrts(List irts) { this.irts = irts; return this; } public void unsetIrts() { this.irts = null; } /** Returns true if field irts is set (has been assigned a value) and false otherwise */ public boolean isSetIrts() { return this.irts != null; } public void setIrtsIsSet(boolean value) { if (!value) { this.irts = null; } } public int getErtsSize() { return (this.erts == null) ? 0 : this.erts.size(); } public java.util.Iterator getErtsIterator() { return (this.erts == null) ? null : this.erts.iterator(); } public void addToErts(String elem) { if (this.erts == null) { this.erts = new ArrayList(); } this.erts.add(elem); } public List getErts() { return this.erts; } public addVrf_args setErts(List erts) { this.erts = erts; return this; } public void unsetErts() { this.erts = null; } /** Returns true if field erts is set (has been assigned a value) and false otherwise */ public boolean isSetErts() { return this.erts != null; } public void setErtsIsSet(boolean value) { if (!value) { this.erts = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RD: if (value == null) { unsetRd(); } else { setRd((String)value); } break; case IRTS: if (value == null) { unsetIrts(); } else { setIrts((List)value); } break; case ERTS: if (value == null) { unsetErts(); } else { setErts((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RD: return getRd(); case IRTS: return getIrts(); case ERTS: return getErts(); } 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 RD: return isSetRd(); case IRTS: return isSetIrts(); case ERTS: return isSetErts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addVrf_args) return this.equals((addVrf_args)that); return false; } public boolean equals(addVrf_args that) { if (that == null) return false; boolean this_present_rd = true && this.isSetRd(); boolean that_present_rd = true && that.isSetRd(); if (this_present_rd || that_present_rd) { if (!(this_present_rd && that_present_rd)) return false; if (!this.rd.equals(that.rd)) return false; } boolean this_present_irts = true && this.isSetIrts(); boolean that_present_irts = true && that.isSetIrts(); if (this_present_irts || that_present_irts) { if (!(this_present_irts && that_present_irts)) return false; if (!this.irts.equals(that.irts)) return false; } boolean this_present_erts = true && this.isSetErts(); boolean that_present_erts = true && that.isSetErts(); if (this_present_erts || that_present_erts) { if (!(this_present_erts && that_present_erts)) return false; if (!this.erts.equals(that.erts)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(addVrf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd()); if (lastComparison != 0) { return lastComparison; } if (isSetRd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIrts()).compareTo(other.isSetIrts()); if (lastComparison != 0) { return lastComparison; } if (isSetIrts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.irts, other.irts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetErts()).compareTo(other.isSetErts()); if (lastComparison != 0) { return lastComparison; } if (isSetErts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.erts, other.erts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("addVrf_args("); boolean first = true; sb.append("rd:"); if (this.rd == null) { sb.append("null"); } else { sb.append(this.rd); } first = false; if (!first) sb.append(", "); sb.append("irts:"); if (this.irts == null) { sb.append("null"); } else { sb.append(this.irts); } first = false; if (!first) sb.append(", "); sb.append("erts:"); if (this.erts == null) { sb.append("null"); } else { sb.append(this.erts); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class addVrf_argsStandardSchemeFactory implements SchemeFactory { public addVrf_argsStandardScheme getScheme() { return new addVrf_argsStandardScheme(); } } private static class addVrf_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IRTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.irts = new ArrayList(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { String _elem10; _elem10 = iprot.readString(); struct.irts.add(_elem10); } iprot.readListEnd(); } struct.setIrtsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ERTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); struct.erts = new ArrayList(_list11.size); for (int _i12 = 0; _i12 < _list11.size; ++_i12) { String _elem13; _elem13 = iprot.readString(); struct.erts.add(_elem13); } iprot.readListEnd(); } struct.setErtsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rd != null) { oprot.writeFieldBegin(RD_FIELD_DESC); oprot.writeString(struct.rd); oprot.writeFieldEnd(); } if (struct.irts != null) { oprot.writeFieldBegin(IRTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.irts.size())); for (String _iter14 : struct.irts) { oprot.writeString(_iter14); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.erts != null) { oprot.writeFieldBegin(ERTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.erts.size())); for (String _iter15 : struct.erts) { oprot.writeString(_iter15); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addVrf_argsTupleSchemeFactory implements SchemeFactory { public addVrf_argsTupleScheme getScheme() { return new addVrf_argsTupleScheme(); } } private static class addVrf_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRd()) { optionals.set(0); } if (struct.isSetIrts()) { optionals.set(1); } if (struct.isSetErts()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetRd()) { oprot.writeString(struct.rd); } if (struct.isSetIrts()) { { oprot.writeI32(struct.irts.size()); for (String _iter16 : struct.irts) { oprot.writeString(_iter16); } } } if (struct.isSetErts()) { { oprot.writeI32(struct.erts.size()); for (String _iter17 : struct.erts) { oprot.writeString(_iter17); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.irts = new ArrayList(_list18.size); for (int _i19 = 0; _i19 < _list18.size; ++_i19) { String _elem20; _elem20 = iprot.readString(); struct.irts.add(_elem20); } } struct.setIrtsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.erts = new ArrayList(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { String _elem23; _elem23 = iprot.readString(); struct.erts.add(_elem23); } } struct.setErtsIsSet(true); } } } } public static class addVrf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_result.class, metaDataMap); } public addVrf_result() { } public addVrf_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public addVrf_result(addVrf_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public addVrf_result deepCopy() { return new addVrf_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public addVrf_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addVrf_result) return this.equals((addVrf_result)that); return false; } public boolean equals(addVrf_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(addVrf_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("addVrf_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class addVrf_resultStandardSchemeFactory implements SchemeFactory { public addVrf_resultStandardScheme getScheme() { return new addVrf_resultStandardScheme(); } } private static class addVrf_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addVrf_resultTupleSchemeFactory implements SchemeFactory { public addVrf_resultTupleScheme getScheme() { return new addVrf_resultTupleScheme(); } } private static class addVrf_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class delVrf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_args"); private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory()); } public String rd; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { RD((short)1, "rd"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // RD return RD; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_args.class, metaDataMap); } public delVrf_args() { } public delVrf_args( String rd) { this(); this.rd = rd; } /** * Performs a deep copy on other. */ public delVrf_args(delVrf_args other) { if (other.isSetRd()) { this.rd = other.rd; } } public delVrf_args deepCopy() { return new delVrf_args(this); } @Override public void clear() { this.rd = null; } public String getRd() { return this.rd; } public delVrf_args setRd(String rd) { this.rd = rd; return this; } public void unsetRd() { this.rd = null; } /** Returns true if field rd is set (has been assigned a value) and false otherwise */ public boolean isSetRd() { return this.rd != null; } public void setRdIsSet(boolean value) { if (!value) { this.rd = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RD: if (value == null) { unsetRd(); } else { setRd((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RD: return getRd(); } 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 RD: return isSetRd(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delVrf_args) return this.equals((delVrf_args)that); return false; } public boolean equals(delVrf_args that) { if (that == null) return false; boolean this_present_rd = true && this.isSetRd(); boolean that_present_rd = true && that.isSetRd(); if (this_present_rd || that_present_rd) { if (!(this_present_rd && that_present_rd)) return false; if (!this.rd.equals(that.rd)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(delVrf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd()); if (lastComparison != 0) { return lastComparison; } if (isSetRd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delVrf_args("); boolean first = true; sb.append("rd:"); if (this.rd == null) { sb.append("null"); } else { sb.append(this.rd); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delVrf_argsStandardSchemeFactory implements SchemeFactory { public delVrf_argsStandardScheme getScheme() { return new delVrf_argsStandardScheme(); } } private static class delVrf_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rd != null) { oprot.writeFieldBegin(RD_FIELD_DESC); oprot.writeString(struct.rd); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delVrf_argsTupleSchemeFactory implements SchemeFactory { public delVrf_argsTupleScheme getScheme() { return new delVrf_argsTupleScheme(); } } private static class delVrf_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRd()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRd()) { oprot.writeString(struct.rd); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } } } } public static class delVrf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_result.class, metaDataMap); } public delVrf_result() { } public delVrf_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public delVrf_result(delVrf_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public delVrf_result deepCopy() { return new delVrf_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public delVrf_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delVrf_result) return this.equals((delVrf_result)that); return false; } public boolean equals(delVrf_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(delVrf_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delVrf_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delVrf_resultStandardSchemeFactory implements SchemeFactory { public delVrf_resultStandardScheme getScheme() { return new delVrf_resultStandardScheme(); } } private static class delVrf_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delVrf_resultTupleSchemeFactory implements SchemeFactory { public delVrf_resultTupleScheme getScheme() { return new delVrf_resultTupleScheme(); } } private static class delVrf_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class pushRoute_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_args"); private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory()); } public String prefix; // required public String nexthop; // required public String rd; // required public int label; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PREFIX((short)1, "prefix"), NEXTHOP((short)2, "nexthop"), RD((short)3, "rd"), LABEL((short)4, "label"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PREFIX return PREFIX; case 2: // NEXTHOP return NEXTHOP; case 3: // RD return RD; case 4: // LABEL return LABEL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __LABEL_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_args.class, metaDataMap); } public pushRoute_args() { } public pushRoute_args( String prefix, String nexthop, String rd, int label) { this(); this.prefix = prefix; this.nexthop = nexthop; this.rd = rd; this.label = label; setLabelIsSet(true); } /** * Performs a deep copy on other. */ public pushRoute_args(pushRoute_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPrefix()) { this.prefix = other.prefix; } if (other.isSetNexthop()) { this.nexthop = other.nexthop; } if (other.isSetRd()) { this.rd = other.rd; } this.label = other.label; } public pushRoute_args deepCopy() { return new pushRoute_args(this); } @Override public void clear() { this.prefix = null; this.nexthop = null; this.rd = null; setLabelIsSet(false); this.label = 0; } public String getPrefix() { return this.prefix; } public pushRoute_args setPrefix(String prefix) { this.prefix = prefix; return this; } public void unsetPrefix() { this.prefix = null; } /** Returns true if field prefix is set (has been assigned a value) and false otherwise */ public boolean isSetPrefix() { return this.prefix != null; } public void setPrefixIsSet(boolean value) { if (!value) { this.prefix = null; } } public String getNexthop() { return this.nexthop; } public pushRoute_args setNexthop(String nexthop) { this.nexthop = nexthop; return this; } public void unsetNexthop() { this.nexthop = null; } /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */ public boolean isSetNexthop() { return this.nexthop != null; } public void setNexthopIsSet(boolean value) { if (!value) { this.nexthop = null; } } public String getRd() { return this.rd; } public pushRoute_args setRd(String rd) { this.rd = rd; return this; } public void unsetRd() { this.rd = null; } /** Returns true if field rd is set (has been assigned a value) and false otherwise */ public boolean isSetRd() { return this.rd != null; } public void setRdIsSet(boolean value) { if (!value) { this.rd = null; } } public int getLabel() { return this.label; } public pushRoute_args setLabel(int label) { this.label = label; setLabelIsSet(true); return this; } public void unsetLabel() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID); } /** Returns true if field label is set (has been assigned a value) and false otherwise */ public boolean isSetLabel() { return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID); } public void setLabelIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case PREFIX: if (value == null) { unsetPrefix(); } else { setPrefix((String)value); } break; case NEXTHOP: if (value == null) { unsetNexthop(); } else { setNexthop((String)value); } break; case RD: if (value == null) { unsetRd(); } else { setRd((String)value); } break; case LABEL: if (value == null) { unsetLabel(); } else { setLabel((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PREFIX: return getPrefix(); case NEXTHOP: return getNexthop(); case RD: return getRd(); case LABEL: return Integer.valueOf(getLabel()); } 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 PREFIX: return isSetPrefix(); case NEXTHOP: return isSetNexthop(); case RD: return isSetRd(); case LABEL: return isSetLabel(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof pushRoute_args) return this.equals((pushRoute_args)that); return false; } public boolean equals(pushRoute_args that) { if (that == null) return false; boolean this_present_prefix = true && this.isSetPrefix(); boolean that_present_prefix = true && that.isSetPrefix(); if (this_present_prefix || that_present_prefix) { if (!(this_present_prefix && that_present_prefix)) return false; if (!this.prefix.equals(that.prefix)) return false; } boolean this_present_nexthop = true && this.isSetNexthop(); boolean that_present_nexthop = true && that.isSetNexthop(); if (this_present_nexthop || that_present_nexthop) { if (!(this_present_nexthop && that_present_nexthop)) return false; if (!this.nexthop.equals(that.nexthop)) return false; } boolean this_present_rd = true && this.isSetRd(); boolean that_present_rd = true && that.isSetRd(); if (this_present_rd || that_present_rd) { if (!(this_present_rd && that_present_rd)) return false; if (!this.rd.equals(that.rd)) return false; } boolean this_present_label = true; boolean that_present_label = true; if (this_present_label || that_present_label) { if (!(this_present_label && that_present_label)) return false; if (this.label != that.label) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(pushRoute_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix()); if (lastComparison != 0) { return lastComparison; } if (isSetPrefix()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop()); if (lastComparison != 0) { return lastComparison; } if (isSetNexthop()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd()); if (lastComparison != 0) { return lastComparison; } if (isSetRd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel()); if (lastComparison != 0) { return lastComparison; } if (isSetLabel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("pushRoute_args("); boolean first = true; sb.append("prefix:"); if (this.prefix == null) { sb.append("null"); } else { sb.append(this.prefix); } first = false; if (!first) sb.append(", "); sb.append("nexthop:"); if (this.nexthop == null) { sb.append("null"); } else { sb.append(this.nexthop); } first = false; if (!first) sb.append(", "); sb.append("rd:"); if (this.rd == null) { sb.append("null"); } else { sb.append(this.rd); } first = false; if (!first) sb.append(", "); sb.append("label:"); sb.append(this.label); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class pushRoute_argsStandardSchemeFactory implements SchemeFactory { public pushRoute_argsStandardScheme getScheme() { return new pushRoute_argsStandardScheme(); } } private static class pushRoute_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PREFIX if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NEXTHOP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nexthop = iprot.readString(); struct.setNexthopIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // RD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // LABEL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.label = iprot.readI32(); struct.setLabelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.prefix != null) { oprot.writeFieldBegin(PREFIX_FIELD_DESC); oprot.writeString(struct.prefix); oprot.writeFieldEnd(); } if (struct.nexthop != null) { oprot.writeFieldBegin(NEXTHOP_FIELD_DESC); oprot.writeString(struct.nexthop); oprot.writeFieldEnd(); } if (struct.rd != null) { oprot.writeFieldBegin(RD_FIELD_DESC); oprot.writeString(struct.rd); oprot.writeFieldEnd(); } oprot.writeFieldBegin(LABEL_FIELD_DESC); oprot.writeI32(struct.label); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class pushRoute_argsTupleSchemeFactory implements SchemeFactory { public pushRoute_argsTupleScheme getScheme() { return new pushRoute_argsTupleScheme(); } } private static class pushRoute_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrefix()) { optionals.set(0); } if (struct.isSetNexthop()) { optionals.set(1); } if (struct.isSetRd()) { optionals.set(2); } if (struct.isSetLabel()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetPrefix()) { oprot.writeString(struct.prefix); } if (struct.isSetNexthop()) { oprot.writeString(struct.nexthop); } if (struct.isSetRd()) { oprot.writeString(struct.rd); } if (struct.isSetLabel()) { oprot.writeI32(struct.label); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } if (incoming.get(1)) { struct.nexthop = iprot.readString(); struct.setNexthopIsSet(true); } if (incoming.get(2)) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } if (incoming.get(3)) { struct.label = iprot.readI32(); struct.setLabelIsSet(true); } } } } public static class pushRoute_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_result.class, metaDataMap); } public pushRoute_result() { } public pushRoute_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public pushRoute_result(pushRoute_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public pushRoute_result deepCopy() { return new pushRoute_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public pushRoute_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof pushRoute_result) return this.equals((pushRoute_result)that); return false; } public boolean equals(pushRoute_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(pushRoute_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("pushRoute_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class pushRoute_resultStandardSchemeFactory implements SchemeFactory { public pushRoute_resultStandardScheme getScheme() { return new pushRoute_resultStandardScheme(); } } private static class pushRoute_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class pushRoute_resultTupleSchemeFactory implements SchemeFactory { public pushRoute_resultTupleScheme getScheme() { return new pushRoute_resultTupleScheme(); } } private static class pushRoute_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class withdrawRoute_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_args"); private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory()); } public String prefix; // required public String rd; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PREFIX((short)1, "prefix"), RD((short)2, "rd"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PREFIX return PREFIX; case 2: // RD return RD; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_args.class, metaDataMap); } public withdrawRoute_args() { } public withdrawRoute_args( String prefix, String rd) { this(); this.prefix = prefix; this.rd = rd; } /** * Performs a deep copy on other. */ public withdrawRoute_args(withdrawRoute_args other) { if (other.isSetPrefix()) { this.prefix = other.prefix; } if (other.isSetRd()) { this.rd = other.rd; } } public withdrawRoute_args deepCopy() { return new withdrawRoute_args(this); } @Override public void clear() { this.prefix = null; this.rd = null; } public String getPrefix() { return this.prefix; } public withdrawRoute_args setPrefix(String prefix) { this.prefix = prefix; return this; } public void unsetPrefix() { this.prefix = null; } /** Returns true if field prefix is set (has been assigned a value) and false otherwise */ public boolean isSetPrefix() { return this.prefix != null; } public void setPrefixIsSet(boolean value) { if (!value) { this.prefix = null; } } public String getRd() { return this.rd; } public withdrawRoute_args setRd(String rd) { this.rd = rd; return this; } public void unsetRd() { this.rd = null; } /** Returns true if field rd is set (has been assigned a value) and false otherwise */ public boolean isSetRd() { return this.rd != null; } public void setRdIsSet(boolean value) { if (!value) { this.rd = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PREFIX: if (value == null) { unsetPrefix(); } else { setPrefix((String)value); } break; case RD: if (value == null) { unsetRd(); } else { setRd((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PREFIX: return getPrefix(); case RD: return getRd(); } 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 PREFIX: return isSetPrefix(); case RD: return isSetRd(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof withdrawRoute_args) return this.equals((withdrawRoute_args)that); return false; } public boolean equals(withdrawRoute_args that) { if (that == null) return false; boolean this_present_prefix = true && this.isSetPrefix(); boolean that_present_prefix = true && that.isSetPrefix(); if (this_present_prefix || that_present_prefix) { if (!(this_present_prefix && that_present_prefix)) return false; if (!this.prefix.equals(that.prefix)) return false; } boolean this_present_rd = true && this.isSetRd(); boolean that_present_rd = true && that.isSetRd(); if (this_present_rd || that_present_rd) { if (!(this_present_rd && that_present_rd)) return false; if (!this.rd.equals(that.rd)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(withdrawRoute_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix()); if (lastComparison != 0) { return lastComparison; } if (isSetPrefix()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd()); if (lastComparison != 0) { return lastComparison; } if (isSetRd()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("withdrawRoute_args("); boolean first = true; sb.append("prefix:"); if (this.prefix == null) { sb.append("null"); } else { sb.append(this.prefix); } first = false; if (!first) sb.append(", "); sb.append("rd:"); if (this.rd == null) { sb.append("null"); } else { sb.append(this.rd); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class withdrawRoute_argsStandardSchemeFactory implements SchemeFactory { public withdrawRoute_argsStandardScheme getScheme() { return new withdrawRoute_argsStandardScheme(); } } private static class withdrawRoute_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PREFIX if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.prefix != null) { oprot.writeFieldBegin(PREFIX_FIELD_DESC); oprot.writeString(struct.prefix); oprot.writeFieldEnd(); } if (struct.rd != null) { oprot.writeFieldBegin(RD_FIELD_DESC); oprot.writeString(struct.rd); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class withdrawRoute_argsTupleSchemeFactory implements SchemeFactory { public withdrawRoute_argsTupleScheme getScheme() { return new withdrawRoute_argsTupleScheme(); } } private static class withdrawRoute_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrefix()) { optionals.set(0); } if (struct.isSetRd()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPrefix()) { oprot.writeString(struct.prefix); } if (struct.isSetRd()) { oprot.writeString(struct.rd); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } if (incoming.get(1)) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } } } } public static class withdrawRoute_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_result.class, metaDataMap); } public withdrawRoute_result() { } public withdrawRoute_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public withdrawRoute_result(withdrawRoute_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public withdrawRoute_result deepCopy() { return new withdrawRoute_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public withdrawRoute_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof withdrawRoute_result) return this.equals((withdrawRoute_result)that); return false; } public boolean equals(withdrawRoute_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(withdrawRoute_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("withdrawRoute_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class withdrawRoute_resultStandardSchemeFactory implements SchemeFactory { public withdrawRoute_resultStandardScheme getScheme() { return new withdrawRoute_resultStandardScheme(); } } private static class withdrawRoute_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class withdrawRoute_resultTupleSchemeFactory implements SchemeFactory { public withdrawRoute_resultTupleScheme getScheme() { return new withdrawRoute_resultTupleScheme(); } } private static class withdrawRoute_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class setEbgpMultihop_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setEbgpMultihop_args"); private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField N_HOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("nHops", org.apache.thrift.protocol.TType.I32, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setEbgpMultihop_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new setEbgpMultihop_argsTupleSchemeFactory()); } public String peerIp; // required public int nHops; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PEER_IP((short)1, "peerIp"), N_HOPS((short)2, "nHops"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PEER_IP return PEER_IP; case 2: // N_HOPS return N_HOPS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __NHOPS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.N_HOPS, new org.apache.thrift.meta_data.FieldMetaData("nHops", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setEbgpMultihop_args.class, metaDataMap); } public setEbgpMultihop_args() { } public setEbgpMultihop_args( String peerIp, int nHops) { this(); this.peerIp = peerIp; this.nHops = nHops; setNHopsIsSet(true); } /** * Performs a deep copy on other. */ public setEbgpMultihop_args(setEbgpMultihop_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPeerIp()) { this.peerIp = other.peerIp; } this.nHops = other.nHops; } public setEbgpMultihop_args deepCopy() { return new setEbgpMultihop_args(this); } @Override public void clear() { this.peerIp = null; setNHopsIsSet(false); this.nHops = 0; } public String getPeerIp() { return this.peerIp; } public setEbgpMultihop_args setPeerIp(String peerIp) { this.peerIp = peerIp; return this; } public void unsetPeerIp() { this.peerIp = null; } /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */ public boolean isSetPeerIp() { return this.peerIp != null; } public void setPeerIpIsSet(boolean value) { if (!value) { this.peerIp = null; } } public int getNHops() { return this.nHops; } public setEbgpMultihop_args setNHops(int nHops) { this.nHops = nHops; setNHopsIsSet(true); return this; } public void unsetNHops() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NHOPS_ISSET_ID); } /** Returns true if field nHops is set (has been assigned a value) and false otherwise */ public boolean isSetNHops() { return EncodingUtils.testBit(__isset_bitfield, __NHOPS_ISSET_ID); } public void setNHopsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NHOPS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case PEER_IP: if (value == null) { unsetPeerIp(); } else { setPeerIp((String)value); } break; case N_HOPS: if (value == null) { unsetNHops(); } else { setNHops((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PEER_IP: return getPeerIp(); case N_HOPS: return Integer.valueOf(getNHops()); } 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 PEER_IP: return isSetPeerIp(); case N_HOPS: return isSetNHops(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setEbgpMultihop_args) return this.equals((setEbgpMultihop_args)that); return false; } public boolean equals(setEbgpMultihop_args that) { if (that == null) return false; boolean this_present_peerIp = true && this.isSetPeerIp(); boolean that_present_peerIp = true && that.isSetPeerIp(); if (this_present_peerIp || that_present_peerIp) { if (!(this_present_peerIp && that_present_peerIp)) return false; if (!this.peerIp.equals(that.peerIp)) return false; } boolean this_present_nHops = true; boolean that_present_nHops = true; if (this_present_nHops || that_present_nHops) { if (!(this_present_nHops && that_present_nHops)) return false; if (this.nHops != that.nHops) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(setEbgpMultihop_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp()); if (lastComparison != 0) { return lastComparison; } if (isSetPeerIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNHops()).compareTo(other.isSetNHops()); if (lastComparison != 0) { return lastComparison; } if (isSetNHops()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nHops, other.nHops); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setEbgpMultihop_args("); boolean first = true; sb.append("peerIp:"); if (this.peerIp == null) { sb.append("null"); } else { sb.append(this.peerIp); } first = false; if (!first) sb.append(", "); sb.append("nHops:"); sb.append(this.nHops); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setEbgpMultihop_argsStandardSchemeFactory implements SchemeFactory { public setEbgpMultihop_argsStandardScheme getScheme() { return new setEbgpMultihop_argsStandardScheme(); } } private static class setEbgpMultihop_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setEbgpMultihop_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PEER_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // N_HOPS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.nHops = iprot.readI32(); struct.setNHopsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setEbgpMultihop_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.peerIp != null) { oprot.writeFieldBegin(PEER_IP_FIELD_DESC); oprot.writeString(struct.peerIp); oprot.writeFieldEnd(); } oprot.writeFieldBegin(N_HOPS_FIELD_DESC); oprot.writeI32(struct.nHops); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setEbgpMultihop_argsTupleSchemeFactory implements SchemeFactory { public setEbgpMultihop_argsTupleScheme getScheme() { return new setEbgpMultihop_argsTupleScheme(); } } private static class setEbgpMultihop_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPeerIp()) { optionals.set(0); } if (struct.isSetNHops()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPeerIp()) { oprot.writeString(struct.peerIp); } if (struct.isSetNHops()) { oprot.writeI32(struct.nHops); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } if (incoming.get(1)) { struct.nHops = iprot.readI32(); struct.setNHopsIsSet(true); } } } } public static class setEbgpMultihop_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setEbgpMultihop_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setEbgpMultihop_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new setEbgpMultihop_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setEbgpMultihop_result.class, metaDataMap); } public setEbgpMultihop_result() { } public setEbgpMultihop_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public setEbgpMultihop_result(setEbgpMultihop_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public setEbgpMultihop_result deepCopy() { return new setEbgpMultihop_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public setEbgpMultihop_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setEbgpMultihop_result) return this.equals((setEbgpMultihop_result)that); return false; } public boolean equals(setEbgpMultihop_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(setEbgpMultihop_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setEbgpMultihop_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setEbgpMultihop_resultStandardSchemeFactory implements SchemeFactory { public setEbgpMultihop_resultStandardScheme getScheme() { return new setEbgpMultihop_resultStandardScheme(); } } private static class setEbgpMultihop_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setEbgpMultihop_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setEbgpMultihop_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setEbgpMultihop_resultTupleSchemeFactory implements SchemeFactory { public setEbgpMultihop_resultTupleScheme getScheme() { return new setEbgpMultihop_resultTupleScheme(); } } private static class setEbgpMultihop_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class unsetEbgpMultihop_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetEbgpMultihop_args"); private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new unsetEbgpMultihop_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new unsetEbgpMultihop_argsTupleSchemeFactory()); } public String peerIp; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PEER_IP((short)1, "peerIp"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PEER_IP return PEER_IP; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetEbgpMultihop_args.class, metaDataMap); } public unsetEbgpMultihop_args() { } public unsetEbgpMultihop_args( String peerIp) { this(); this.peerIp = peerIp; } /** * Performs a deep copy on other. */ public unsetEbgpMultihop_args(unsetEbgpMultihop_args other) { if (other.isSetPeerIp()) { this.peerIp = other.peerIp; } } public unsetEbgpMultihop_args deepCopy() { return new unsetEbgpMultihop_args(this); } @Override public void clear() { this.peerIp = null; } public String getPeerIp() { return this.peerIp; } public unsetEbgpMultihop_args setPeerIp(String peerIp) { this.peerIp = peerIp; return this; } public void unsetPeerIp() { this.peerIp = null; } /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */ public boolean isSetPeerIp() { return this.peerIp != null; } public void setPeerIpIsSet(boolean value) { if (!value) { this.peerIp = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PEER_IP: if (value == null) { unsetPeerIp(); } else { setPeerIp((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PEER_IP: return getPeerIp(); } 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 PEER_IP: return isSetPeerIp(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof unsetEbgpMultihop_args) return this.equals((unsetEbgpMultihop_args)that); return false; } public boolean equals(unsetEbgpMultihop_args that) { if (that == null) return false; boolean this_present_peerIp = true && this.isSetPeerIp(); boolean that_present_peerIp = true && that.isSetPeerIp(); if (this_present_peerIp || that_present_peerIp) { if (!(this_present_peerIp && that_present_peerIp)) return false; if (!this.peerIp.equals(that.peerIp)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(unsetEbgpMultihop_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp()); if (lastComparison != 0) { return lastComparison; } if (isSetPeerIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("unsetEbgpMultihop_args("); boolean first = true; sb.append("peerIp:"); if (this.peerIp == null) { sb.append("null"); } else { sb.append(this.peerIp); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unsetEbgpMultihop_argsStandardSchemeFactory implements SchemeFactory { public unsetEbgpMultihop_argsStandardScheme getScheme() { return new unsetEbgpMultihop_argsStandardScheme(); } } private static class unsetEbgpMultihop_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PEER_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.peerIp != null) { oprot.writeFieldBegin(PEER_IP_FIELD_DESC); oprot.writeString(struct.peerIp); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unsetEbgpMultihop_argsTupleSchemeFactory implements SchemeFactory { public unsetEbgpMultihop_argsTupleScheme getScheme() { return new unsetEbgpMultihop_argsTupleScheme(); } } private static class unsetEbgpMultihop_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPeerIp()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPeerIp()) { oprot.writeString(struct.peerIp); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } } } } public static class unsetEbgpMultihop_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetEbgpMultihop_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new unsetEbgpMultihop_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new unsetEbgpMultihop_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetEbgpMultihop_result.class, metaDataMap); } public unsetEbgpMultihop_result() { } public unsetEbgpMultihop_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public unsetEbgpMultihop_result(unsetEbgpMultihop_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public unsetEbgpMultihop_result deepCopy() { return new unsetEbgpMultihop_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public unsetEbgpMultihop_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof unsetEbgpMultihop_result) return this.equals((unsetEbgpMultihop_result)that); return false; } public boolean equals(unsetEbgpMultihop_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(unsetEbgpMultihop_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("unsetEbgpMultihop_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unsetEbgpMultihop_resultStandardSchemeFactory implements SchemeFactory { public unsetEbgpMultihop_resultStandardScheme getScheme() { return new unsetEbgpMultihop_resultStandardScheme(); } } private static class unsetEbgpMultihop_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unsetEbgpMultihop_resultTupleSchemeFactory implements SchemeFactory { public unsetEbgpMultihop_resultTupleScheme getScheme() { return new unsetEbgpMultihop_resultTupleScheme(); } } private static class unsetEbgpMultihop_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class setUpdateSource_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUpdateSource_args"); private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField SRC_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("srcIp", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setUpdateSource_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new setUpdateSource_argsTupleSchemeFactory()); } public String peerIp; // required public String srcIp; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PEER_IP((short)1, "peerIp"), SRC_IP((short)2, "srcIp"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PEER_IP return PEER_IP; case 2: // SRC_IP return SRC_IP; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SRC_IP, new org.apache.thrift.meta_data.FieldMetaData("srcIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpdateSource_args.class, metaDataMap); } public setUpdateSource_args() { } public setUpdateSource_args( String peerIp, String srcIp) { this(); this.peerIp = peerIp; this.srcIp = srcIp; } /** * Performs a deep copy on other. */ public setUpdateSource_args(setUpdateSource_args other) { if (other.isSetPeerIp()) { this.peerIp = other.peerIp; } if (other.isSetSrcIp()) { this.srcIp = other.srcIp; } } public setUpdateSource_args deepCopy() { return new setUpdateSource_args(this); } @Override public void clear() { this.peerIp = null; this.srcIp = null; } public String getPeerIp() { return this.peerIp; } public setUpdateSource_args setPeerIp(String peerIp) { this.peerIp = peerIp; return this; } public void unsetPeerIp() { this.peerIp = null; } /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */ public boolean isSetPeerIp() { return this.peerIp != null; } public void setPeerIpIsSet(boolean value) { if (!value) { this.peerIp = null; } } public String getSrcIp() { return this.srcIp; } public setUpdateSource_args setSrcIp(String srcIp) { this.srcIp = srcIp; return this; } public void unsetSrcIp() { this.srcIp = null; } /** Returns true if field srcIp is set (has been assigned a value) and false otherwise */ public boolean isSetSrcIp() { return this.srcIp != null; } public void setSrcIpIsSet(boolean value) { if (!value) { this.srcIp = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PEER_IP: if (value == null) { unsetPeerIp(); } else { setPeerIp((String)value); } break; case SRC_IP: if (value == null) { unsetSrcIp(); } else { setSrcIp((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PEER_IP: return getPeerIp(); case SRC_IP: return getSrcIp(); } 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 PEER_IP: return isSetPeerIp(); case SRC_IP: return isSetSrcIp(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setUpdateSource_args) return this.equals((setUpdateSource_args)that); return false; } public boolean equals(setUpdateSource_args that) { if (that == null) return false; boolean this_present_peerIp = true && this.isSetPeerIp(); boolean that_present_peerIp = true && that.isSetPeerIp(); if (this_present_peerIp || that_present_peerIp) { if (!(this_present_peerIp && that_present_peerIp)) return false; if (!this.peerIp.equals(that.peerIp)) return false; } boolean this_present_srcIp = true && this.isSetSrcIp(); boolean that_present_srcIp = true && that.isSetSrcIp(); if (this_present_srcIp || that_present_srcIp) { if (!(this_present_srcIp && that_present_srcIp)) return false; if (!this.srcIp.equals(that.srcIp)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(setUpdateSource_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp()); if (lastComparison != 0) { return lastComparison; } if (isSetPeerIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSrcIp()).compareTo(other.isSetSrcIp()); if (lastComparison != 0) { return lastComparison; } if (isSetSrcIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcIp, other.srcIp); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setUpdateSource_args("); boolean first = true; sb.append("peerIp:"); if (this.peerIp == null) { sb.append("null"); } else { sb.append(this.peerIp); } first = false; if (!first) sb.append(", "); sb.append("srcIp:"); if (this.srcIp == null) { sb.append("null"); } else { sb.append(this.srcIp); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setUpdateSource_argsStandardSchemeFactory implements SchemeFactory { public setUpdateSource_argsStandardScheme getScheme() { return new setUpdateSource_argsStandardScheme(); } } private static class setUpdateSource_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setUpdateSource_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PEER_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SRC_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.srcIp = iprot.readString(); struct.setSrcIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setUpdateSource_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.peerIp != null) { oprot.writeFieldBegin(PEER_IP_FIELD_DESC); oprot.writeString(struct.peerIp); oprot.writeFieldEnd(); } if (struct.srcIp != null) { oprot.writeFieldBegin(SRC_IP_FIELD_DESC); oprot.writeString(struct.srcIp); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUpdateSource_argsTupleSchemeFactory implements SchemeFactory { public setUpdateSource_argsTupleScheme getScheme() { return new setUpdateSource_argsTupleScheme(); } } private static class setUpdateSource_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPeerIp()) { optionals.set(0); } if (struct.isSetSrcIp()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPeerIp()) { oprot.writeString(struct.peerIp); } if (struct.isSetSrcIp()) { oprot.writeString(struct.srcIp); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } if (incoming.get(1)) { struct.srcIp = iprot.readString(); struct.setSrcIpIsSet(true); } } } } public static class setUpdateSource_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUpdateSource_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setUpdateSource_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new setUpdateSource_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpdateSource_result.class, metaDataMap); } public setUpdateSource_result() { } public setUpdateSource_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public setUpdateSource_result(setUpdateSource_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public setUpdateSource_result deepCopy() { return new setUpdateSource_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public setUpdateSource_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setUpdateSource_result) return this.equals((setUpdateSource_result)that); return false; } public boolean equals(setUpdateSource_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(setUpdateSource_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setUpdateSource_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setUpdateSource_resultStandardSchemeFactory implements SchemeFactory { public setUpdateSource_resultStandardScheme getScheme() { return new setUpdateSource_resultStandardScheme(); } } private static class setUpdateSource_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setUpdateSource_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setUpdateSource_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUpdateSource_resultTupleSchemeFactory implements SchemeFactory { public setUpdateSource_resultTupleScheme getScheme() { return new setUpdateSource_resultTupleScheme(); } } private static class setUpdateSource_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class unsetUpdateSource_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetUpdateSource_args"); private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new unsetUpdateSource_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new unsetUpdateSource_argsTupleSchemeFactory()); } public String peerIp; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PEER_IP((short)1, "peerIp"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PEER_IP return PEER_IP; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetUpdateSource_args.class, metaDataMap); } public unsetUpdateSource_args() { } public unsetUpdateSource_args( String peerIp) { this(); this.peerIp = peerIp; } /** * Performs a deep copy on other. */ public unsetUpdateSource_args(unsetUpdateSource_args other) { if (other.isSetPeerIp()) { this.peerIp = other.peerIp; } } public unsetUpdateSource_args deepCopy() { return new unsetUpdateSource_args(this); } @Override public void clear() { this.peerIp = null; } public String getPeerIp() { return this.peerIp; } public unsetUpdateSource_args setPeerIp(String peerIp) { this.peerIp = peerIp; return this; } public void unsetPeerIp() { this.peerIp = null; } /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */ public boolean isSetPeerIp() { return this.peerIp != null; } public void setPeerIpIsSet(boolean value) { if (!value) { this.peerIp = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PEER_IP: if (value == null) { unsetPeerIp(); } else { setPeerIp((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PEER_IP: return getPeerIp(); } 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 PEER_IP: return isSetPeerIp(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof unsetUpdateSource_args) return this.equals((unsetUpdateSource_args)that); return false; } public boolean equals(unsetUpdateSource_args that) { if (that == null) return false; boolean this_present_peerIp = true && this.isSetPeerIp(); boolean that_present_peerIp = true && that.isSetPeerIp(); if (this_present_peerIp || that_present_peerIp) { if (!(this_present_peerIp && that_present_peerIp)) return false; if (!this.peerIp.equals(that.peerIp)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(unsetUpdateSource_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp()); if (lastComparison != 0) { return lastComparison; } if (isSetPeerIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("unsetUpdateSource_args("); boolean first = true; sb.append("peerIp:"); if (this.peerIp == null) { sb.append("null"); } else { sb.append(this.peerIp); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unsetUpdateSource_argsStandardSchemeFactory implements SchemeFactory { public unsetUpdateSource_argsStandardScheme getScheme() { return new unsetUpdateSource_argsStandardScheme(); } } private static class unsetUpdateSource_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, unsetUpdateSource_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PEER_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unsetUpdateSource_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.peerIp != null) { oprot.writeFieldBegin(PEER_IP_FIELD_DESC); oprot.writeString(struct.peerIp); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unsetUpdateSource_argsTupleSchemeFactory implements SchemeFactory { public unsetUpdateSource_argsTupleScheme getScheme() { return new unsetUpdateSource_argsTupleScheme(); } } private static class unsetUpdateSource_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPeerIp()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPeerIp()) { oprot.writeString(struct.peerIp); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } } } } public static class unsetUpdateSource_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetUpdateSource_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new unsetUpdateSource_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new unsetUpdateSource_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetUpdateSource_result.class, metaDataMap); } public unsetUpdateSource_result() { } public unsetUpdateSource_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public unsetUpdateSource_result(unsetUpdateSource_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public unsetUpdateSource_result deepCopy() { return new unsetUpdateSource_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public unsetUpdateSource_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof unsetUpdateSource_result) return this.equals((unsetUpdateSource_result)that); return false; } public boolean equals(unsetUpdateSource_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(unsetUpdateSource_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("unsetUpdateSource_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unsetUpdateSource_resultStandardSchemeFactory implements SchemeFactory { public unsetUpdateSource_resultStandardScheme getScheme() { return new unsetUpdateSource_resultStandardScheme(); } } private static class unsetUpdateSource_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, unsetUpdateSource_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unsetUpdateSource_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unsetUpdateSource_resultTupleSchemeFactory implements SchemeFactory { public unsetUpdateSource_resultTupleScheme getScheme() { return new unsetUpdateSource_resultTupleScheme(); } } private static class unsetUpdateSource_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class enableAddressFamily_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableAddressFamily_args"); private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField SAFI_FIELD_DESC = new org.apache.thrift.protocol.TField("safi", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new enableAddressFamily_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new enableAddressFamily_argsTupleSchemeFactory()); } public String peerIp; // required /** * * @see af_afi */ public af_afi afi; // required /** * * @see af_safi */ public af_safi safi; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PEER_IP((short)1, "peerIp"), /** * * @see af_afi */ AFI((short)2, "afi"), /** * * @see af_safi */ SAFI((short)3, "safi"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PEER_IP return PEER_IP; case 2: // AFI return AFI; case 3: // SAFI return SAFI; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class))); tmpMap.put(_Fields.SAFI, new org.apache.thrift.meta_data.FieldMetaData("safi", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_safi.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableAddressFamily_args.class, metaDataMap); } public enableAddressFamily_args() { } public enableAddressFamily_args( String peerIp, af_afi afi, af_safi safi) { this(); this.peerIp = peerIp; this.afi = afi; this.safi = safi; } /** * Performs a deep copy on other. */ public enableAddressFamily_args(enableAddressFamily_args other) { if (other.isSetPeerIp()) { this.peerIp = other.peerIp; } if (other.isSetAfi()) { this.afi = other.afi; } if (other.isSetSafi()) { this.safi = other.safi; } } public enableAddressFamily_args deepCopy() { return new enableAddressFamily_args(this); } @Override public void clear() { this.peerIp = null; this.afi = null; this.safi = null; } public String getPeerIp() { return this.peerIp; } public enableAddressFamily_args setPeerIp(String peerIp) { this.peerIp = peerIp; return this; } public void unsetPeerIp() { this.peerIp = null; } /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */ public boolean isSetPeerIp() { return this.peerIp != null; } public void setPeerIpIsSet(boolean value) { if (!value) { this.peerIp = null; } } /** * * @see af_afi */ public af_afi getAfi() { return this.afi; } /** * * @see af_afi */ public enableAddressFamily_args setAfi(af_afi afi) { this.afi = afi; return this; } public void unsetAfi() { this.afi = null; } /** Returns true if field afi is set (has been assigned a value) and false otherwise */ public boolean isSetAfi() { return this.afi != null; } public void setAfiIsSet(boolean value) { if (!value) { this.afi = null; } } /** * * @see af_safi */ public af_safi getSafi() { return this.safi; } /** * * @see af_safi */ public enableAddressFamily_args setSafi(af_safi safi) { this.safi = safi; return this; } public void unsetSafi() { this.safi = null; } /** Returns true if field safi is set (has been assigned a value) and false otherwise */ public boolean isSetSafi() { return this.safi != null; } public void setSafiIsSet(boolean value) { if (!value) { this.safi = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PEER_IP: if (value == null) { unsetPeerIp(); } else { setPeerIp((String)value); } break; case AFI: if (value == null) { unsetAfi(); } else { setAfi((af_afi)value); } break; case SAFI: if (value == null) { unsetSafi(); } else { setSafi((af_safi)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PEER_IP: return getPeerIp(); case AFI: return getAfi(); case SAFI: return getSafi(); } 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 PEER_IP: return isSetPeerIp(); case AFI: return isSetAfi(); case SAFI: return isSetSafi(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enableAddressFamily_args) return this.equals((enableAddressFamily_args)that); return false; } public boolean equals(enableAddressFamily_args that) { if (that == null) return false; boolean this_present_peerIp = true && this.isSetPeerIp(); boolean that_present_peerIp = true && that.isSetPeerIp(); if (this_present_peerIp || that_present_peerIp) { if (!(this_present_peerIp && that_present_peerIp)) return false; if (!this.peerIp.equals(that.peerIp)) return false; } boolean this_present_afi = true && this.isSetAfi(); boolean that_present_afi = true && that.isSetAfi(); if (this_present_afi || that_present_afi) { if (!(this_present_afi && that_present_afi)) return false; if (!this.afi.equals(that.afi)) return false; } boolean this_present_safi = true && this.isSetSafi(); boolean that_present_safi = true && that.isSetSafi(); if (this_present_safi || that_present_safi) { if (!(this_present_safi && that_present_safi)) return false; if (!this.safi.equals(that.safi)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(enableAddressFamily_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp()); if (lastComparison != 0) { return lastComparison; } if (isSetPeerIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi()); if (lastComparison != 0) { return lastComparison; } if (isSetAfi()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSafi()).compareTo(other.isSetSafi()); if (lastComparison != 0) { return lastComparison; } if (isSetSafi()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.safi, other.safi); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("enableAddressFamily_args("); boolean first = true; sb.append("peerIp:"); if (this.peerIp == null) { sb.append("null"); } else { sb.append(this.peerIp); } first = false; if (!first) sb.append(", "); sb.append("afi:"); if (this.afi == null) { sb.append("null"); } else { sb.append(this.afi); } first = false; if (!first) sb.append(", "); sb.append("safi:"); if (this.safi == null) { sb.append("null"); } else { sb.append(this.safi); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class enableAddressFamily_argsStandardSchemeFactory implements SchemeFactory { public enableAddressFamily_argsStandardScheme getScheme() { return new enableAddressFamily_argsStandardScheme(); } } private static class enableAddressFamily_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, enableAddressFamily_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PEER_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // AFI if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.afi = af_afi.findByValue(iprot.readI32()); struct.setAfiIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SAFI if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.safi = af_safi.findByValue(iprot.readI32()); struct.setSafiIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, enableAddressFamily_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.peerIp != null) { oprot.writeFieldBegin(PEER_IP_FIELD_DESC); oprot.writeString(struct.peerIp); oprot.writeFieldEnd(); } if (struct.afi != null) { oprot.writeFieldBegin(AFI_FIELD_DESC); oprot.writeI32(struct.afi.getValue()); oprot.writeFieldEnd(); } if (struct.safi != null) { oprot.writeFieldBegin(SAFI_FIELD_DESC); oprot.writeI32(struct.safi.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class enableAddressFamily_argsTupleSchemeFactory implements SchemeFactory { public enableAddressFamily_argsTupleScheme getScheme() { return new enableAddressFamily_argsTupleScheme(); } } private static class enableAddressFamily_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPeerIp()) { optionals.set(0); } if (struct.isSetAfi()) { optionals.set(1); } if (struct.isSetSafi()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetPeerIp()) { oprot.writeString(struct.peerIp); } if (struct.isSetAfi()) { oprot.writeI32(struct.afi.getValue()); } if (struct.isSetSafi()) { oprot.writeI32(struct.safi.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } if (incoming.get(1)) { struct.afi = af_afi.findByValue(iprot.readI32()); struct.setAfiIsSet(true); } if (incoming.get(2)) { struct.safi = af_safi.findByValue(iprot.readI32()); struct.setSafiIsSet(true); } } } } public static class enableAddressFamily_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableAddressFamily_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new enableAddressFamily_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new enableAddressFamily_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableAddressFamily_result.class, metaDataMap); } public enableAddressFamily_result() { } public enableAddressFamily_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public enableAddressFamily_result(enableAddressFamily_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public enableAddressFamily_result deepCopy() { return new enableAddressFamily_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public enableAddressFamily_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enableAddressFamily_result) return this.equals((enableAddressFamily_result)that); return false; } public boolean equals(enableAddressFamily_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(enableAddressFamily_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("enableAddressFamily_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class enableAddressFamily_resultStandardSchemeFactory implements SchemeFactory { public enableAddressFamily_resultStandardScheme getScheme() { return new enableAddressFamily_resultStandardScheme(); } } private static class enableAddressFamily_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, enableAddressFamily_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, enableAddressFamily_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class enableAddressFamily_resultTupleSchemeFactory implements SchemeFactory { public enableAddressFamily_resultTupleScheme getScheme() { return new enableAddressFamily_resultTupleScheme(); } } private static class enableAddressFamily_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class disableAddressFamily_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableAddressFamily_args"); private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField SAFI_FIELD_DESC = new org.apache.thrift.protocol.TField("safi", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new disableAddressFamily_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new disableAddressFamily_argsTupleSchemeFactory()); } public String peerIp; // required /** * * @see af_afi */ public af_afi afi; // required /** * * @see af_safi */ public af_safi safi; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PEER_IP((short)1, "peerIp"), /** * * @see af_afi */ AFI((short)2, "afi"), /** * * @see af_safi */ SAFI((short)3, "safi"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PEER_IP return PEER_IP; case 2: // AFI return AFI; case 3: // SAFI return SAFI; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class))); tmpMap.put(_Fields.SAFI, new org.apache.thrift.meta_data.FieldMetaData("safi", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_safi.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableAddressFamily_args.class, metaDataMap); } public disableAddressFamily_args() { } public disableAddressFamily_args( String peerIp, af_afi afi, af_safi safi) { this(); this.peerIp = peerIp; this.afi = afi; this.safi = safi; } /** * Performs a deep copy on other. */ public disableAddressFamily_args(disableAddressFamily_args other) { if (other.isSetPeerIp()) { this.peerIp = other.peerIp; } if (other.isSetAfi()) { this.afi = other.afi; } if (other.isSetSafi()) { this.safi = other.safi; } } public disableAddressFamily_args deepCopy() { return new disableAddressFamily_args(this); } @Override public void clear() { this.peerIp = null; this.afi = null; this.safi = null; } public String getPeerIp() { return this.peerIp; } public disableAddressFamily_args setPeerIp(String peerIp) { this.peerIp = peerIp; return this; } public void unsetPeerIp() { this.peerIp = null; } /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */ public boolean isSetPeerIp() { return this.peerIp != null; } public void setPeerIpIsSet(boolean value) { if (!value) { this.peerIp = null; } } /** * * @see af_afi */ public af_afi getAfi() { return this.afi; } /** * * @see af_afi */ public disableAddressFamily_args setAfi(af_afi afi) { this.afi = afi; return this; } public void unsetAfi() { this.afi = null; } /** Returns true if field afi is set (has been assigned a value) and false otherwise */ public boolean isSetAfi() { return this.afi != null; } public void setAfiIsSet(boolean value) { if (!value) { this.afi = null; } } /** * * @see af_safi */ public af_safi getSafi() { return this.safi; } /** * * @see af_safi */ public disableAddressFamily_args setSafi(af_safi safi) { this.safi = safi; return this; } public void unsetSafi() { this.safi = null; } /** Returns true if field safi is set (has been assigned a value) and false otherwise */ public boolean isSetSafi() { return this.safi != null; } public void setSafiIsSet(boolean value) { if (!value) { this.safi = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PEER_IP: if (value == null) { unsetPeerIp(); } else { setPeerIp((String)value); } break; case AFI: if (value == null) { unsetAfi(); } else { setAfi((af_afi)value); } break; case SAFI: if (value == null) { unsetSafi(); } else { setSafi((af_safi)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PEER_IP: return getPeerIp(); case AFI: return getAfi(); case SAFI: return getSafi(); } 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 PEER_IP: return isSetPeerIp(); case AFI: return isSetAfi(); case SAFI: return isSetSafi(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof disableAddressFamily_args) return this.equals((disableAddressFamily_args)that); return false; } public boolean equals(disableAddressFamily_args that) { if (that == null) return false; boolean this_present_peerIp = true && this.isSetPeerIp(); boolean that_present_peerIp = true && that.isSetPeerIp(); if (this_present_peerIp || that_present_peerIp) { if (!(this_present_peerIp && that_present_peerIp)) return false; if (!this.peerIp.equals(that.peerIp)) return false; } boolean this_present_afi = true && this.isSetAfi(); boolean that_present_afi = true && that.isSetAfi(); if (this_present_afi || that_present_afi) { if (!(this_present_afi && that_present_afi)) return false; if (!this.afi.equals(that.afi)) return false; } boolean this_present_safi = true && this.isSetSafi(); boolean that_present_safi = true && that.isSetSafi(); if (this_present_safi || that_present_safi) { if (!(this_present_safi && that_present_safi)) return false; if (!this.safi.equals(that.safi)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(disableAddressFamily_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp()); if (lastComparison != 0) { return lastComparison; } if (isSetPeerIp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi()); if (lastComparison != 0) { return lastComparison; } if (isSetAfi()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSafi()).compareTo(other.isSetSafi()); if (lastComparison != 0) { return lastComparison; } if (isSetSafi()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.safi, other.safi); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("disableAddressFamily_args("); boolean first = true; sb.append("peerIp:"); if (this.peerIp == null) { sb.append("null"); } else { sb.append(this.peerIp); } first = false; if (!first) sb.append(", "); sb.append("afi:"); if (this.afi == null) { sb.append("null"); } else { sb.append(this.afi); } first = false; if (!first) sb.append(", "); sb.append("safi:"); if (this.safi == null) { sb.append("null"); } else { sb.append(this.safi); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class disableAddressFamily_argsStandardSchemeFactory implements SchemeFactory { public disableAddressFamily_argsStandardScheme getScheme() { return new disableAddressFamily_argsStandardScheme(); } } private static class disableAddressFamily_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, disableAddressFamily_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PEER_IP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // AFI if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.afi = af_afi.findByValue(iprot.readI32()); struct.setAfiIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SAFI if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.safi = af_safi.findByValue(iprot.readI32()); struct.setSafiIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, disableAddressFamily_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.peerIp != null) { oprot.writeFieldBegin(PEER_IP_FIELD_DESC); oprot.writeString(struct.peerIp); oprot.writeFieldEnd(); } if (struct.afi != null) { oprot.writeFieldBegin(AFI_FIELD_DESC); oprot.writeI32(struct.afi.getValue()); oprot.writeFieldEnd(); } if (struct.safi != null) { oprot.writeFieldBegin(SAFI_FIELD_DESC); oprot.writeI32(struct.safi.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class disableAddressFamily_argsTupleSchemeFactory implements SchemeFactory { public disableAddressFamily_argsTupleScheme getScheme() { return new disableAddressFamily_argsTupleScheme(); } } private static class disableAddressFamily_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPeerIp()) { optionals.set(0); } if (struct.isSetAfi()) { optionals.set(1); } if (struct.isSetSafi()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetPeerIp()) { oprot.writeString(struct.peerIp); } if (struct.isSetAfi()) { oprot.writeI32(struct.afi.getValue()); } if (struct.isSetSafi()) { oprot.writeI32(struct.safi.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.peerIp = iprot.readString(); struct.setPeerIpIsSet(true); } if (incoming.get(1)) { struct.afi = af_afi.findByValue(iprot.readI32()); struct.setAfiIsSet(true); } if (incoming.get(2)) { struct.safi = af_safi.findByValue(iprot.readI32()); struct.setSafiIsSet(true); } } } } public static class disableAddressFamily_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableAddressFamily_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new disableAddressFamily_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new disableAddressFamily_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableAddressFamily_result.class, metaDataMap); } public disableAddressFamily_result() { } public disableAddressFamily_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public disableAddressFamily_result(disableAddressFamily_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public disableAddressFamily_result deepCopy() { return new disableAddressFamily_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public disableAddressFamily_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof disableAddressFamily_result) return this.equals((disableAddressFamily_result)that); return false; } public boolean equals(disableAddressFamily_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(disableAddressFamily_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("disableAddressFamily_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class disableAddressFamily_resultStandardSchemeFactory implements SchemeFactory { public disableAddressFamily_resultStandardScheme getScheme() { return new disableAddressFamily_resultStandardScheme(); } } private static class disableAddressFamily_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, disableAddressFamily_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, disableAddressFamily_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class disableAddressFamily_resultTupleSchemeFactory implements SchemeFactory { public disableAddressFamily_resultTupleScheme getScheme() { return new disableAddressFamily_resultTupleScheme(); } } private static class disableAddressFamily_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class setLogConfig_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLogConfig_args"); private static final org.apache.thrift.protocol.TField LOG_FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("logFileName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField LOG_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("logLevel", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setLogConfig_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new setLogConfig_argsTupleSchemeFactory()); } public String logFileName; // required public String logLevel; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LOG_FILE_NAME((short)1, "logFileName"), LOG_LEVEL((short)2, "logLevel"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LOG_FILE_NAME return LOG_FILE_NAME; case 2: // LOG_LEVEL return LOG_LEVEL; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.LOG_FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("logFileName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("logLevel", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLogConfig_args.class, metaDataMap); } public setLogConfig_args() { } public setLogConfig_args( String logFileName, String logLevel) { this(); this.logFileName = logFileName; this.logLevel = logLevel; } /** * Performs a deep copy on other. */ public setLogConfig_args(setLogConfig_args other) { if (other.isSetLogFileName()) { this.logFileName = other.logFileName; } if (other.isSetLogLevel()) { this.logLevel = other.logLevel; } } public setLogConfig_args deepCopy() { return new setLogConfig_args(this); } @Override public void clear() { this.logFileName = null; this.logLevel = null; } public String getLogFileName() { return this.logFileName; } public setLogConfig_args setLogFileName(String logFileName) { this.logFileName = logFileName; return this; } public void unsetLogFileName() { this.logFileName = null; } /** Returns true if field logFileName is set (has been assigned a value) and false otherwise */ public boolean isSetLogFileName() { return this.logFileName != null; } public void setLogFileNameIsSet(boolean value) { if (!value) { this.logFileName = null; } } public String getLogLevel() { return this.logLevel; } public setLogConfig_args setLogLevel(String logLevel) { this.logLevel = logLevel; return this; } public void unsetLogLevel() { this.logLevel = null; } /** Returns true if field logLevel is set (has been assigned a value) and false otherwise */ public boolean isSetLogLevel() { return this.logLevel != null; } public void setLogLevelIsSet(boolean value) { if (!value) { this.logLevel = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case LOG_FILE_NAME: if (value == null) { unsetLogFileName(); } else { setLogFileName((String)value); } break; case LOG_LEVEL: if (value == null) { unsetLogLevel(); } else { setLogLevel((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case LOG_FILE_NAME: return getLogFileName(); case LOG_LEVEL: return getLogLevel(); } 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 LOG_FILE_NAME: return isSetLogFileName(); case LOG_LEVEL: return isSetLogLevel(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setLogConfig_args) return this.equals((setLogConfig_args)that); return false; } public boolean equals(setLogConfig_args that) { if (that == null) return false; boolean this_present_logFileName = true && this.isSetLogFileName(); boolean that_present_logFileName = true && that.isSetLogFileName(); if (this_present_logFileName || that_present_logFileName) { if (!(this_present_logFileName && that_present_logFileName)) return false; if (!this.logFileName.equals(that.logFileName)) return false; } boolean this_present_logLevel = true && this.isSetLogLevel(); boolean that_present_logLevel = true && that.isSetLogLevel(); if (this_present_logLevel || that_present_logLevel) { if (!(this_present_logLevel && that_present_logLevel)) return false; if (!this.logLevel.equals(that.logLevel)) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(setLogConfig_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetLogFileName()).compareTo(other.isSetLogFileName()); if (lastComparison != 0) { return lastComparison; } if (isSetLogFileName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logFileName, other.logFileName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLogLevel()).compareTo(other.isSetLogLevel()); if (lastComparison != 0) { return lastComparison; } if (isSetLogLevel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logLevel, other.logLevel); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setLogConfig_args("); boolean first = true; sb.append("logFileName:"); if (this.logFileName == null) { sb.append("null"); } else { sb.append(this.logFileName); } first = false; if (!first) sb.append(", "); sb.append("logLevel:"); if (this.logLevel == null) { sb.append("null"); } else { sb.append(this.logLevel); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setLogConfig_argsStandardSchemeFactory implements SchemeFactory { public setLogConfig_argsStandardScheme getScheme() { return new setLogConfig_argsStandardScheme(); } } private static class setLogConfig_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setLogConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // LOG_FILE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.logFileName = iprot.readString(); struct.setLogFileNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LOG_LEVEL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.logLevel = iprot.readString(); struct.setLogLevelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setLogConfig_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.logFileName != null) { oprot.writeFieldBegin(LOG_FILE_NAME_FIELD_DESC); oprot.writeString(struct.logFileName); oprot.writeFieldEnd(); } if (struct.logLevel != null) { oprot.writeFieldBegin(LOG_LEVEL_FIELD_DESC); oprot.writeString(struct.logLevel); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setLogConfig_argsTupleSchemeFactory implements SchemeFactory { public setLogConfig_argsTupleScheme getScheme() { return new setLogConfig_argsTupleScheme(); } } private static class setLogConfig_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setLogConfig_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetLogFileName()) { optionals.set(0); } if (struct.isSetLogLevel()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetLogFileName()) { oprot.writeString(struct.logFileName); } if (struct.isSetLogLevel()) { oprot.writeString(struct.logLevel); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setLogConfig_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.logFileName = iprot.readString(); struct.setLogFileNameIsSet(true); } if (incoming.get(1)) { struct.logLevel = iprot.readString(); struct.setLogLevelIsSet(true); } } } } public static class setLogConfig_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLogConfig_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setLogConfig_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new setLogConfig_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLogConfig_result.class, metaDataMap); } public setLogConfig_result() { } public setLogConfig_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public setLogConfig_result(setLogConfig_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public setLogConfig_result deepCopy() { return new setLogConfig_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public setLogConfig_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setLogConfig_result) return this.equals((setLogConfig_result)that); return false; } public boolean equals(setLogConfig_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(setLogConfig_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setLogConfig_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setLogConfig_resultStandardSchemeFactory implements SchemeFactory { public setLogConfig_resultStandardScheme getScheme() { return new setLogConfig_resultStandardScheme(); } } private static class setLogConfig_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setLogConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setLogConfig_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setLogConfig_resultTupleSchemeFactory implements SchemeFactory { public setLogConfig_resultTupleScheme getScheme() { return new setLogConfig_resultTupleScheme(); } } private static class setLogConfig_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setLogConfig_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setLogConfig_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class enableGracefulRestart_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableGracefulRestart_args"); private static final org.apache.thrift.protocol.TField STALEPATH_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("stalepathTime", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new enableGracefulRestart_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new enableGracefulRestart_argsTupleSchemeFactory()); } public int stalepathTime; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { STALEPATH_TIME((short)1, "stalepathTime"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // STALEPATH_TIME return STALEPATH_TIME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __STALEPATHTIME_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.STALEPATH_TIME, new org.apache.thrift.meta_data.FieldMetaData("stalepathTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableGracefulRestart_args.class, metaDataMap); } public enableGracefulRestart_args() { } public enableGracefulRestart_args( int stalepathTime) { this(); this.stalepathTime = stalepathTime; setStalepathTimeIsSet(true); } /** * Performs a deep copy on other. */ public enableGracefulRestart_args(enableGracefulRestart_args other) { __isset_bitfield = other.__isset_bitfield; this.stalepathTime = other.stalepathTime; } public enableGracefulRestart_args deepCopy() { return new enableGracefulRestart_args(this); } @Override public void clear() { setStalepathTimeIsSet(false); this.stalepathTime = 0; } public int getStalepathTime() { return this.stalepathTime; } public enableGracefulRestart_args setStalepathTime(int stalepathTime) { this.stalepathTime = stalepathTime; setStalepathTimeIsSet(true); return this; } public void unsetStalepathTime() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID); } /** Returns true if field stalepathTime is set (has been assigned a value) and false otherwise */ public boolean isSetStalepathTime() { return EncodingUtils.testBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID); } public void setStalepathTimeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case STALEPATH_TIME: if (value == null) { unsetStalepathTime(); } else { setStalepathTime((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case STALEPATH_TIME: return Integer.valueOf(getStalepathTime()); } 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 STALEPATH_TIME: return isSetStalepathTime(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enableGracefulRestart_args) return this.equals((enableGracefulRestart_args)that); return false; } public boolean equals(enableGracefulRestart_args that) { if (that == null) return false; boolean this_present_stalepathTime = true; boolean that_present_stalepathTime = true; if (this_present_stalepathTime || that_present_stalepathTime) { if (!(this_present_stalepathTime && that_present_stalepathTime)) return false; if (this.stalepathTime != that.stalepathTime) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(enableGracefulRestart_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStalepathTime()).compareTo(other.isSetStalepathTime()); if (lastComparison != 0) { return lastComparison; } if (isSetStalepathTime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stalepathTime, other.stalepathTime); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("enableGracefulRestart_args("); boolean first = true; sb.append("stalepathTime:"); sb.append(this.stalepathTime); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class enableGracefulRestart_argsStandardSchemeFactory implements SchemeFactory { public enableGracefulRestart_argsStandardScheme getScheme() { return new enableGracefulRestart_argsStandardScheme(); } } private static class enableGracefulRestart_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, enableGracefulRestart_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // STALEPATH_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.stalepathTime = iprot.readI32(); struct.setStalepathTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, enableGracefulRestart_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(STALEPATH_TIME_FIELD_DESC); oprot.writeI32(struct.stalepathTime); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class enableGracefulRestart_argsTupleSchemeFactory implements SchemeFactory { public enableGracefulRestart_argsTupleScheme getScheme() { return new enableGracefulRestart_argsTupleScheme(); } } private static class enableGracefulRestart_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetStalepathTime()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetStalepathTime()) { oprot.writeI32(struct.stalepathTime); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.stalepathTime = iprot.readI32(); struct.setStalepathTimeIsSet(true); } } } } public static class enableGracefulRestart_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableGracefulRestart_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new enableGracefulRestart_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new enableGracefulRestart_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableGracefulRestart_result.class, metaDataMap); } public enableGracefulRestart_result() { } public enableGracefulRestart_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public enableGracefulRestart_result(enableGracefulRestart_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public enableGracefulRestart_result deepCopy() { return new enableGracefulRestart_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public enableGracefulRestart_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enableGracefulRestart_result) return this.equals((enableGracefulRestart_result)that); return false; } public boolean equals(enableGracefulRestart_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(enableGracefulRestart_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("enableGracefulRestart_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class enableGracefulRestart_resultStandardSchemeFactory implements SchemeFactory { public enableGracefulRestart_resultStandardScheme getScheme() { return new enableGracefulRestart_resultStandardScheme(); } } private static class enableGracefulRestart_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, enableGracefulRestart_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, enableGracefulRestart_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class enableGracefulRestart_resultTupleSchemeFactory implements SchemeFactory { public enableGracefulRestart_resultTupleScheme getScheme() { return new enableGracefulRestart_resultTupleScheme(); } } private static class enableGracefulRestart_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class disableGracefulRestart_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableGracefulRestart_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new disableGracefulRestart_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new disableGracefulRestart_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableGracefulRestart_args.class, metaDataMap); } public disableGracefulRestart_args() { } /** * Performs a deep copy on other. */ public disableGracefulRestart_args(disableGracefulRestart_args other) { } public disableGracefulRestart_args deepCopy() { return new disableGracefulRestart_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 disableGracefulRestart_args) return this.equals((disableGracefulRestart_args)that); return false; } public boolean equals(disableGracefulRestart_args that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(disableGracefulRestart_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(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("disableGracefulRestart_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class disableGracefulRestart_argsStandardSchemeFactory implements SchemeFactory { public disableGracefulRestart_argsStandardScheme getScheme() { return new disableGracefulRestart_argsStandardScheme(); } } private static class disableGracefulRestart_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, disableGracefulRestart_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, disableGracefulRestart_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class disableGracefulRestart_argsTupleSchemeFactory implements SchemeFactory { public disableGracefulRestart_argsTupleScheme getScheme() { return new disableGracefulRestart_argsTupleScheme(); } } private static class disableGracefulRestart_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class disableGracefulRestart_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableGracefulRestart_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new disableGracefulRestart_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new disableGracefulRestart_resultTupleSchemeFactory()); } public int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableGracefulRestart_result.class, metaDataMap); } public disableGracefulRestart_result() { } public disableGracefulRestart_result( int success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public disableGracefulRestart_result(disableGracefulRestart_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public disableGracefulRestart_result deepCopy() { return new disableGracefulRestart_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; } public int getSuccess() { return this.success; } public disableGracefulRestart_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof disableGracefulRestart_result) return this.equals((disableGracefulRestart_result)that); return false; } public boolean equals(disableGracefulRestart_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(disableGracefulRestart_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("disableGracefulRestart_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class disableGracefulRestart_resultStandardSchemeFactory implements SchemeFactory { public disableGracefulRestart_resultStandardScheme getScheme() { return new disableGracefulRestart_resultStandardScheme(); } } private static class disableGracefulRestart_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, disableGracefulRestart_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, disableGracefulRestart_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class disableGracefulRestart_resultTupleSchemeFactory implements SchemeFactory { public disableGracefulRestart_resultTupleScheme getScheme() { return new disableGracefulRestart_resultTupleScheme(); } } private static class disableGracefulRestart_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } } } } public static class getRoutes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoutes_args"); private static final org.apache.thrift.protocol.TField OPTYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("optype", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField WIN_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("winSize", org.apache.thrift.protocol.TType.I32, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getRoutes_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getRoutes_argsTupleSchemeFactory()); } public int optype; // required public int winSize; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { OPTYPE((short)1, "optype"), WIN_SIZE((short)2, "winSize"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // OPTYPE return OPTYPE; case 2: // WIN_SIZE return WIN_SIZE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __OPTYPE_ISSET_ID = 0; private static final int __WINSIZE_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.OPTYPE, new org.apache.thrift.meta_data.FieldMetaData("optype", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.WIN_SIZE, new org.apache.thrift.meta_data.FieldMetaData("winSize", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoutes_args.class, metaDataMap); } public getRoutes_args() { } public getRoutes_args( int optype, int winSize) { this(); this.optype = optype; setOptypeIsSet(true); this.winSize = winSize; setWinSizeIsSet(true); } /** * Performs a deep copy on other. */ public getRoutes_args(getRoutes_args other) { __isset_bitfield = other.__isset_bitfield; this.optype = other.optype; this.winSize = other.winSize; } public getRoutes_args deepCopy() { return new getRoutes_args(this); } @Override public void clear() { setOptypeIsSet(false); this.optype = 0; setWinSizeIsSet(false); this.winSize = 0; } public int getOptype() { return this.optype; } public getRoutes_args setOptype(int optype) { this.optype = optype; setOptypeIsSet(true); return this; } public void unsetOptype() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPTYPE_ISSET_ID); } /** Returns true if field optype is set (has been assigned a value) and false otherwise */ public boolean isSetOptype() { return EncodingUtils.testBit(__isset_bitfield, __OPTYPE_ISSET_ID); } public void setOptypeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPTYPE_ISSET_ID, value); } public int getWinSize() { return this.winSize; } public getRoutes_args setWinSize(int winSize) { this.winSize = winSize; setWinSizeIsSet(true); return this; } public void unsetWinSize() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WINSIZE_ISSET_ID); } /** Returns true if field winSize is set (has been assigned a value) and false otherwise */ public boolean isSetWinSize() { return EncodingUtils.testBit(__isset_bitfield, __WINSIZE_ISSET_ID); } public void setWinSizeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WINSIZE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case OPTYPE: if (value == null) { unsetOptype(); } else { setOptype((Integer)value); } break; case WIN_SIZE: if (value == null) { unsetWinSize(); } else { setWinSize((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case OPTYPE: return Integer.valueOf(getOptype()); case WIN_SIZE: return Integer.valueOf(getWinSize()); } 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 OPTYPE: return isSetOptype(); case WIN_SIZE: return isSetWinSize(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getRoutes_args) return this.equals((getRoutes_args)that); return false; } public boolean equals(getRoutes_args that) { if (that == null) return false; boolean this_present_optype = true; boolean that_present_optype = true; if (this_present_optype || that_present_optype) { if (!(this_present_optype && that_present_optype)) return false; if (this.optype != that.optype) return false; } boolean this_present_winSize = true; boolean that_present_winSize = true; if (this_present_winSize || that_present_winSize) { if (!(this_present_winSize && that_present_winSize)) return false; if (this.winSize != that.winSize) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(getRoutes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetOptype()).compareTo(other.isSetOptype()); if (lastComparison != 0) { return lastComparison; } if (isSetOptype()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.optype, other.optype); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetWinSize()).compareTo(other.isSetWinSize()); if (lastComparison != 0) { return lastComparison; } if (isSetWinSize()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.winSize, other.winSize); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getRoutes_args("); boolean first = true; sb.append("optype:"); sb.append(this.optype); first = false; if (!first) sb.append(", "); sb.append("winSize:"); sb.append(this.winSize); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getRoutes_argsStandardSchemeFactory implements SchemeFactory { public getRoutes_argsStandardScheme getScheme() { return new getRoutes_argsStandardScheme(); } } private static class getRoutes_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, getRoutes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // OPTYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.optype = iprot.readI32(); struct.setOptypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // WIN_SIZE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.winSize = iprot.readI32(); struct.setWinSizeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getRoutes_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(OPTYPE_FIELD_DESC); oprot.writeI32(struct.optype); oprot.writeFieldEnd(); oprot.writeFieldBegin(WIN_SIZE_FIELD_DESC); oprot.writeI32(struct.winSize); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getRoutes_argsTupleSchemeFactory implements SchemeFactory { public getRoutes_argsTupleScheme getScheme() { return new getRoutes_argsTupleScheme(); } } private static class getRoutes_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getRoutes_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetOptype()) { optionals.set(0); } if (struct.isSetWinSize()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetOptype()) { oprot.writeI32(struct.optype); } if (struct.isSetWinSize()) { oprot.writeI32(struct.winSize); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getRoutes_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.optype = iprot.readI32(); struct.setOptypeIsSet(true); } if (incoming.get(1)) { struct.winSize = iprot.readI32(); struct.setWinSizeIsSet(true); } } } } public static class getRoutes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoutes_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getRoutes_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getRoutes_resultTupleSchemeFactory()); } public Routes success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; 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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Routes.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoutes_result.class, metaDataMap); } public getRoutes_result() { } public getRoutes_result( Routes success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getRoutes_result(getRoutes_result other) { if (other.isSetSuccess()) { this.success = new Routes(other.success); } } public getRoutes_result deepCopy() { return new getRoutes_result(this); } @Override public void clear() { this.success = null; } public Routes getSuccess() { return this.success; } public getRoutes_result setSuccess(Routes 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 void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Routes)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getRoutes_result) return this.equals((getRoutes_result)that); return false; } public boolean equals(getRoutes_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; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(getRoutes_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getRoutes_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.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 org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getRoutes_resultStandardSchemeFactory implements SchemeFactory { public getRoutes_resultStandardScheme getScheme() { return new getRoutes_resultStandardScheme(); } } private static class getRoutes_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, getRoutes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Routes(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getRoutes_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getRoutes_resultTupleSchemeFactory implements SchemeFactory { public getRoutes_resultTupleScheme getScheme() { return new getRoutes_resultTupleScheme(); } } private static class getRoutes_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getRoutes_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getRoutes_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new Routes(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } }