/** * 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 BgpUpdater { public interface Iface { public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) throws org.apache.thrift.TException; public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) throws org.apache.thrift.TException; public void onStartConfigResyncNotification() throws org.apache.thrift.TException; public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode) throws org.apache.thrift.TException; } public interface AsyncIface { public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode, 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 void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) throws org.apache.thrift.TException { send_onUpdatePushRoute(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, routermac, afi); } public void send_onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) throws org.apache.thrift.TException { onUpdatePushRoute_args args = new onUpdatePushRoute_args(); args.setP_type(p_type); args.setRd(rd); args.setPrefix(prefix); args.setPrefixlen(prefixlen); args.setNexthop(nexthop); args.setEthtag(ethtag); args.setEsi(esi); args.setMacaddress(macaddress); args.setL3label(l3label); args.setL2label(l2label); args.setRoutermac(routermac); args.setAfi(afi); sendBase("onUpdatePushRoute", args); } public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) throws org.apache.thrift.TException { send_onUpdateWithdrawRoute(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, afi); } public void send_onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) throws org.apache.thrift.TException { onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args(); args.setP_type(p_type); args.setRd(rd); args.setPrefix(prefix); args.setPrefixlen(prefixlen); args.setNexthop(nexthop); args.setEthtag(ethtag); args.setEsi(esi); args.setMacaddress(macaddress); args.setL3label(l3label); args.setL2label(l2label); args.setAfi(afi); sendBase("onUpdateWithdrawRoute", args); } public void onStartConfigResyncNotification() throws org.apache.thrift.TException { send_onStartConfigResyncNotification(); } public void send_onStartConfigResyncNotification() throws org.apache.thrift.TException { onStartConfigResyncNotification_args args = new onStartConfigResyncNotification_args(); sendBase("onStartConfigResyncNotification", args); } public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode) throws org.apache.thrift.TException { send_onNotificationSendEvent(prefix, errCode, errSubcode); } public void send_onNotificationSendEvent(String prefix, byte errCode, byte errSubcode) throws org.apache.thrift.TException { onNotificationSendEvent_args args = new onNotificationSendEvent_args(); args.setPrefix(prefix); args.setErrCode(errCode); args.setErrSubcode(errSubcode); sendBase("onNotificationSendEvent", args); } } 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 onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); onUpdatePushRoute_call method_call = new onUpdatePushRoute_call(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, routermac, afi, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class onUpdatePushRoute_call extends org.apache.thrift.async.TAsyncMethodCall { private protocol_type p_type; private String rd; private String prefix; private int prefixlen; private String nexthop; private int ethtag; private String esi; private String macaddress; private int l3label; private int l2label; private String routermac; private af_afi afi; public onUpdatePushRoute_call(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi, 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, true); this.p_type = p_type; this.rd = rd; this.prefix = prefix; this.prefixlen = prefixlen; this.nexthop = nexthop; this.ethtag = ethtag; this.esi = esi; this.macaddress = macaddress; this.l3label = l3label; this.l2label = l2label; this.routermac = routermac; this.afi = afi; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdatePushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0)); onUpdatePushRoute_args args = new onUpdatePushRoute_args(); args.setP_type(p_type); args.setRd(rd); args.setPrefix(prefix); args.setPrefixlen(prefixlen); args.setNexthop(nexthop); args.setEthtag(ethtag); args.setEsi(esi); args.setMacaddress(macaddress); args.setL3label(l3label); args.setL2label(l2label); args.setRoutermac(routermac); args.setAfi(afi); args.write(prot); prot.writeMessageEnd(); } public void 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); } } public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); onUpdateWithdrawRoute_call method_call = new onUpdateWithdrawRoute_call(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, afi, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class onUpdateWithdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall { private protocol_type p_type; private String rd; private String prefix; private int prefixlen; private String nexthop; private int ethtag; private String esi; private String macaddress; private int l3label; private int l2label; private af_afi afi; public onUpdateWithdrawRoute_call(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi, 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, true); this.p_type = p_type; this.rd = rd; this.prefix = prefix; this.prefixlen = prefixlen; this.nexthop = nexthop; this.ethtag = ethtag; this.esi = esi; this.macaddress = macaddress; this.l3label = l3label; this.l2label = l2label; this.afi = afi; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdateWithdrawRoute", org.apache.thrift.protocol.TMessageType.CALL, 0)); onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args(); args.setP_type(p_type); args.setRd(rd); args.setPrefix(prefix); args.setPrefixlen(prefixlen); args.setNexthop(nexthop); args.setEthtag(ethtag); args.setEsi(esi); args.setMacaddress(macaddress); args.setL3label(l3label); args.setL2label(l2label); args.setAfi(afi); args.write(prot); prot.writeMessageEnd(); } public void 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); } } public void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); onStartConfigResyncNotification_call method_call = new onStartConfigResyncNotification_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class onStartConfigResyncNotification_call extends org.apache.thrift.async.TAsyncMethodCall { public onStartConfigResyncNotification_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, true); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onStartConfigResyncNotification", org.apache.thrift.protocol.TMessageType.CALL, 0)); onStartConfigResyncNotification_args args = new onStartConfigResyncNotification_args(); args.write(prot); prot.writeMessageEnd(); } public void 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); } } public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); onNotificationSendEvent_call method_call = new onNotificationSendEvent_call(prefix, errCode, errSubcode, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class onNotificationSendEvent_call extends org.apache.thrift.async.TAsyncMethodCall { private String prefix; private byte errCode; private byte errSubcode; public onNotificationSendEvent_call(String prefix, byte errCode, byte errSubcode, 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, true); this.prefix = prefix; this.errCode = errCode; this.errSubcode = errSubcode; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onNotificationSendEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); onNotificationSendEvent_args args = new onNotificationSendEvent_args(); args.setPrefix(prefix); args.setErrCode(errCode); args.setErrSubcode(errSubcode); args.write(prot); prot.writeMessageEnd(); } public void 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); } } } 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("onUpdatePushRoute", new onUpdatePushRoute()); processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute()); processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification()); processMap.put("onNotificationSendEvent", new onNotificationSendEvent()); return processMap; } public static class onUpdatePushRoute extends org.apache.thrift.ProcessFunction { public onUpdatePushRoute() { super("onUpdatePushRoute"); } public onUpdatePushRoute_args getEmptyArgsInstance() { return new onUpdatePushRoute_args(); } protected boolean isOneway() { return true; } public org.apache.thrift.TBase getResult(I iface, onUpdatePushRoute_args args) throws org.apache.thrift.TException { iface.onUpdatePushRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.routermac, args.afi); return null; } } public static class onUpdateWithdrawRoute extends org.apache.thrift.ProcessFunction { public onUpdateWithdrawRoute() { super("onUpdateWithdrawRoute"); } public onUpdateWithdrawRoute_args getEmptyArgsInstance() { return new onUpdateWithdrawRoute_args(); } protected boolean isOneway() { return true; } public org.apache.thrift.TBase getResult(I iface, onUpdateWithdrawRoute_args args) throws org.apache.thrift.TException { iface.onUpdateWithdrawRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.afi); return null; } } public static class onStartConfigResyncNotification extends org.apache.thrift.ProcessFunction { public onStartConfigResyncNotification() { super("onStartConfigResyncNotification"); } public onStartConfigResyncNotification_args getEmptyArgsInstance() { return new onStartConfigResyncNotification_args(); } protected boolean isOneway() { return true; } public org.apache.thrift.TBase getResult(I iface, onStartConfigResyncNotification_args args) throws org.apache.thrift.TException { iface.onStartConfigResyncNotification(); return null; } } public static class onNotificationSendEvent extends org.apache.thrift.ProcessFunction { public onNotificationSendEvent() { super("onNotificationSendEvent"); } public onNotificationSendEvent_args getEmptyArgsInstance() { return new onNotificationSendEvent_args(); } protected boolean isOneway() { return true; } public org.apache.thrift.TBase getResult(I iface, onNotificationSendEvent_args args) throws org.apache.thrift.TException { iface.onNotificationSendEvent(args.prefix, args.errCode, args.errSubcode); return null; } } } 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("onUpdatePushRoute", new onUpdatePushRoute()); processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute()); processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification()); processMap.put("onNotificationSendEvent", new onNotificationSendEvent()); return processMap; } public static class onUpdatePushRoute extends org.apache.thrift.AsyncProcessFunction { public onUpdatePushRoute() { super("onUpdatePushRoute"); } public onUpdatePushRoute_args getEmptyArgsInstance() { return new onUpdatePushRoute_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Void o) { } public void onError(Exception e) { } }; } protected boolean isOneway() { return true; } public void start(I iface, onUpdatePushRoute_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.onUpdatePushRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.routermac, args.afi,resultHandler); } } public static class onUpdateWithdrawRoute extends org.apache.thrift.AsyncProcessFunction { public onUpdateWithdrawRoute() { super("onUpdateWithdrawRoute"); } public onUpdateWithdrawRoute_args getEmptyArgsInstance() { return new onUpdateWithdrawRoute_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Void o) { } public void onError(Exception e) { } }; } protected boolean isOneway() { return true; } public void start(I iface, onUpdateWithdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.onUpdateWithdrawRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.afi,resultHandler); } } public static class onStartConfigResyncNotification extends org.apache.thrift.AsyncProcessFunction { public onStartConfigResyncNotification() { super("onStartConfigResyncNotification"); } public onStartConfigResyncNotification_args getEmptyArgsInstance() { return new onStartConfigResyncNotification_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Void o) { } public void onError(Exception e) { } }; } protected boolean isOneway() { return true; } public void start(I iface, onStartConfigResyncNotification_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.onStartConfigResyncNotification(resultHandler); } } public static class onNotificationSendEvent extends org.apache.thrift.AsyncProcessFunction { public onNotificationSendEvent() { super("onNotificationSendEvent"); } public onNotificationSendEvent_args getEmptyArgsInstance() { return new onNotificationSendEvent_args(); } public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback() { public void onComplete(Void o) { } public void onError(Exception e) { } }; } protected boolean isOneway() { return true; } public void start(I iface, onNotificationSendEvent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.onNotificationSendEvent(args.prefix, args.errCode, args.errSubcode,resultHandler); } } } public static class onUpdatePushRoute_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("onUpdatePushRoute_args"); private static final org.apache.thrift.protocol.TField P_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("p_type", org.apache.thrift.protocol.TType.I32, (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 org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", org.apache.thrift.protocol.TType.I32, (short)4); 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)5); private static final org.apache.thrift.protocol.TField ETHTAG_FIELD_DESC = new org.apache.thrift.protocol.TField("ethtag", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField ESI_FIELD_DESC = new org.apache.thrift.protocol.TField("esi", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.protocol.TField MACADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("macaddress", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.protocol.TField L3LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l3label", org.apache.thrift.protocol.TType.I32, (short)9); private static final org.apache.thrift.protocol.TField L2LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2label", org.apache.thrift.protocol.TType.I32, (short)10); private static final org.apache.thrift.protocol.TField ROUTERMAC_FIELD_DESC = new org.apache.thrift.protocol.TField("routermac", org.apache.thrift.protocol.TType.STRING, (short)11); 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)12); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new onUpdatePushRoute_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new onUpdatePushRoute_argsTupleSchemeFactory()); } /** * * @see protocol_type */ public protocol_type p_type; // required public String rd; // required public String prefix; // required public int prefixlen; // required public String nexthop; // required public int ethtag; // required public String esi; // required public String macaddress; // required public int l3label; // required public int l2label; // required public String routermac; // required /** * * @see af_afi */ public af_afi afi; // 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 { /** * * @see protocol_type */ P_TYPE((short)1, "p_type"), RD((short)2, "rd"), PREFIX((short)3, "prefix"), PREFIXLEN((short)4, "prefixlen"), NEXTHOP((short)5, "nexthop"), ETHTAG((short)6, "ethtag"), ESI((short)7, "esi"), MACADDRESS((short)8, "macaddress"), L3LABEL((short)9, "l3label"), L2LABEL((short)10, "l2label"), ROUTERMAC((short)11, "routermac"), /** * * @see af_afi */ AFI((short)12, "afi"); 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: // P_TYPE return P_TYPE; case 2: // RD return RD; case 3: // PREFIX return PREFIX; case 4: // PREFIXLEN return PREFIXLEN; case 5: // NEXTHOP return NEXTHOP; case 6: // ETHTAG return ETHTAG; case 7: // ESI return ESI; case 8: // MACADDRESS return MACADDRESS; case 9: // L3LABEL return L3LABEL; case 10: // L2LABEL return L2LABEL; case 11: // ROUTERMAC return ROUTERMAC; case 12: // AFI return AFI; 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 __PREFIXLEN_ISSET_ID = 0; private static final int __ETHTAG_ISSET_ID = 1; private static final int __L3LABEL_ISSET_ID = 2; private static final int __L2LABEL_ISSET_ID = 3; 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.P_TYPE, new org.apache.thrift.meta_data.FieldMetaData("p_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, protocol_type.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.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.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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.ETHTAG, new org.apache.thrift.meta_data.FieldMetaData("ethtag", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ESI, new org.apache.thrift.meta_data.FieldMetaData("esi", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MACADDRESS, new org.apache.thrift.meta_data.FieldMetaData("macaddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.L3LABEL, new org.apache.thrift.meta_data.FieldMetaData("l3label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.L2LABEL, new org.apache.thrift.meta_data.FieldMetaData("l2label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ROUTERMAC, new org.apache.thrift.meta_data.FieldMetaData("routermac", 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdatePushRoute_args.class, metaDataMap); } public onUpdatePushRoute_args() { } public onUpdatePushRoute_args( protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) { this(); this.p_type = p_type; this.rd = rd; this.prefix = prefix; this.prefixlen = prefixlen; setPrefixlenIsSet(true); this.nexthop = nexthop; this.ethtag = ethtag; setEthtagIsSet(true); this.esi = esi; this.macaddress = macaddress; this.l3label = l3label; setL3labelIsSet(true); this.l2label = l2label; setL2labelIsSet(true); this.routermac = routermac; this.afi = afi; } /** * Performs a deep copy on other. */ public onUpdatePushRoute_args(onUpdatePushRoute_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetP_type()) { this.p_type = other.p_type; } if (other.isSetRd()) { this.rd = other.rd; } if (other.isSetPrefix()) { this.prefix = other.prefix; } this.prefixlen = other.prefixlen; if (other.isSetNexthop()) { this.nexthop = other.nexthop; } this.ethtag = other.ethtag; if (other.isSetEsi()) { this.esi = other.esi; } if (other.isSetMacaddress()) { this.macaddress = other.macaddress; } this.l3label = other.l3label; this.l2label = other.l2label; if (other.isSetRoutermac()) { this.routermac = other.routermac; } if (other.isSetAfi()) { this.afi = other.afi; } } public onUpdatePushRoute_args deepCopy() { return new onUpdatePushRoute_args(this); } @Override public void clear() { this.p_type = null; this.rd = null; this.prefix = null; setPrefixlenIsSet(false); this.prefixlen = 0; this.nexthop = null; setEthtagIsSet(false); this.ethtag = 0; this.esi = null; this.macaddress = null; setL3labelIsSet(false); this.l3label = 0; setL2labelIsSet(false); this.l2label = 0; this.routermac = null; this.afi = null; } /** * * @see protocol_type */ public protocol_type getP_type() { return this.p_type; } /** * * @see protocol_type */ public onUpdatePushRoute_args setP_type(protocol_type p_type) { this.p_type = p_type; return this; } public void unsetP_type() { this.p_type = null; } /** Returns true if field p_type is set (has been assigned a value) and false otherwise */ public boolean isSetP_type() { return this.p_type != null; } public void setP_typeIsSet(boolean value) { if (!value) { this.p_type = null; } } public String getRd() { return this.rd; } public onUpdatePushRoute_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 String getPrefix() { return this.prefix; } public onUpdatePushRoute_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 int getPrefixlen() { return this.prefixlen; } public onUpdatePushRoute_args setPrefixlen(int prefixlen) { this.prefixlen = prefixlen; setPrefixlenIsSet(true); return this; } public void unsetPrefixlen() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID); } /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */ public boolean isSetPrefixlen() { return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID); } public void setPrefixlenIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value); } public String getNexthop() { return this.nexthop; } public onUpdatePushRoute_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 int getEthtag() { return this.ethtag; } public onUpdatePushRoute_args setEthtag(int ethtag) { this.ethtag = ethtag; setEthtagIsSet(true); return this; } public void unsetEthtag() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ETHTAG_ISSET_ID); } /** Returns true if field ethtag is set (has been assigned a value) and false otherwise */ public boolean isSetEthtag() { return EncodingUtils.testBit(__isset_bitfield, __ETHTAG_ISSET_ID); } public void setEthtagIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ETHTAG_ISSET_ID, value); } public String getEsi() { return this.esi; } public onUpdatePushRoute_args setEsi(String esi) { this.esi = esi; return this; } public void unsetEsi() { this.esi = null; } /** Returns true if field esi is set (has been assigned a value) and false otherwise */ public boolean isSetEsi() { return this.esi != null; } public void setEsiIsSet(boolean value) { if (!value) { this.esi = null; } } public String getMacaddress() { return this.macaddress; } public onUpdatePushRoute_args setMacaddress(String macaddress) { this.macaddress = macaddress; return this; } public void unsetMacaddress() { this.macaddress = null; } /** Returns true if field macaddress is set (has been assigned a value) and false otherwise */ public boolean isSetMacaddress() { return this.macaddress != null; } public void setMacaddressIsSet(boolean value) { if (!value) { this.macaddress = null; } } public int getL3label() { return this.l3label; } public onUpdatePushRoute_args setL3label(int l3label) { this.l3label = l3label; setL3labelIsSet(true); return this; } public void unsetL3label() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __L3LABEL_ISSET_ID); } /** Returns true if field l3label is set (has been assigned a value) and false otherwise */ public boolean isSetL3label() { return EncodingUtils.testBit(__isset_bitfield, __L3LABEL_ISSET_ID); } public void setL3labelIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L3LABEL_ISSET_ID, value); } public int getL2label() { return this.l2label; } public onUpdatePushRoute_args setL2label(int l2label) { this.l2label = l2label; setL2labelIsSet(true); return this; } public void unsetL2label() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __L2LABEL_ISSET_ID); } /** Returns true if field l2label is set (has been assigned a value) and false otherwise */ public boolean isSetL2label() { return EncodingUtils.testBit(__isset_bitfield, __L2LABEL_ISSET_ID); } public void setL2labelIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L2LABEL_ISSET_ID, value); } public String getRoutermac() { return this.routermac; } public onUpdatePushRoute_args setRoutermac(String routermac) { this.routermac = routermac; return this; } public void unsetRoutermac() { this.routermac = null; } /** Returns true if field routermac is set (has been assigned a value) and false otherwise */ public boolean isSetRoutermac() { return this.routermac != null; } public void setRoutermacIsSet(boolean value) { if (!value) { this.routermac = null; } } /** * * @see af_afi */ public af_afi getAfi() { return this.afi; } /** * * @see af_afi */ public onUpdatePushRoute_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; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case P_TYPE: if (value == null) { unsetP_type(); } else { setP_type((protocol_type)value); } break; case RD: if (value == null) { unsetRd(); } else { setRd((String)value); } break; case PREFIX: if (value == null) { unsetPrefix(); } else { setPrefix((String)value); } break; case PREFIXLEN: if (value == null) { unsetPrefixlen(); } else { setPrefixlen((Integer)value); } break; case NEXTHOP: if (value == null) { unsetNexthop(); } else { setNexthop((String)value); } break; case ETHTAG: if (value == null) { unsetEthtag(); } else { setEthtag((Integer)value); } break; case ESI: if (value == null) { unsetEsi(); } else { setEsi((String)value); } break; case MACADDRESS: if (value == null) { unsetMacaddress(); } else { setMacaddress((String)value); } break; case L3LABEL: if (value == null) { unsetL3label(); } else { setL3label((Integer)value); } break; case L2LABEL: if (value == null) { unsetL2label(); } else { setL2label((Integer)value); } break; case ROUTERMAC: if (value == null) { unsetRoutermac(); } else { setRoutermac((String)value); } break; case AFI: if (value == null) { unsetAfi(); } else { setAfi((af_afi)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case P_TYPE: return getP_type(); case RD: return getRd(); case PREFIX: return getPrefix(); case PREFIXLEN: return Integer.valueOf(getPrefixlen()); case NEXTHOP: return getNexthop(); case ETHTAG: return Integer.valueOf(getEthtag()); case ESI: return getEsi(); case MACADDRESS: return getMacaddress(); case L3LABEL: return Integer.valueOf(getL3label()); case L2LABEL: return Integer.valueOf(getL2label()); case ROUTERMAC: return getRoutermac(); case AFI: return getAfi(); } 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 P_TYPE: return isSetP_type(); case RD: return isSetRd(); case PREFIX: return isSetPrefix(); case PREFIXLEN: return isSetPrefixlen(); case NEXTHOP: return isSetNexthop(); case ETHTAG: return isSetEthtag(); case ESI: return isSetEsi(); case MACADDRESS: return isSetMacaddress(); case L3LABEL: return isSetL3label(); case L2LABEL: return isSetL2label(); case ROUTERMAC: return isSetRoutermac(); case AFI: return isSetAfi(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof onUpdatePushRoute_args) return this.equals((onUpdatePushRoute_args)that); return false; } public boolean equals(onUpdatePushRoute_args that) { if (that == null) return false; boolean this_present_p_type = true && this.isSetP_type(); boolean that_present_p_type = true && that.isSetP_type(); if (this_present_p_type || that_present_p_type) { if (!(this_present_p_type && that_present_p_type)) return false; if (!this.p_type.equals(that.p_type)) 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_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_prefixlen = true; boolean that_present_prefixlen = true; if (this_present_prefixlen || that_present_prefixlen) { if (!(this_present_prefixlen && that_present_prefixlen)) return false; if (this.prefixlen != that.prefixlen) 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_ethtag = true; boolean that_present_ethtag = true; if (this_present_ethtag || that_present_ethtag) { if (!(this_present_ethtag && that_present_ethtag)) return false; if (this.ethtag != that.ethtag) return false; } boolean this_present_esi = true && this.isSetEsi(); boolean that_present_esi = true && that.isSetEsi(); if (this_present_esi || that_present_esi) { if (!(this_present_esi && that_present_esi)) return false; if (!this.esi.equals(that.esi)) return false; } boolean this_present_macaddress = true && this.isSetMacaddress(); boolean that_present_macaddress = true && that.isSetMacaddress(); if (this_present_macaddress || that_present_macaddress) { if (!(this_present_macaddress && that_present_macaddress)) return false; if (!this.macaddress.equals(that.macaddress)) return false; } boolean this_present_l3label = true; boolean that_present_l3label = true; if (this_present_l3label || that_present_l3label) { if (!(this_present_l3label && that_present_l3label)) return false; if (this.l3label != that.l3label) return false; } boolean this_present_l2label = true; boolean that_present_l2label = true; if (this_present_l2label || that_present_l2label) { if (!(this_present_l2label && that_present_l2label)) return false; if (this.l2label != that.l2label) return false; } boolean this_present_routermac = true && this.isSetRoutermac(); boolean that_present_routermac = true && that.isSetRoutermac(); if (this_present_routermac || that_present_routermac) { if (!(this_present_routermac && that_present_routermac)) return false; if (!this.routermac.equals(that.routermac)) 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; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(onUpdatePushRoute_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetP_type()).compareTo(other.isSetP_type()); if (lastComparison != 0) { return lastComparison; } if (isSetP_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.p_type, other.p_type); 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(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(isSetPrefixlen()).compareTo(other.isSetPrefixlen()); if (lastComparison != 0) { return lastComparison; } if (isSetPrefixlen()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen); 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(isSetEthtag()).compareTo(other.isSetEthtag()); if (lastComparison != 0) { return lastComparison; } if (isSetEthtag()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ethtag, other.ethtag); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEsi()).compareTo(other.isSetEsi()); if (lastComparison != 0) { return lastComparison; } if (isSetEsi()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.esi, other.esi); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMacaddress()).compareTo(other.isSetMacaddress()); if (lastComparison != 0) { return lastComparison; } if (isSetMacaddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.macaddress, other.macaddress); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetL3label()).compareTo(other.isSetL3label()); if (lastComparison != 0) { return lastComparison; } if (isSetL3label()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l3label, other.l3label); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetL2label()).compareTo(other.isSetL2label()); if (lastComparison != 0) { return lastComparison; } if (isSetL2label()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l2label, other.l2label); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRoutermac()).compareTo(other.isSetRoutermac()); if (lastComparison != 0) { return lastComparison; } if (isSetRoutermac()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routermac, other.routermac); 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; } } 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("onUpdatePushRoute_args("); boolean first = true; sb.append("p_type:"); if (this.p_type == null) { sb.append("null"); } else { sb.append(this.p_type); } 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("prefix:"); if (this.prefix == null) { sb.append("null"); } else { sb.append(this.prefix); } first = false; if (!first) sb.append(", "); sb.append("prefixlen:"); sb.append(this.prefixlen); 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("ethtag:"); sb.append(this.ethtag); first = false; if (!first) sb.append(", "); sb.append("esi:"); if (this.esi == null) { sb.append("null"); } else { sb.append(this.esi); } first = false; if (!first) sb.append(", "); sb.append("macaddress:"); if (this.macaddress == null) { sb.append("null"); } else { sb.append(this.macaddress); } first = false; if (!first) sb.append(", "); sb.append("l3label:"); sb.append(this.l3label); first = false; if (!first) sb.append(", "); sb.append("l2label:"); sb.append(this.l2label); first = false; if (!first) sb.append(", "); sb.append("routermac:"); if (this.routermac == null) { sb.append("null"); } else { sb.append(this.routermac); } first = false; if (!first) sb.append(", "); sb.append("afi:"); if (this.afi == null) { sb.append("null"); } else { sb.append(this.afi); } 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 onUpdatePushRoute_argsStandardSchemeFactory implements SchemeFactory { public onUpdatePushRoute_argsStandardScheme getScheme() { return new onUpdatePushRoute_argsStandardScheme(); } } private static class onUpdatePushRoute_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, onUpdatePushRoute_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: // P_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.p_type = protocol_type.findByValue(iprot.readI32()); struct.setP_typeIsSet(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; case 3: // 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 4: // PREFIXLEN if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.prefixlen = iprot.readI32(); struct.setPrefixlenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // 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 6: // ETHTAG if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.ethtag = iprot.readI32(); struct.setEthtagIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // ESI if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.esi = iprot.readString(); struct.setEsiIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // MACADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.macaddress = iprot.readString(); struct.setMacaddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // L3LABEL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.l3label = iprot.readI32(); struct.setL3labelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // L2LABEL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.l2label = iprot.readI32(); struct.setL2labelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // ROUTERMAC if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.routermac = iprot.readString(); struct.setRoutermacIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 12: // 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; 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, onUpdatePushRoute_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.p_type != null) { oprot.writeFieldBegin(P_TYPE_FIELD_DESC); oprot.writeI32(struct.p_type.getValue()); oprot.writeFieldEnd(); } if (struct.rd != null) { oprot.writeFieldBegin(RD_FIELD_DESC); oprot.writeString(struct.rd); oprot.writeFieldEnd(); } if (struct.prefix != null) { oprot.writeFieldBegin(PREFIX_FIELD_DESC); oprot.writeString(struct.prefix); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC); oprot.writeI32(struct.prefixlen); oprot.writeFieldEnd(); if (struct.nexthop != null) { oprot.writeFieldBegin(NEXTHOP_FIELD_DESC); oprot.writeString(struct.nexthop); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ETHTAG_FIELD_DESC); oprot.writeI32(struct.ethtag); oprot.writeFieldEnd(); if (struct.esi != null) { oprot.writeFieldBegin(ESI_FIELD_DESC); oprot.writeString(struct.esi); oprot.writeFieldEnd(); } if (struct.macaddress != null) { oprot.writeFieldBegin(MACADDRESS_FIELD_DESC); oprot.writeString(struct.macaddress); oprot.writeFieldEnd(); } oprot.writeFieldBegin(L3LABEL_FIELD_DESC); oprot.writeI32(struct.l3label); oprot.writeFieldEnd(); oprot.writeFieldBegin(L2LABEL_FIELD_DESC); oprot.writeI32(struct.l2label); oprot.writeFieldEnd(); if (struct.routermac != null) { oprot.writeFieldBegin(ROUTERMAC_FIELD_DESC); oprot.writeString(struct.routermac); oprot.writeFieldEnd(); } if (struct.afi != null) { oprot.writeFieldBegin(AFI_FIELD_DESC); oprot.writeI32(struct.afi.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class onUpdatePushRoute_argsTupleSchemeFactory implements SchemeFactory { public onUpdatePushRoute_argsTupleScheme getScheme() { return new onUpdatePushRoute_argsTupleScheme(); } } private static class onUpdatePushRoute_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetP_type()) { optionals.set(0); } if (struct.isSetRd()) { optionals.set(1); } if (struct.isSetPrefix()) { optionals.set(2); } if (struct.isSetPrefixlen()) { optionals.set(3); } if (struct.isSetNexthop()) { optionals.set(4); } if (struct.isSetEthtag()) { optionals.set(5); } if (struct.isSetEsi()) { optionals.set(6); } if (struct.isSetMacaddress()) { optionals.set(7); } if (struct.isSetL3label()) { optionals.set(8); } if (struct.isSetL2label()) { optionals.set(9); } if (struct.isSetRoutermac()) { optionals.set(10); } if (struct.isSetAfi()) { optionals.set(11); } oprot.writeBitSet(optionals, 12); if (struct.isSetP_type()) { oprot.writeI32(struct.p_type.getValue()); } if (struct.isSetRd()) { oprot.writeString(struct.rd); } if (struct.isSetPrefix()) { oprot.writeString(struct.prefix); } if (struct.isSetPrefixlen()) { oprot.writeI32(struct.prefixlen); } if (struct.isSetNexthop()) { oprot.writeString(struct.nexthop); } if (struct.isSetEthtag()) { oprot.writeI32(struct.ethtag); } if (struct.isSetEsi()) { oprot.writeString(struct.esi); } if (struct.isSetMacaddress()) { oprot.writeString(struct.macaddress); } if (struct.isSetL3label()) { oprot.writeI32(struct.l3label); } if (struct.isSetL2label()) { oprot.writeI32(struct.l2label); } if (struct.isSetRoutermac()) { oprot.writeString(struct.routermac); } if (struct.isSetAfi()) { oprot.writeI32(struct.afi.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(12); if (incoming.get(0)) { struct.p_type = protocol_type.findByValue(iprot.readI32()); struct.setP_typeIsSet(true); } if (incoming.get(1)) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } if (incoming.get(2)) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } if (incoming.get(3)) { struct.prefixlen = iprot.readI32(); struct.setPrefixlenIsSet(true); } if (incoming.get(4)) { struct.nexthop = iprot.readString(); struct.setNexthopIsSet(true); } if (incoming.get(5)) { struct.ethtag = iprot.readI32(); struct.setEthtagIsSet(true); } if (incoming.get(6)) { struct.esi = iprot.readString(); struct.setEsiIsSet(true); } if (incoming.get(7)) { struct.macaddress = iprot.readString(); struct.setMacaddressIsSet(true); } if (incoming.get(8)) { struct.l3label = iprot.readI32(); struct.setL3labelIsSet(true); } if (incoming.get(9)) { struct.l2label = iprot.readI32(); struct.setL2labelIsSet(true); } if (incoming.get(10)) { struct.routermac = iprot.readString(); struct.setRoutermacIsSet(true); } if (incoming.get(11)) { struct.afi = af_afi.findByValue(iprot.readI32()); struct.setAfiIsSet(true); } } } } public static class onUpdateWithdrawRoute_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("onUpdateWithdrawRoute_args"); private static final org.apache.thrift.protocol.TField P_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("p_type", org.apache.thrift.protocol.TType.I32, (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 org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", org.apache.thrift.protocol.TType.I32, (short)4); 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)5); private static final org.apache.thrift.protocol.TField ETHTAG_FIELD_DESC = new org.apache.thrift.protocol.TField("ethtag", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField ESI_FIELD_DESC = new org.apache.thrift.protocol.TField("esi", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.protocol.TField MACADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("macaddress", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.protocol.TField L3LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l3label", org.apache.thrift.protocol.TType.I32, (short)9); private static final org.apache.thrift.protocol.TField L2LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2label", org.apache.thrift.protocol.TType.I32, (short)10); 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)11); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new onUpdateWithdrawRoute_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new onUpdateWithdrawRoute_argsTupleSchemeFactory()); } /** * * @see protocol_type */ public protocol_type p_type; // required public String rd; // required public String prefix; // required public int prefixlen; // required public String nexthop; // required public int ethtag; // required public String esi; // required public String macaddress; // required public int l3label; // required public int l2label; // required /** * * @see af_afi */ public af_afi afi; // 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 { /** * * @see protocol_type */ P_TYPE((short)1, "p_type"), RD((short)2, "rd"), PREFIX((short)3, "prefix"), PREFIXLEN((short)4, "prefixlen"), NEXTHOP((short)5, "nexthop"), ETHTAG((short)6, "ethtag"), ESI((short)7, "esi"), MACADDRESS((short)8, "macaddress"), L3LABEL((short)9, "l3label"), L2LABEL((short)10, "l2label"), /** * * @see af_afi */ AFI((short)11, "afi"); 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: // P_TYPE return P_TYPE; case 2: // RD return RD; case 3: // PREFIX return PREFIX; case 4: // PREFIXLEN return PREFIXLEN; case 5: // NEXTHOP return NEXTHOP; case 6: // ETHTAG return ETHTAG; case 7: // ESI return ESI; case 8: // MACADDRESS return MACADDRESS; case 9: // L3LABEL return L3LABEL; case 10: // L2LABEL return L2LABEL; case 11: // AFI return AFI; 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 __PREFIXLEN_ISSET_ID = 0; private static final int __ETHTAG_ISSET_ID = 1; private static final int __L3LABEL_ISSET_ID = 2; private static final int __L2LABEL_ISSET_ID = 3; 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.P_TYPE, new org.apache.thrift.meta_data.FieldMetaData("p_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, protocol_type.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.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.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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.ETHTAG, new org.apache.thrift.meta_data.FieldMetaData("ethtag", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ESI, new org.apache.thrift.meta_data.FieldMetaData("esi", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MACADDRESS, new org.apache.thrift.meta_data.FieldMetaData("macaddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.L3LABEL, new org.apache.thrift.meta_data.FieldMetaData("l3label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.L2LABEL, new org.apache.thrift.meta_data.FieldMetaData("l2label", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdateWithdrawRoute_args.class, metaDataMap); } public onUpdateWithdrawRoute_args() { } public onUpdateWithdrawRoute_args( protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) { this(); this.p_type = p_type; this.rd = rd; this.prefix = prefix; this.prefixlen = prefixlen; setPrefixlenIsSet(true); this.nexthop = nexthop; this.ethtag = ethtag; setEthtagIsSet(true); this.esi = esi; this.macaddress = macaddress; this.l3label = l3label; setL3labelIsSet(true); this.l2label = l2label; setL2labelIsSet(true); this.afi = afi; } /** * Performs a deep copy on other. */ public onUpdateWithdrawRoute_args(onUpdateWithdrawRoute_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetP_type()) { this.p_type = other.p_type; } if (other.isSetRd()) { this.rd = other.rd; } if (other.isSetPrefix()) { this.prefix = other.prefix; } this.prefixlen = other.prefixlen; if (other.isSetNexthop()) { this.nexthop = other.nexthop; } this.ethtag = other.ethtag; if (other.isSetEsi()) { this.esi = other.esi; } if (other.isSetMacaddress()) { this.macaddress = other.macaddress; } this.l3label = other.l3label; this.l2label = other.l2label; if (other.isSetAfi()) { this.afi = other.afi; } } public onUpdateWithdrawRoute_args deepCopy() { return new onUpdateWithdrawRoute_args(this); } @Override public void clear() { this.p_type = null; this.rd = null; this.prefix = null; setPrefixlenIsSet(false); this.prefixlen = 0; this.nexthop = null; setEthtagIsSet(false); this.ethtag = 0; this.esi = null; this.macaddress = null; setL3labelIsSet(false); this.l3label = 0; setL2labelIsSet(false); this.l2label = 0; this.afi = null; } /** * * @see protocol_type */ public protocol_type getP_type() { return this.p_type; } /** * * @see protocol_type */ public onUpdateWithdrawRoute_args setP_type(protocol_type p_type) { this.p_type = p_type; return this; } public void unsetP_type() { this.p_type = null; } /** Returns true if field p_type is set (has been assigned a value) and false otherwise */ public boolean isSetP_type() { return this.p_type != null; } public void setP_typeIsSet(boolean value) { if (!value) { this.p_type = null; } } public String getRd() { return this.rd; } public onUpdateWithdrawRoute_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 String getPrefix() { return this.prefix; } public onUpdateWithdrawRoute_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 int getPrefixlen() { return this.prefixlen; } public onUpdateWithdrawRoute_args setPrefixlen(int prefixlen) { this.prefixlen = prefixlen; setPrefixlenIsSet(true); return this; } public void unsetPrefixlen() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID); } /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */ public boolean isSetPrefixlen() { return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID); } public void setPrefixlenIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value); } public String getNexthop() { return this.nexthop; } public onUpdateWithdrawRoute_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 int getEthtag() { return this.ethtag; } public onUpdateWithdrawRoute_args setEthtag(int ethtag) { this.ethtag = ethtag; setEthtagIsSet(true); return this; } public void unsetEthtag() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ETHTAG_ISSET_ID); } /** Returns true if field ethtag is set (has been assigned a value) and false otherwise */ public boolean isSetEthtag() { return EncodingUtils.testBit(__isset_bitfield, __ETHTAG_ISSET_ID); } public void setEthtagIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ETHTAG_ISSET_ID, value); } public String getEsi() { return this.esi; } public onUpdateWithdrawRoute_args setEsi(String esi) { this.esi = esi; return this; } public void unsetEsi() { this.esi = null; } /** Returns true if field esi is set (has been assigned a value) and false otherwise */ public boolean isSetEsi() { return this.esi != null; } public void setEsiIsSet(boolean value) { if (!value) { this.esi = null; } } public String getMacaddress() { return this.macaddress; } public onUpdateWithdrawRoute_args setMacaddress(String macaddress) { this.macaddress = macaddress; return this; } public void unsetMacaddress() { this.macaddress = null; } /** Returns true if field macaddress is set (has been assigned a value) and false otherwise */ public boolean isSetMacaddress() { return this.macaddress != null; } public void setMacaddressIsSet(boolean value) { if (!value) { this.macaddress = null; } } public int getL3label() { return this.l3label; } public onUpdateWithdrawRoute_args setL3label(int l3label) { this.l3label = l3label; setL3labelIsSet(true); return this; } public void unsetL3label() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __L3LABEL_ISSET_ID); } /** Returns true if field l3label is set (has been assigned a value) and false otherwise */ public boolean isSetL3label() { return EncodingUtils.testBit(__isset_bitfield, __L3LABEL_ISSET_ID); } public void setL3labelIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L3LABEL_ISSET_ID, value); } public int getL2label() { return this.l2label; } public onUpdateWithdrawRoute_args setL2label(int l2label) { this.l2label = l2label; setL2labelIsSet(true); return this; } public void unsetL2label() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __L2LABEL_ISSET_ID); } /** Returns true if field l2label is set (has been assigned a value) and false otherwise */ public boolean isSetL2label() { return EncodingUtils.testBit(__isset_bitfield, __L2LABEL_ISSET_ID); } public void setL2labelIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L2LABEL_ISSET_ID, value); } /** * * @see af_afi */ public af_afi getAfi() { return this.afi; } /** * * @see af_afi */ public onUpdateWithdrawRoute_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; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case P_TYPE: if (value == null) { unsetP_type(); } else { setP_type((protocol_type)value); } break; case RD: if (value == null) { unsetRd(); } else { setRd((String)value); } break; case PREFIX: if (value == null) { unsetPrefix(); } else { setPrefix((String)value); } break; case PREFIXLEN: if (value == null) { unsetPrefixlen(); } else { setPrefixlen((Integer)value); } break; case NEXTHOP: if (value == null) { unsetNexthop(); } else { setNexthop((String)value); } break; case ETHTAG: if (value == null) { unsetEthtag(); } else { setEthtag((Integer)value); } break; case ESI: if (value == null) { unsetEsi(); } else { setEsi((String)value); } break; case MACADDRESS: if (value == null) { unsetMacaddress(); } else { setMacaddress((String)value); } break; case L3LABEL: if (value == null) { unsetL3label(); } else { setL3label((Integer)value); } break; case L2LABEL: if (value == null) { unsetL2label(); } else { setL2label((Integer)value); } break; case AFI: if (value == null) { unsetAfi(); } else { setAfi((af_afi)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case P_TYPE: return getP_type(); case RD: return getRd(); case PREFIX: return getPrefix(); case PREFIXLEN: return Integer.valueOf(getPrefixlen()); case NEXTHOP: return getNexthop(); case ETHTAG: return Integer.valueOf(getEthtag()); case ESI: return getEsi(); case MACADDRESS: return getMacaddress(); case L3LABEL: return Integer.valueOf(getL3label()); case L2LABEL: return Integer.valueOf(getL2label()); case AFI: return getAfi(); } 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 P_TYPE: return isSetP_type(); case RD: return isSetRd(); case PREFIX: return isSetPrefix(); case PREFIXLEN: return isSetPrefixlen(); case NEXTHOP: return isSetNexthop(); case ETHTAG: return isSetEthtag(); case ESI: return isSetEsi(); case MACADDRESS: return isSetMacaddress(); case L3LABEL: return isSetL3label(); case L2LABEL: return isSetL2label(); case AFI: return isSetAfi(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof onUpdateWithdrawRoute_args) return this.equals((onUpdateWithdrawRoute_args)that); return false; } public boolean equals(onUpdateWithdrawRoute_args that) { if (that == null) return false; boolean this_present_p_type = true && this.isSetP_type(); boolean that_present_p_type = true && that.isSetP_type(); if (this_present_p_type || that_present_p_type) { if (!(this_present_p_type && that_present_p_type)) return false; if (!this.p_type.equals(that.p_type)) 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_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_prefixlen = true; boolean that_present_prefixlen = true; if (this_present_prefixlen || that_present_prefixlen) { if (!(this_present_prefixlen && that_present_prefixlen)) return false; if (this.prefixlen != that.prefixlen) 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_ethtag = true; boolean that_present_ethtag = true; if (this_present_ethtag || that_present_ethtag) { if (!(this_present_ethtag && that_present_ethtag)) return false; if (this.ethtag != that.ethtag) return false; } boolean this_present_esi = true && this.isSetEsi(); boolean that_present_esi = true && that.isSetEsi(); if (this_present_esi || that_present_esi) { if (!(this_present_esi && that_present_esi)) return false; if (!this.esi.equals(that.esi)) return false; } boolean this_present_macaddress = true && this.isSetMacaddress(); boolean that_present_macaddress = true && that.isSetMacaddress(); if (this_present_macaddress || that_present_macaddress) { if (!(this_present_macaddress && that_present_macaddress)) return false; if (!this.macaddress.equals(that.macaddress)) return false; } boolean this_present_l3label = true; boolean that_present_l3label = true; if (this_present_l3label || that_present_l3label) { if (!(this_present_l3label && that_present_l3label)) return false; if (this.l3label != that.l3label) return false; } boolean this_present_l2label = true; boolean that_present_l2label = true; if (this_present_l2label || that_present_l2label) { if (!(this_present_l2label && that_present_l2label)) return false; if (this.l2label != that.l2label) 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; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(onUpdateWithdrawRoute_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetP_type()).compareTo(other.isSetP_type()); if (lastComparison != 0) { return lastComparison; } if (isSetP_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.p_type, other.p_type); 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(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(isSetPrefixlen()).compareTo(other.isSetPrefixlen()); if (lastComparison != 0) { return lastComparison; } if (isSetPrefixlen()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen); 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(isSetEthtag()).compareTo(other.isSetEthtag()); if (lastComparison != 0) { return lastComparison; } if (isSetEthtag()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ethtag, other.ethtag); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEsi()).compareTo(other.isSetEsi()); if (lastComparison != 0) { return lastComparison; } if (isSetEsi()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.esi, other.esi); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMacaddress()).compareTo(other.isSetMacaddress()); if (lastComparison != 0) { return lastComparison; } if (isSetMacaddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.macaddress, other.macaddress); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetL3label()).compareTo(other.isSetL3label()); if (lastComparison != 0) { return lastComparison; } if (isSetL3label()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l3label, other.l3label); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetL2label()).compareTo(other.isSetL2label()); if (lastComparison != 0) { return lastComparison; } if (isSetL2label()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l2label, other.l2label); 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; } } 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("onUpdateWithdrawRoute_args("); boolean first = true; sb.append("p_type:"); if (this.p_type == null) { sb.append("null"); } else { sb.append(this.p_type); } 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("prefix:"); if (this.prefix == null) { sb.append("null"); } else { sb.append(this.prefix); } first = false; if (!first) sb.append(", "); sb.append("prefixlen:"); sb.append(this.prefixlen); 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("ethtag:"); sb.append(this.ethtag); first = false; if (!first) sb.append(", "); sb.append("esi:"); if (this.esi == null) { sb.append("null"); } else { sb.append(this.esi); } first = false; if (!first) sb.append(", "); sb.append("macaddress:"); if (this.macaddress == null) { sb.append("null"); } else { sb.append(this.macaddress); } first = false; if (!first) sb.append(", "); sb.append("l3label:"); sb.append(this.l3label); first = false; if (!first) sb.append(", "); sb.append("l2label:"); sb.append(this.l2label); first = false; if (!first) sb.append(", "); sb.append("afi:"); if (this.afi == null) { sb.append("null"); } else { sb.append(this.afi); } 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 onUpdateWithdrawRoute_argsStandardSchemeFactory implements SchemeFactory { public onUpdateWithdrawRoute_argsStandardScheme getScheme() { return new onUpdateWithdrawRoute_argsStandardScheme(); } } private static class onUpdateWithdrawRoute_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, onUpdateWithdrawRoute_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: // P_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.p_type = protocol_type.findByValue(iprot.readI32()); struct.setP_typeIsSet(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; case 3: // 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 4: // PREFIXLEN if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.prefixlen = iprot.readI32(); struct.setPrefixlenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // 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 6: // ETHTAG if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.ethtag = iprot.readI32(); struct.setEthtagIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // ESI if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.esi = iprot.readString(); struct.setEsiIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // MACADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.macaddress = iprot.readString(); struct.setMacaddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // L3LABEL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.l3label = iprot.readI32(); struct.setL3labelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // L2LABEL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.l2label = iprot.readI32(); struct.setL2labelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // 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; 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, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.p_type != null) { oprot.writeFieldBegin(P_TYPE_FIELD_DESC); oprot.writeI32(struct.p_type.getValue()); oprot.writeFieldEnd(); } if (struct.rd != null) { oprot.writeFieldBegin(RD_FIELD_DESC); oprot.writeString(struct.rd); oprot.writeFieldEnd(); } if (struct.prefix != null) { oprot.writeFieldBegin(PREFIX_FIELD_DESC); oprot.writeString(struct.prefix); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC); oprot.writeI32(struct.prefixlen); oprot.writeFieldEnd(); if (struct.nexthop != null) { oprot.writeFieldBegin(NEXTHOP_FIELD_DESC); oprot.writeString(struct.nexthop); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ETHTAG_FIELD_DESC); oprot.writeI32(struct.ethtag); oprot.writeFieldEnd(); if (struct.esi != null) { oprot.writeFieldBegin(ESI_FIELD_DESC); oprot.writeString(struct.esi); oprot.writeFieldEnd(); } if (struct.macaddress != null) { oprot.writeFieldBegin(MACADDRESS_FIELD_DESC); oprot.writeString(struct.macaddress); oprot.writeFieldEnd(); } oprot.writeFieldBegin(L3LABEL_FIELD_DESC); oprot.writeI32(struct.l3label); oprot.writeFieldEnd(); oprot.writeFieldBegin(L2LABEL_FIELD_DESC); oprot.writeI32(struct.l2label); oprot.writeFieldEnd(); if (struct.afi != null) { oprot.writeFieldBegin(AFI_FIELD_DESC); oprot.writeI32(struct.afi.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class onUpdateWithdrawRoute_argsTupleSchemeFactory implements SchemeFactory { public onUpdateWithdrawRoute_argsTupleScheme getScheme() { return new onUpdateWithdrawRoute_argsTupleScheme(); } } private static class onUpdateWithdrawRoute_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetP_type()) { optionals.set(0); } if (struct.isSetRd()) { optionals.set(1); } if (struct.isSetPrefix()) { optionals.set(2); } if (struct.isSetPrefixlen()) { optionals.set(3); } if (struct.isSetNexthop()) { optionals.set(4); } if (struct.isSetEthtag()) { optionals.set(5); } if (struct.isSetEsi()) { optionals.set(6); } if (struct.isSetMacaddress()) { optionals.set(7); } if (struct.isSetL3label()) { optionals.set(8); } if (struct.isSetL2label()) { optionals.set(9); } if (struct.isSetAfi()) { optionals.set(10); } oprot.writeBitSet(optionals, 11); if (struct.isSetP_type()) { oprot.writeI32(struct.p_type.getValue()); } if (struct.isSetRd()) { oprot.writeString(struct.rd); } if (struct.isSetPrefix()) { oprot.writeString(struct.prefix); } if (struct.isSetPrefixlen()) { oprot.writeI32(struct.prefixlen); } if (struct.isSetNexthop()) { oprot.writeString(struct.nexthop); } if (struct.isSetEthtag()) { oprot.writeI32(struct.ethtag); } if (struct.isSetEsi()) { oprot.writeString(struct.esi); } if (struct.isSetMacaddress()) { oprot.writeString(struct.macaddress); } if (struct.isSetL3label()) { oprot.writeI32(struct.l3label); } if (struct.isSetL2label()) { oprot.writeI32(struct.l2label); } if (struct.isSetAfi()) { oprot.writeI32(struct.afi.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(11); if (incoming.get(0)) { struct.p_type = protocol_type.findByValue(iprot.readI32()); struct.setP_typeIsSet(true); } if (incoming.get(1)) { struct.rd = iprot.readString(); struct.setRdIsSet(true); } if (incoming.get(2)) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } if (incoming.get(3)) { struct.prefixlen = iprot.readI32(); struct.setPrefixlenIsSet(true); } if (incoming.get(4)) { struct.nexthop = iprot.readString(); struct.setNexthopIsSet(true); } if (incoming.get(5)) { struct.ethtag = iprot.readI32(); struct.setEthtagIsSet(true); } if (incoming.get(6)) { struct.esi = iprot.readString(); struct.setEsiIsSet(true); } if (incoming.get(7)) { struct.macaddress = iprot.readString(); struct.setMacaddressIsSet(true); } if (incoming.get(8)) { struct.l3label = iprot.readI32(); struct.setL3labelIsSet(true); } if (incoming.get(9)) { struct.l2label = iprot.readI32(); struct.setL2labelIsSet(true); } if (incoming.get(10)) { struct.afi = af_afi.findByValue(iprot.readI32()); struct.setAfiIsSet(true); } } } } public static class onStartConfigResyncNotification_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("onStartConfigResyncNotification_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new onStartConfigResyncNotification_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new onStartConfigResyncNotification_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(onStartConfigResyncNotification_args.class, metaDataMap); } public onStartConfigResyncNotification_args() { } /** * Performs a deep copy on other. */ public onStartConfigResyncNotification_args(onStartConfigResyncNotification_args other) { } public onStartConfigResyncNotification_args deepCopy() { return new onStartConfigResyncNotification_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 onStartConfigResyncNotification_args) return this.equals((onStartConfigResyncNotification_args)that); return false; } public boolean equals(onStartConfigResyncNotification_args that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(onStartConfigResyncNotification_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("onStartConfigResyncNotification_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 onStartConfigResyncNotification_argsStandardSchemeFactory implements SchemeFactory { public onStartConfigResyncNotification_argsStandardScheme getScheme() { return new onStartConfigResyncNotification_argsStandardScheme(); } } private static class onStartConfigResyncNotification_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, onStartConfigResyncNotification_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, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class onStartConfigResyncNotification_argsTupleSchemeFactory implements SchemeFactory { public onStartConfigResyncNotification_argsTupleScheme getScheme() { return new onStartConfigResyncNotification_argsTupleScheme(); } } private static class onStartConfigResyncNotification_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class onNotificationSendEvent_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("onNotificationSendEvent_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 ERR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errCode", org.apache.thrift.protocol.TType.BYTE, (short)2); private static final org.apache.thrift.protocol.TField ERR_SUBCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errSubcode", org.apache.thrift.protocol.TType.BYTE, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new onNotificationSendEvent_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new onNotificationSendEvent_argsTupleSchemeFactory()); } public String prefix; // required public byte errCode; // required public byte errSubcode; // 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"), ERR_CODE((short)2, "errCode"), ERR_SUBCODE((short)3, "errSubcode"); 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: // ERR_CODE return ERR_CODE; case 3: // ERR_SUBCODE return ERR_SUBCODE; 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 __ERRCODE_ISSET_ID = 0; private static final int __ERRSUBCODE_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.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.ERR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errCode", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); tmpMap.put(_Fields.ERR_SUBCODE, new org.apache.thrift.meta_data.FieldMetaData("errSubcode", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onNotificationSendEvent_args.class, metaDataMap); } public onNotificationSendEvent_args() { } public onNotificationSendEvent_args( String prefix, byte errCode, byte errSubcode) { this(); this.prefix = prefix; this.errCode = errCode; setErrCodeIsSet(true); this.errSubcode = errSubcode; setErrSubcodeIsSet(true); } /** * Performs a deep copy on other. */ public onNotificationSendEvent_args(onNotificationSendEvent_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPrefix()) { this.prefix = other.prefix; } this.errCode = other.errCode; this.errSubcode = other.errSubcode; } public onNotificationSendEvent_args deepCopy() { return new onNotificationSendEvent_args(this); } @Override public void clear() { this.prefix = null; setErrCodeIsSet(false); this.errCode = 0; setErrSubcodeIsSet(false); this.errSubcode = 0; } public String getPrefix() { return this.prefix; } public onNotificationSendEvent_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 byte getErrCode() { return this.errCode; } public onNotificationSendEvent_args setErrCode(byte errCode) { this.errCode = errCode; setErrCodeIsSet(true); return this; } public void unsetErrCode() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRCODE_ISSET_ID); } /** Returns true if field errCode is set (has been assigned a value) and false otherwise */ public boolean isSetErrCode() { return EncodingUtils.testBit(__isset_bitfield, __ERRCODE_ISSET_ID); } public void setErrCodeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRCODE_ISSET_ID, value); } public byte getErrSubcode() { return this.errSubcode; } public onNotificationSendEvent_args setErrSubcode(byte errSubcode) { this.errSubcode = errSubcode; setErrSubcodeIsSet(true); return this; } public void unsetErrSubcode() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRSUBCODE_ISSET_ID); } /** Returns true if field errSubcode is set (has been assigned a value) and false otherwise */ public boolean isSetErrSubcode() { return EncodingUtils.testBit(__isset_bitfield, __ERRSUBCODE_ISSET_ID); } public void setErrSubcodeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRSUBCODE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case PREFIX: if (value == null) { unsetPrefix(); } else { setPrefix((String)value); } break; case ERR_CODE: if (value == null) { unsetErrCode(); } else { setErrCode((Byte)value); } break; case ERR_SUBCODE: if (value == null) { unsetErrSubcode(); } else { setErrSubcode((Byte)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PREFIX: return getPrefix(); case ERR_CODE: return Byte.valueOf(getErrCode()); case ERR_SUBCODE: return Byte.valueOf(getErrSubcode()); } 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 ERR_CODE: return isSetErrCode(); case ERR_SUBCODE: return isSetErrSubcode(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof onNotificationSendEvent_args) return this.equals((onNotificationSendEvent_args)that); return false; } public boolean equals(onNotificationSendEvent_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_errCode = true; boolean that_present_errCode = true; if (this_present_errCode || that_present_errCode) { if (!(this_present_errCode && that_present_errCode)) return false; if (this.errCode != that.errCode) return false; } boolean this_present_errSubcode = true; boolean that_present_errSubcode = true; if (this_present_errSubcode || that_present_errSubcode) { if (!(this_present_errSubcode && that_present_errSubcode)) return false; if (this.errSubcode != that.errSubcode) return false; } return true; } @Override public int hashCode() { return 0; } @Override public int compareTo(onNotificationSendEvent_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(isSetErrCode()).compareTo(other.isSetErrCode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errCode, other.errCode); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetErrSubcode()).compareTo(other.isSetErrSubcode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrSubcode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errSubcode, other.errSubcode); 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("onNotificationSendEvent_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("errCode:"); sb.append(this.errCode); first = false; if (!first) sb.append(", "); sb.append("errSubcode:"); sb.append(this.errSubcode); 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 onNotificationSendEvent_argsStandardSchemeFactory implements SchemeFactory { public onNotificationSendEvent_argsStandardScheme getScheme() { return new onNotificationSendEvent_argsStandardScheme(); } } private static class onNotificationSendEvent_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, onNotificationSendEvent_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: // ERR_CODE if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { struct.errCode = iprot.readByte(); struct.setErrCodeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ERR_SUBCODE if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { struct.errSubcode = iprot.readByte(); struct.setErrSubcodeIsSet(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, onNotificationSendEvent_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(); } oprot.writeFieldBegin(ERR_CODE_FIELD_DESC); oprot.writeByte(struct.errCode); oprot.writeFieldEnd(); oprot.writeFieldBegin(ERR_SUBCODE_FIELD_DESC); oprot.writeByte(struct.errSubcode); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class onNotificationSendEvent_argsTupleSchemeFactory implements SchemeFactory { public onNotificationSendEvent_argsTupleScheme getScheme() { return new onNotificationSendEvent_argsTupleScheme(); } } private static class onNotificationSendEvent_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, onNotificationSendEvent_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrefix()) { optionals.set(0); } if (struct.isSetErrCode()) { optionals.set(1); } if (struct.isSetErrSubcode()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetPrefix()) { oprot.writeString(struct.prefix); } if (struct.isSetErrCode()) { oprot.writeByte(struct.errCode); } if (struct.isSetErrSubcode()) { oprot.writeByte(struct.errSubcode); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, onNotificationSendEvent_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.prefix = iprot.readString(); struct.setPrefixIsSet(true); } if (incoming.get(1)) { struct.errCode = iprot.readByte(); struct.setErrCodeIsSet(true); } if (incoming.get(2)) { struct.errSubcode = iprot.readByte(); struct.setErrSubcodeIsSet(true); } } } } }