--- /dev/null
+/**
+ * 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.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(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException;
+
+ public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException;
+
+ public void onStartConfigResyncNotification() throws org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen, 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 static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ 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(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException
+ {
+ send_onUpdatePushRoute(rd, prefix, prefixlen, nexthop, label);
+ }
+
+ public void send_onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException
+ {
+ onUpdatePushRoute_args args = new onUpdatePushRoute_args();
+ args.setRd(rd);
+ args.setPrefix(prefix);
+ args.setPrefixlen(prefixlen);
+ args.setNexthop(nexthop);
+ args.setLabel(label);
+ sendBase("onUpdatePushRoute", args);
+ }
+
+ public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException
+ {
+ send_onUpdateWithdrawRoute(rd, prefix, prefixlen);
+ }
+
+ public void send_onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException
+ {
+ onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args();
+ args.setRd(rd);
+ args.setPrefix(prefix);
+ args.setPrefixlen(prefixlen);
+ 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 static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ 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(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ onUpdatePushRoute_call method_call = new onUpdatePushRoute_call(rd, prefix, prefixlen, nexthop, label, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class onUpdatePushRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String rd;
+ private String prefix;
+ private int prefixlen;
+ private String nexthop;
+ private int label;
+ public onUpdatePushRoute_call(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, true);
+ this.rd = rd;
+ this.prefix = prefix;
+ this.prefixlen = prefixlen;
+ this.nexthop = nexthop;
+ this.label = label;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdatePushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ onUpdatePushRoute_args args = new onUpdatePushRoute_args();
+ args.setRd(rd);
+ args.setPrefix(prefix);
+ args.setPrefixlen(prefixlen);
+ args.setNexthop(nexthop);
+ args.setLabel(label);
+ 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(String rd, String prefix, int prefixlen, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ onUpdateWithdrawRoute_call method_call = new onUpdateWithdrawRoute_call(rd, prefix, prefixlen, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class onUpdateWithdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String rd;
+ private String prefix;
+ private int prefixlen;
+ public onUpdateWithdrawRoute_call(String rd, String prefix, int prefixlen, 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.rd = rd;
+ this.prefix = prefix;
+ this.prefixlen = prefixlen;
+ }
+
+ 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.setRd(rd);
+ args.setPrefix(prefix);
+ args.setPrefixlen(prefixlen);
+ 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 static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("onUpdatePushRoute", new onUpdatePushRoute());
+ processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
+ processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
+ return processMap;
+ }
+
+ public static class onUpdatePushRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onUpdatePushRoute_args> {
+ 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.rd, args.prefix, args.prefixlen, args.nexthop, args.label);
+ return null;
+ }
+ }
+
+ public static class onUpdateWithdrawRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onUpdateWithdrawRoute_args> {
+ 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.rd, args.prefix, args.prefixlen);
+ return null;
+ }
+ }
+
+ public static class onStartConfigResyncNotification<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onStartConfigResyncNotification_args> {
+ 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 AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("onUpdatePushRoute", new onUpdatePushRoute());
+ processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
+ processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
+ return processMap;
+ }
+
+ public static class onUpdatePushRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onUpdatePushRoute_args, Void> {
+ public onUpdatePushRoute() {
+ super("onUpdatePushRoute");
+ }
+
+ public onUpdatePushRoute_args getEmptyArgsInstance() {
+ return new onUpdatePushRoute_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ 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<Void> resultHandler) throws TException {
+ iface.onUpdatePushRoute(args.rd, args.prefix, args.prefixlen, args.nexthop, args.label,resultHandler);
+ }
+ }
+
+ public static class onUpdateWithdrawRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onUpdateWithdrawRoute_args, Void> {
+ public onUpdateWithdrawRoute() {
+ super("onUpdateWithdrawRoute");
+ }
+
+ public onUpdateWithdrawRoute_args getEmptyArgsInstance() {
+ return new onUpdateWithdrawRoute_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ 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<Void> resultHandler) throws TException {
+ iface.onUpdateWithdrawRoute(args.rd, args.prefix, args.prefixlen,resultHandler);
+ }
+ }
+
+ public static class onStartConfigResyncNotification<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onStartConfigResyncNotification_args, Void> {
+ public onStartConfigResyncNotification() {
+ super("onStartConfigResyncNotification");
+ }
+
+ public onStartConfigResyncNotification_args getEmptyArgsInstance() {
+ return new onStartConfigResyncNotification_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ 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<Void> resultHandler) throws TException {
+ iface.onStartConfigResyncNotification(resultHandler);
+ }
+ }
+
+ }
+
+ public static class onUpdatePushRoute_args implements org.apache.thrift.TBase<onUpdatePushRoute_args, onUpdatePushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdatePushRoute_args> {
+ 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 RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)2);
+ 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)3);
+ 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)4);
+ private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new onUpdatePushRoute_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new onUpdatePushRoute_argsTupleSchemeFactory());
+ }
+
+ public String rd; // required
+ public String prefix; // required
+ public int prefixlen; // required
+ public String nexthop; // required
+ public int label; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RD((short)1, "rd"),
+ PREFIX((short)2, "prefix"),
+ PREFIXLEN((short)3, "prefixlen"),
+ NEXTHOP((short)4, "nexthop"),
+ LABEL((short)5, "label");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RD
+ return RD;
+ case 2: // PREFIX
+ return PREFIX;
+ case 3: // PREFIXLEN
+ return PREFIXLEN;
+ case 4: // NEXTHOP
+ return NEXTHOP;
+ case 5: // LABEL
+ return LABEL;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __PREFIXLEN_ISSET_ID = 0;
+ private static final int __LABEL_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.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.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdatePushRoute_args.class, metaDataMap);
+ }
+
+ public onUpdatePushRoute_args() {
+ }
+
+ public onUpdatePushRoute_args(
+ String rd,
+ String prefix,
+ int prefixlen,
+ String nexthop,
+ int label)
+ {
+ this();
+ this.rd = rd;
+ this.prefix = prefix;
+ this.prefixlen = prefixlen;
+ setPrefixlenIsSet(true);
+ this.nexthop = nexthop;
+ this.label = label;
+ setLabelIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public onUpdatePushRoute_args(onUpdatePushRoute_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ 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.label = other.label;
+ }
+
+ public onUpdatePushRoute_args deepCopy() {
+ return new onUpdatePushRoute_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.rd = null;
+ this.prefix = null;
+ setPrefixlenIsSet(false);
+ this.prefixlen = 0;
+ this.nexthop = null;
+ setLabelIsSet(false);
+ this.label = 0;
+ }
+
+ 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 getLabel() {
+ return this.label;
+ }
+
+ public onUpdatePushRoute_args setLabel(int label) {
+ this.label = label;
+ setLabelIsSet(true);
+ return this;
+ }
+
+ public void unsetLabel() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
+ }
+
+ /** Returns true if field label is set (has been assigned a value) and false otherwise */
+ public boolean isSetLabel() {
+ return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
+ }
+
+ public void setLabelIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case 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 LABEL:
+ if (value == null) {
+ unsetLabel();
+ } else {
+ setLabel((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RD:
+ return getRd();
+
+ case PREFIX:
+ return getPrefix();
+
+ case PREFIXLEN:
+ return Integer.valueOf(getPrefixlen());
+
+ case NEXTHOP:
+ return getNexthop();
+
+ case LABEL:
+ return Integer.valueOf(getLabel());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RD:
+ return isSetRd();
+ case PREFIX:
+ return isSetPrefix();
+ case PREFIXLEN:
+ return isSetPrefixlen();
+ case NEXTHOP:
+ return isSetNexthop();
+ case LABEL:
+ return isSetLabel();
+ }
+ 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_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_label = true;
+ boolean that_present_label = true;
+ if (this_present_label || that_present_label) {
+ if (!(this_present_label && that_present_label))
+ return false;
+ if (this.label != that.label)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(onUpdatePushRoute_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRd()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(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(isSetLabel()).compareTo(other.isSetLabel());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLabel()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("onUpdatePushRoute_args(");
+ boolean first = true;
+
+ sb.append("rd:");
+ if (this.rd == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rd);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("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("label:");
+ sb.append(this.label);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class onUpdatePushRoute_argsStandardSchemeFactory implements SchemeFactory {
+ public onUpdatePushRoute_argsStandardScheme getScheme() {
+ return new onUpdatePushRoute_argsStandardScheme();
+ }
+ }
+
+ private static class onUpdatePushRoute_argsStandardScheme extends StandardScheme<onUpdatePushRoute_args> {
+
+ 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: // RD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // 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 3: // 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 4: // 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 5: // LABEL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.label = iprot.readI32();
+ struct.setLabelIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.rd != null) {
+ oprot.writeFieldBegin(RD_FIELD_DESC);
+ oprot.writeString(struct.rd);
+ oprot.writeFieldEnd();
+ }
+ if (struct.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(LABEL_FIELD_DESC);
+ oprot.writeI32(struct.label);
+ 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<onUpdatePushRoute_args> {
+
+ @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.isSetRd()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPrefix()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPrefixlen()) {
+ optionals.set(2);
+ }
+ if (struct.isSetNexthop()) {
+ optionals.set(3);
+ }
+ if (struct.isSetLabel()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ 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.isSetLabel()) {
+ oprot.writeI32(struct.label);
+ }
+ }
+
+ @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(5);
+ if (incoming.get(0)) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.prefix = iprot.readString();
+ struct.setPrefixIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.prefixlen = iprot.readI32();
+ struct.setPrefixlenIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.nexthop = iprot.readString();
+ struct.setNexthopIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.label = iprot.readI32();
+ struct.setLabelIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class onUpdateWithdrawRoute_args implements org.apache.thrift.TBase<onUpdateWithdrawRoute_args, onUpdateWithdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdateWithdrawRoute_args> {
+ 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 RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)2);
+ 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)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new onUpdateWithdrawRoute_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new onUpdateWithdrawRoute_argsTupleSchemeFactory());
+ }
+
+ public String rd; // required
+ public String prefix; // required
+ public int prefixlen; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RD((short)1, "rd"),
+ PREFIX((short)2, "prefix"),
+ PREFIXLEN((short)3, "prefixlen");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RD
+ return RD;
+ case 2: // PREFIX
+ return PREFIX;
+ case 3: // PREFIXLEN
+ return PREFIXLEN;
+ 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 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.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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdateWithdrawRoute_args.class, metaDataMap);
+ }
+
+ public onUpdateWithdrawRoute_args() {
+ }
+
+ public onUpdateWithdrawRoute_args(
+ String rd,
+ String prefix,
+ int prefixlen)
+ {
+ this();
+ this.rd = rd;
+ this.prefix = prefix;
+ this.prefixlen = prefixlen;
+ setPrefixlenIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public onUpdateWithdrawRoute_args(onUpdateWithdrawRoute_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetRd()) {
+ this.rd = other.rd;
+ }
+ if (other.isSetPrefix()) {
+ this.prefix = other.prefix;
+ }
+ this.prefixlen = other.prefixlen;
+ }
+
+ public onUpdateWithdrawRoute_args deepCopy() {
+ return new onUpdateWithdrawRoute_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.rd = null;
+ this.prefix = null;
+ setPrefixlenIsSet(false);
+ this.prefixlen = 0;
+ }
+
+ 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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ 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;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RD:
+ return getRd();
+
+ case PREFIX:
+ return getPrefix();
+
+ case PREFIXLEN:
+ return Integer.valueOf(getPrefixlen());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RD:
+ return isSetRd();
+ case PREFIX:
+ return isSetPrefix();
+ case PREFIXLEN:
+ return isSetPrefixlen();
+ }
+ 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_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;
+ }
+
+ 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(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;
+ }
+ }
+ 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("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;
+ 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<onUpdateWithdrawRoute_args> {
+
+ 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: // RD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // 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 3: // 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;
+ 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.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();
+ 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<onUpdateWithdrawRoute_args> {
+
+ @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.isSetRd()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPrefix()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPrefixlen()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetRd()) {
+ oprot.writeString(struct.rd);
+ }
+ if (struct.isSetPrefix()) {
+ oprot.writeString(struct.prefix);
+ }
+ if (struct.isSetPrefixlen()) {
+ oprot.writeI32(struct.prefixlen);
+ }
+ }
+
+ @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(3);
+ if (incoming.get(0)) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.prefix = iprot.readString();
+ struct.setPrefixIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.prefixlen = iprot.readI32();
+ struct.setPrefixlenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class onStartConfigResyncNotification_args implements org.apache.thrift.TBase<onStartConfigResyncNotification_args, onStartConfigResyncNotification_args._Fields>, java.io.Serializable, Cloneable, Comparable<onStartConfigResyncNotification_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onStartConfigResyncNotification_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, 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 <i>other</i>.
+ */
+ 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<onStartConfigResyncNotification_args> {
+
+ 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<onStartConfigResyncNotification_args> {
+
+ @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;
+ }
+ }
+
+ }
+
+}