2 * Autogenerated by Thrift Compiler (0.9.1)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
7 package org.opendaylight.bgpmanager.thrift.gen;
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import org.apache.thrift.protocol.TProtocolException;
16 import org.apache.thrift.EncodingUtils;
17 import org.apache.thrift.TException;
18 import org.apache.thrift.async.AsyncMethodCallback;
19 import org.apache.thrift.server.AbstractNonblockingServer.*;
20 import java.util.List;
21 import java.util.ArrayList;
23 import java.util.HashMap;
24 import java.util.EnumMap;
26 import java.util.HashSet;
27 import java.util.EnumSet;
28 import java.util.Collections;
29 import java.util.BitSet;
30 import java.nio.ByteBuffer;
31 import java.util.Arrays;
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
35 public class BgpUpdater {
37 public interface Iface {
39 public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException;
41 public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException;
43 public void onStartConfigResyncNotification() throws org.apache.thrift.TException;
47 public interface AsyncIface {
49 public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
51 public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
53 public void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
57 public static class Client extends org.apache.thrift.TServiceClient implements Iface {
58 public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
60 public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
61 return new Client(prot);
63 public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
64 return new Client(iprot, oprot);
68 public Client(org.apache.thrift.protocol.TProtocol prot)
73 public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
77 public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException
79 send_onUpdatePushRoute(rd, prefix, prefixlen, nexthop, label);
82 public void send_onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException
84 onUpdatePushRoute_args args = new onUpdatePushRoute_args();
86 args.setPrefix(prefix);
87 args.setPrefixlen(prefixlen);
88 args.setNexthop(nexthop);
90 sendBase("onUpdatePushRoute", args);
93 public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException
95 send_onUpdateWithdrawRoute(rd, prefix, prefixlen);
98 public void send_onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException
100 onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args();
102 args.setPrefix(prefix);
103 args.setPrefixlen(prefixlen);
104 sendBase("onUpdateWithdrawRoute", args);
107 public void onStartConfigResyncNotification() throws org.apache.thrift.TException
109 send_onStartConfigResyncNotification();
112 public void send_onStartConfigResyncNotification() throws org.apache.thrift.TException
114 onStartConfigResyncNotification_args args = new onStartConfigResyncNotification_args();
115 sendBase("onStartConfigResyncNotification", args);
119 public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
120 public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
121 private org.apache.thrift.async.TAsyncClientManager clientManager;
122 private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
123 public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
124 this.clientManager = clientManager;
125 this.protocolFactory = protocolFactory;
127 public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
128 return new AsyncClient(protocolFactory, clientManager, transport);
132 public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
133 super(protocolFactory, clientManager, transport);
136 public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
138 onUpdatePushRoute_call method_call = new onUpdatePushRoute_call(rd, prefix, prefixlen, nexthop, label, resultHandler, this, ___protocolFactory, ___transport);
139 this.___currentMethod = method_call;
140 ___manager.call(method_call);
143 public static class onUpdatePushRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
145 private String prefix;
146 private int prefixlen;
147 private String nexthop;
149 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 {
150 super(client, protocolFactory, transport, resultHandler, true);
152 this.prefix = prefix;
153 this.prefixlen = prefixlen;
154 this.nexthop = nexthop;
158 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
159 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdatePushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
160 onUpdatePushRoute_args args = new onUpdatePushRoute_args();
162 args.setPrefix(prefix);
163 args.setPrefixlen(prefixlen);
164 args.setNexthop(nexthop);
165 args.setLabel(label);
167 prot.writeMessageEnd();
170 public void getResult() throws org.apache.thrift.TException {
171 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
172 throw new IllegalStateException("Method call not finished!");
174 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
175 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
179 public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
181 onUpdateWithdrawRoute_call method_call = new onUpdateWithdrawRoute_call(rd, prefix, prefixlen, resultHandler, this, ___protocolFactory, ___transport);
182 this.___currentMethod = method_call;
183 ___manager.call(method_call);
186 public static class onUpdateWithdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
188 private String prefix;
189 private int prefixlen;
190 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 {
191 super(client, protocolFactory, transport, resultHandler, true);
193 this.prefix = prefix;
194 this.prefixlen = prefixlen;
197 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
198 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdateWithdrawRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
199 onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args();
201 args.setPrefix(prefix);
202 args.setPrefixlen(prefixlen);
204 prot.writeMessageEnd();
207 public void getResult() throws org.apache.thrift.TException {
208 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
209 throw new IllegalStateException("Method call not finished!");
211 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
212 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
216 public void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
218 onStartConfigResyncNotification_call method_call = new onStartConfigResyncNotification_call(resultHandler, this, ___protocolFactory, ___transport);
219 this.___currentMethod = method_call;
220 ___manager.call(method_call);
223 public static class onStartConfigResyncNotification_call extends org.apache.thrift.async.TAsyncMethodCall {
224 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 {
225 super(client, protocolFactory, transport, resultHandler, true);
228 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
229 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onStartConfigResyncNotification", org.apache.thrift.protocol.TMessageType.CALL, 0));
230 onStartConfigResyncNotification_args args = new onStartConfigResyncNotification_args();
232 prot.writeMessageEnd();
235 public void getResult() throws org.apache.thrift.TException {
236 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
237 throw new IllegalStateException("Method call not finished!");
239 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
240 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
246 public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
247 private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
248 public Processor(I iface) {
249 super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
252 protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
253 super(iface, getProcessMap(processMap));
256 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) {
257 processMap.put("onUpdatePushRoute", new onUpdatePushRoute());
258 processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
259 processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
263 public static class onUpdatePushRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onUpdatePushRoute_args> {
264 public onUpdatePushRoute() {
265 super("onUpdatePushRoute");
268 public onUpdatePushRoute_args getEmptyArgsInstance() {
269 return new onUpdatePushRoute_args();
272 protected boolean isOneway() {
276 public org.apache.thrift.TBase getResult(I iface, onUpdatePushRoute_args args) throws org.apache.thrift.TException {
277 iface.onUpdatePushRoute(args.rd, args.prefix, args.prefixlen, args.nexthop, args.label);
282 public static class onUpdateWithdrawRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onUpdateWithdrawRoute_args> {
283 public onUpdateWithdrawRoute() {
284 super("onUpdateWithdrawRoute");
287 public onUpdateWithdrawRoute_args getEmptyArgsInstance() {
288 return new onUpdateWithdrawRoute_args();
291 protected boolean isOneway() {
295 public org.apache.thrift.TBase getResult(I iface, onUpdateWithdrawRoute_args args) throws org.apache.thrift.TException {
296 iface.onUpdateWithdrawRoute(args.rd, args.prefix, args.prefixlen);
301 public static class onStartConfigResyncNotification<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onStartConfigResyncNotification_args> {
302 public onStartConfigResyncNotification() {
303 super("onStartConfigResyncNotification");
306 public onStartConfigResyncNotification_args getEmptyArgsInstance() {
307 return new onStartConfigResyncNotification_args();
310 protected boolean isOneway() {
314 public org.apache.thrift.TBase getResult(I iface, onStartConfigResyncNotification_args args) throws org.apache.thrift.TException {
315 iface.onStartConfigResyncNotification();
322 public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
323 private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
324 public AsyncProcessor(I iface) {
325 super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
328 protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
329 super(iface, getProcessMap(processMap));
332 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) {
333 processMap.put("onUpdatePushRoute", new onUpdatePushRoute());
334 processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
335 processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
339 public static class onUpdatePushRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onUpdatePushRoute_args, Void> {
340 public onUpdatePushRoute() {
341 super("onUpdatePushRoute");
344 public onUpdatePushRoute_args getEmptyArgsInstance() {
345 return new onUpdatePushRoute_args();
348 public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
349 final org.apache.thrift.AsyncProcessFunction fcall = this;
350 return new AsyncMethodCallback<Void>() {
351 public void onComplete(Void o) {
353 public void onError(Exception e) {
358 protected boolean isOneway() {
362 public void start(I iface, onUpdatePushRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
363 iface.onUpdatePushRoute(args.rd, args.prefix, args.prefixlen, args.nexthop, args.label,resultHandler);
367 public static class onUpdateWithdrawRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onUpdateWithdrawRoute_args, Void> {
368 public onUpdateWithdrawRoute() {
369 super("onUpdateWithdrawRoute");
372 public onUpdateWithdrawRoute_args getEmptyArgsInstance() {
373 return new onUpdateWithdrawRoute_args();
376 public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
377 final org.apache.thrift.AsyncProcessFunction fcall = this;
378 return new AsyncMethodCallback<Void>() {
379 public void onComplete(Void o) {
381 public void onError(Exception e) {
386 protected boolean isOneway() {
390 public void start(I iface, onUpdateWithdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
391 iface.onUpdateWithdrawRoute(args.rd, args.prefix, args.prefixlen,resultHandler);
395 public static class onStartConfigResyncNotification<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onStartConfigResyncNotification_args, Void> {
396 public onStartConfigResyncNotification() {
397 super("onStartConfigResyncNotification");
400 public onStartConfigResyncNotification_args getEmptyArgsInstance() {
401 return new onStartConfigResyncNotification_args();
404 public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
405 final org.apache.thrift.AsyncProcessFunction fcall = this;
406 return new AsyncMethodCallback<Void>() {
407 public void onComplete(Void o) {
409 public void onError(Exception e) {
414 protected boolean isOneway() {
418 public void start(I iface, onStartConfigResyncNotification_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
419 iface.onStartConfigResyncNotification(resultHandler);
425 public static class onUpdatePushRoute_args implements org.apache.thrift.TBase<onUpdatePushRoute_args, onUpdatePushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdatePushRoute_args> {
426 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onUpdatePushRoute_args");
428 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);
429 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);
430 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);
431 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);
432 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);
434 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
436 schemes.put(StandardScheme.class, new onUpdatePushRoute_argsStandardSchemeFactory());
437 schemes.put(TupleScheme.class, new onUpdatePushRoute_argsTupleSchemeFactory());
440 public String rd; // required
441 public String prefix; // required
442 public int prefixlen; // required
443 public String nexthop; // required
444 public int label; // required
446 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
447 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
449 PREFIX((short)2, "prefix"),
450 PREFIXLEN((short)3, "prefixlen"),
451 NEXTHOP((short)4, "nexthop"),
452 LABEL((short)5, "label");
454 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
457 for (_Fields field : EnumSet.allOf(_Fields.class)) {
458 byName.put(field.getFieldName(), field);
463 * Find the _Fields constant that matches fieldId, or null if its not found.
465 public static _Fields findByThriftId(int fieldId) {
483 * Find the _Fields constant that matches fieldId, throwing an exception
484 * if it is not found.
486 public static _Fields findByThriftIdOrThrow(int fieldId) {
487 _Fields fields = findByThriftId(fieldId);
488 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
493 * Find the _Fields constant that matches name, or null if its not found.
495 public static _Fields findByName(String name) {
496 return byName.get(name);
499 private final short _thriftId;
500 private final String _fieldName;
502 _Fields(short thriftId, String fieldName) {
503 _thriftId = thriftId;
504 _fieldName = fieldName;
507 public short getThriftFieldId() {
511 public String getFieldName() {
516 // isset id assignments
517 private static final int __PREFIXLEN_ISSET_ID = 0;
518 private static final int __LABEL_ISSET_ID = 1;
519 private byte __isset_bitfield = 0;
520 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
522 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
523 tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
524 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
525 tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
526 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
527 tmpMap.put(_Fields.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT,
528 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
529 tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT,
530 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
531 tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT,
532 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
533 metaDataMap = Collections.unmodifiableMap(tmpMap);
534 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdatePushRoute_args.class, metaDataMap);
537 public onUpdatePushRoute_args() {
540 public onUpdatePushRoute_args(
549 this.prefix = prefix;
550 this.prefixlen = prefixlen;
551 setPrefixlenIsSet(true);
552 this.nexthop = nexthop;
558 * Performs a deep copy on <i>other</i>.
560 public onUpdatePushRoute_args(onUpdatePushRoute_args other) {
561 __isset_bitfield = other.__isset_bitfield;
562 if (other.isSetRd()) {
565 if (other.isSetPrefix()) {
566 this.prefix = other.prefix;
568 this.prefixlen = other.prefixlen;
569 if (other.isSetNexthop()) {
570 this.nexthop = other.nexthop;
572 this.label = other.label;
575 public onUpdatePushRoute_args deepCopy() {
576 return new onUpdatePushRoute_args(this);
580 public void clear() {
583 setPrefixlenIsSet(false);
586 setLabelIsSet(false);
590 public String getRd() {
594 public onUpdatePushRoute_args setRd(String rd) {
599 public void unsetRd() {
603 /** Returns true if field rd is set (has been assigned a value) and false otherwise */
604 public boolean isSetRd() {
605 return this.rd != null;
608 public void setRdIsSet(boolean value) {
614 public String getPrefix() {
618 public onUpdatePushRoute_args setPrefix(String prefix) {
619 this.prefix = prefix;
623 public void unsetPrefix() {
627 /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
628 public boolean isSetPrefix() {
629 return this.prefix != null;
632 public void setPrefixIsSet(boolean value) {
638 public int getPrefixlen() {
639 return this.prefixlen;
642 public onUpdatePushRoute_args setPrefixlen(int prefixlen) {
643 this.prefixlen = prefixlen;
644 setPrefixlenIsSet(true);
648 public void unsetPrefixlen() {
649 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
652 /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
653 public boolean isSetPrefixlen() {
654 return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
657 public void setPrefixlenIsSet(boolean value) {
658 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
661 public String getNexthop() {
665 public onUpdatePushRoute_args setNexthop(String nexthop) {
666 this.nexthop = nexthop;
670 public void unsetNexthop() {
674 /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
675 public boolean isSetNexthop() {
676 return this.nexthop != null;
679 public void setNexthopIsSet(boolean value) {
685 public int getLabel() {
689 public onUpdatePushRoute_args setLabel(int label) {
695 public void unsetLabel() {
696 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
699 /** Returns true if field label is set (has been assigned a value) and false otherwise */
700 public boolean isSetLabel() {
701 return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
704 public void setLabelIsSet(boolean value) {
705 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
708 public void setFieldValue(_Fields field, Object value) {
714 setRd((String)value);
722 setPrefix((String)value);
730 setPrefixlen((Integer)value);
738 setNexthop((String)value);
746 setLabel((Integer)value);
753 public Object getFieldValue(_Fields field) {
762 return Integer.valueOf(getPrefixlen());
768 return Integer.valueOf(getLabel());
771 throw new IllegalStateException();
774 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
775 public boolean isSet(_Fields field) {
777 throw new IllegalArgumentException();
784 return isSetPrefix();
786 return isSetPrefixlen();
788 return isSetNexthop();
792 throw new IllegalStateException();
796 public boolean equals(Object that) {
799 if (that instanceof onUpdatePushRoute_args)
800 return this.equals((onUpdatePushRoute_args)that);
804 public boolean equals(onUpdatePushRoute_args that) {
808 boolean this_present_rd = true && this.isSetRd();
809 boolean that_present_rd = true && that.isSetRd();
810 if (this_present_rd || that_present_rd) {
811 if (!(this_present_rd && that_present_rd))
813 if (!this.rd.equals(that.rd))
817 boolean this_present_prefix = true && this.isSetPrefix();
818 boolean that_present_prefix = true && that.isSetPrefix();
819 if (this_present_prefix || that_present_prefix) {
820 if (!(this_present_prefix && that_present_prefix))
822 if (!this.prefix.equals(that.prefix))
826 boolean this_present_prefixlen = true;
827 boolean that_present_prefixlen = true;
828 if (this_present_prefixlen || that_present_prefixlen) {
829 if (!(this_present_prefixlen && that_present_prefixlen))
831 if (this.prefixlen != that.prefixlen)
835 boolean this_present_nexthop = true && this.isSetNexthop();
836 boolean that_present_nexthop = true && that.isSetNexthop();
837 if (this_present_nexthop || that_present_nexthop) {
838 if (!(this_present_nexthop && that_present_nexthop))
840 if (!this.nexthop.equals(that.nexthop))
844 boolean this_present_label = true;
845 boolean that_present_label = true;
846 if (this_present_label || that_present_label) {
847 if (!(this_present_label && that_present_label))
849 if (this.label != that.label)
857 public int hashCode() {
862 public int compareTo(onUpdatePushRoute_args other) {
863 if (!getClass().equals(other.getClass())) {
864 return getClass().getName().compareTo(other.getClass().getName());
867 int lastComparison = 0;
869 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
870 if (lastComparison != 0) {
871 return lastComparison;
874 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
875 if (lastComparison != 0) {
876 return lastComparison;
879 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
880 if (lastComparison != 0) {
881 return lastComparison;
884 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
885 if (lastComparison != 0) {
886 return lastComparison;
889 lastComparison = Boolean.valueOf(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
890 if (lastComparison != 0) {
891 return lastComparison;
893 if (isSetPrefixlen()) {
894 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
895 if (lastComparison != 0) {
896 return lastComparison;
899 lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
900 if (lastComparison != 0) {
901 return lastComparison;
903 if (isSetNexthop()) {
904 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
905 if (lastComparison != 0) {
906 return lastComparison;
909 lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
910 if (lastComparison != 0) {
911 return lastComparison;
914 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
915 if (lastComparison != 0) {
916 return lastComparison;
922 public _Fields fieldForId(int fieldId) {
923 return _Fields.findByThriftId(fieldId);
926 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
927 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
930 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
931 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
935 public String toString() {
936 StringBuilder sb = new StringBuilder("onUpdatePushRoute_args(");
937 boolean first = true;
940 if (this.rd == null) {
946 if (!first) sb.append(", ");
947 sb.append("prefix:");
948 if (this.prefix == null) {
951 sb.append(this.prefix);
954 if (!first) sb.append(", ");
955 sb.append("prefixlen:");
956 sb.append(this.prefixlen);
958 if (!first) sb.append(", ");
959 sb.append("nexthop:");
960 if (this.nexthop == null) {
963 sb.append(this.nexthop);
966 if (!first) sb.append(", ");
968 sb.append(this.label);
971 return sb.toString();
974 public void validate() throws org.apache.thrift.TException {
975 // check for required fields
976 // check for sub-struct validity
979 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
981 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
982 } catch (org.apache.thrift.TException te) {
983 throw new java.io.IOException(te);
987 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
989 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
990 __isset_bitfield = 0;
991 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
992 } catch (org.apache.thrift.TException te) {
993 throw new java.io.IOException(te);
997 private static class onUpdatePushRoute_argsStandardSchemeFactory implements SchemeFactory {
998 public onUpdatePushRoute_argsStandardScheme getScheme() {
999 return new onUpdatePushRoute_argsStandardScheme();
1003 private static class onUpdatePushRoute_argsStandardScheme extends StandardScheme<onUpdatePushRoute_args> {
1005 public void read(org.apache.thrift.protocol.TProtocol iprot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
1006 org.apache.thrift.protocol.TField schemeField;
1007 iprot.readStructBegin();
1010 schemeField = iprot.readFieldBegin();
1011 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
1014 switch (schemeField.id) {
1016 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1017 struct.rd = iprot.readString();
1018 struct.setRdIsSet(true);
1020 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1024 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1025 struct.prefix = iprot.readString();
1026 struct.setPrefixIsSet(true);
1028 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1031 case 3: // PREFIXLEN
1032 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1033 struct.prefixlen = iprot.readI32();
1034 struct.setPrefixlenIsSet(true);
1036 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1040 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1041 struct.nexthop = iprot.readString();
1042 struct.setNexthopIsSet(true);
1044 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1048 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1049 struct.label = iprot.readI32();
1050 struct.setLabelIsSet(true);
1052 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1056 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1058 iprot.readFieldEnd();
1060 iprot.readStructEnd();
1062 // check for required fields of primitive type, which can't be checked in the validate method
1066 public void write(org.apache.thrift.protocol.TProtocol oprot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
1069 oprot.writeStructBegin(STRUCT_DESC);
1070 if (struct.rd != null) {
1071 oprot.writeFieldBegin(RD_FIELD_DESC);
1072 oprot.writeString(struct.rd);
1073 oprot.writeFieldEnd();
1075 if (struct.prefix != null) {
1076 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
1077 oprot.writeString(struct.prefix);
1078 oprot.writeFieldEnd();
1080 oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
1081 oprot.writeI32(struct.prefixlen);
1082 oprot.writeFieldEnd();
1083 if (struct.nexthop != null) {
1084 oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
1085 oprot.writeString(struct.nexthop);
1086 oprot.writeFieldEnd();
1088 oprot.writeFieldBegin(LABEL_FIELD_DESC);
1089 oprot.writeI32(struct.label);
1090 oprot.writeFieldEnd();
1091 oprot.writeFieldStop();
1092 oprot.writeStructEnd();
1097 private static class onUpdatePushRoute_argsTupleSchemeFactory implements SchemeFactory {
1098 public onUpdatePushRoute_argsTupleScheme getScheme() {
1099 return new onUpdatePushRoute_argsTupleScheme();
1103 private static class onUpdatePushRoute_argsTupleScheme extends TupleScheme<onUpdatePushRoute_args> {
1106 public void write(org.apache.thrift.protocol.TProtocol prot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
1107 TTupleProtocol oprot = (TTupleProtocol) prot;
1108 BitSet optionals = new BitSet();
1109 if (struct.isSetRd()) {
1112 if (struct.isSetPrefix()) {
1115 if (struct.isSetPrefixlen()) {
1118 if (struct.isSetNexthop()) {
1121 if (struct.isSetLabel()) {
1124 oprot.writeBitSet(optionals, 5);
1125 if (struct.isSetRd()) {
1126 oprot.writeString(struct.rd);
1128 if (struct.isSetPrefix()) {
1129 oprot.writeString(struct.prefix);
1131 if (struct.isSetPrefixlen()) {
1132 oprot.writeI32(struct.prefixlen);
1134 if (struct.isSetNexthop()) {
1135 oprot.writeString(struct.nexthop);
1137 if (struct.isSetLabel()) {
1138 oprot.writeI32(struct.label);
1143 public void read(org.apache.thrift.protocol.TProtocol prot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
1144 TTupleProtocol iprot = (TTupleProtocol) prot;
1145 BitSet incoming = iprot.readBitSet(5);
1146 if (incoming.get(0)) {
1147 struct.rd = iprot.readString();
1148 struct.setRdIsSet(true);
1150 if (incoming.get(1)) {
1151 struct.prefix = iprot.readString();
1152 struct.setPrefixIsSet(true);
1154 if (incoming.get(2)) {
1155 struct.prefixlen = iprot.readI32();
1156 struct.setPrefixlenIsSet(true);
1158 if (incoming.get(3)) {
1159 struct.nexthop = iprot.readString();
1160 struct.setNexthopIsSet(true);
1162 if (incoming.get(4)) {
1163 struct.label = iprot.readI32();
1164 struct.setLabelIsSet(true);
1171 public static class onUpdateWithdrawRoute_args implements org.apache.thrift.TBase<onUpdateWithdrawRoute_args, onUpdateWithdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdateWithdrawRoute_args> {
1172 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onUpdateWithdrawRoute_args");
1174 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);
1175 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);
1176 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);
1178 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
1180 schemes.put(StandardScheme.class, new onUpdateWithdrawRoute_argsStandardSchemeFactory());
1181 schemes.put(TupleScheme.class, new onUpdateWithdrawRoute_argsTupleSchemeFactory());
1184 public String rd; // required
1185 public String prefix; // required
1186 public int prefixlen; // required
1188 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1189 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1191 PREFIX((short)2, "prefix"),
1192 PREFIXLEN((short)3, "prefixlen");
1194 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1197 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1198 byName.put(field.getFieldName(), field);
1203 * Find the _Fields constant that matches fieldId, or null if its not found.
1205 public static _Fields findByThriftId(int fieldId) {
1211 case 3: // PREFIXLEN
1219 * Find the _Fields constant that matches fieldId, throwing an exception
1220 * if it is not found.
1222 public static _Fields findByThriftIdOrThrow(int fieldId) {
1223 _Fields fields = findByThriftId(fieldId);
1224 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1229 * Find the _Fields constant that matches name, or null if its not found.
1231 public static _Fields findByName(String name) {
1232 return byName.get(name);
1235 private final short _thriftId;
1236 private final String _fieldName;
1238 _Fields(short thriftId, String fieldName) {
1239 _thriftId = thriftId;
1240 _fieldName = fieldName;
1243 public short getThriftFieldId() {
1247 public String getFieldName() {
1252 // isset id assignments
1253 private static final int __PREFIXLEN_ISSET_ID = 0;
1254 private byte __isset_bitfield = 0;
1255 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1257 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1258 tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
1259 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
1260 tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
1261 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
1262 tmpMap.put(_Fields.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT,
1263 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
1264 metaDataMap = Collections.unmodifiableMap(tmpMap);
1265 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdateWithdrawRoute_args.class, metaDataMap);
1268 public onUpdateWithdrawRoute_args() {
1271 public onUpdateWithdrawRoute_args(
1278 this.prefix = prefix;
1279 this.prefixlen = prefixlen;
1280 setPrefixlenIsSet(true);
1284 * Performs a deep copy on <i>other</i>.
1286 public onUpdateWithdrawRoute_args(onUpdateWithdrawRoute_args other) {
1287 __isset_bitfield = other.__isset_bitfield;
1288 if (other.isSetRd()) {
1291 if (other.isSetPrefix()) {
1292 this.prefix = other.prefix;
1294 this.prefixlen = other.prefixlen;
1297 public onUpdateWithdrawRoute_args deepCopy() {
1298 return new onUpdateWithdrawRoute_args(this);
1302 public void clear() {
1305 setPrefixlenIsSet(false);
1309 public String getRd() {
1313 public onUpdateWithdrawRoute_args setRd(String rd) {
1318 public void unsetRd() {
1322 /** Returns true if field rd is set (has been assigned a value) and false otherwise */
1323 public boolean isSetRd() {
1324 return this.rd != null;
1327 public void setRdIsSet(boolean value) {
1333 public String getPrefix() {
1337 public onUpdateWithdrawRoute_args setPrefix(String prefix) {
1338 this.prefix = prefix;
1342 public void unsetPrefix() {
1346 /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
1347 public boolean isSetPrefix() {
1348 return this.prefix != null;
1351 public void setPrefixIsSet(boolean value) {
1357 public int getPrefixlen() {
1358 return this.prefixlen;
1361 public onUpdateWithdrawRoute_args setPrefixlen(int prefixlen) {
1362 this.prefixlen = prefixlen;
1363 setPrefixlenIsSet(true);
1367 public void unsetPrefixlen() {
1368 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
1371 /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
1372 public boolean isSetPrefixlen() {
1373 return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
1376 public void setPrefixlenIsSet(boolean value) {
1377 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
1380 public void setFieldValue(_Fields field, Object value) {
1383 if (value == null) {
1386 setRd((String)value);
1391 if (value == null) {
1394 setPrefix((String)value);
1399 if (value == null) {
1402 setPrefixlen((Integer)value);
1409 public Object getFieldValue(_Fields field) {
1418 return Integer.valueOf(getPrefixlen());
1421 throw new IllegalStateException();
1424 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1425 public boolean isSet(_Fields field) {
1426 if (field == null) {
1427 throw new IllegalArgumentException();
1434 return isSetPrefix();
1436 return isSetPrefixlen();
1438 throw new IllegalStateException();
1442 public boolean equals(Object that) {
1445 if (that instanceof onUpdateWithdrawRoute_args)
1446 return this.equals((onUpdateWithdrawRoute_args)that);
1450 public boolean equals(onUpdateWithdrawRoute_args that) {
1454 boolean this_present_rd = true && this.isSetRd();
1455 boolean that_present_rd = true && that.isSetRd();
1456 if (this_present_rd || that_present_rd) {
1457 if (!(this_present_rd && that_present_rd))
1459 if (!this.rd.equals(that.rd))
1463 boolean this_present_prefix = true && this.isSetPrefix();
1464 boolean that_present_prefix = true && that.isSetPrefix();
1465 if (this_present_prefix || that_present_prefix) {
1466 if (!(this_present_prefix && that_present_prefix))
1468 if (!this.prefix.equals(that.prefix))
1472 boolean this_present_prefixlen = true;
1473 boolean that_present_prefixlen = true;
1474 if (this_present_prefixlen || that_present_prefixlen) {
1475 if (!(this_present_prefixlen && that_present_prefixlen))
1477 if (this.prefixlen != that.prefixlen)
1485 public int hashCode() {
1490 public int compareTo(onUpdateWithdrawRoute_args other) {
1491 if (!getClass().equals(other.getClass())) {
1492 return getClass().getName().compareTo(other.getClass().getName());
1495 int lastComparison = 0;
1497 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
1498 if (lastComparison != 0) {
1499 return lastComparison;
1502 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
1503 if (lastComparison != 0) {
1504 return lastComparison;
1507 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
1508 if (lastComparison != 0) {
1509 return lastComparison;
1511 if (isSetPrefix()) {
1512 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
1513 if (lastComparison != 0) {
1514 return lastComparison;
1517 lastComparison = Boolean.valueOf(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
1518 if (lastComparison != 0) {
1519 return lastComparison;
1521 if (isSetPrefixlen()) {
1522 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
1523 if (lastComparison != 0) {
1524 return lastComparison;
1530 public _Fields fieldForId(int fieldId) {
1531 return _Fields.findByThriftId(fieldId);
1534 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1535 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
1538 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1539 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
1543 public String toString() {
1544 StringBuilder sb = new StringBuilder("onUpdateWithdrawRoute_args(");
1545 boolean first = true;
1548 if (this.rd == null) {
1554 if (!first) sb.append(", ");
1555 sb.append("prefix:");
1556 if (this.prefix == null) {
1559 sb.append(this.prefix);
1562 if (!first) sb.append(", ");
1563 sb.append("prefixlen:");
1564 sb.append(this.prefixlen);
1567 return sb.toString();
1570 public void validate() throws org.apache.thrift.TException {
1571 // check for required fields
1572 // check for sub-struct validity
1575 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1577 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1578 } catch (org.apache.thrift.TException te) {
1579 throw new java.io.IOException(te);
1583 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1585 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1586 __isset_bitfield = 0;
1587 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1588 } catch (org.apache.thrift.TException te) {
1589 throw new java.io.IOException(te);
1593 private static class onUpdateWithdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
1594 public onUpdateWithdrawRoute_argsStandardScheme getScheme() {
1595 return new onUpdateWithdrawRoute_argsStandardScheme();
1599 private static class onUpdateWithdrawRoute_argsStandardScheme extends StandardScheme<onUpdateWithdrawRoute_args> {
1601 public void read(org.apache.thrift.protocol.TProtocol iprot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException {
1602 org.apache.thrift.protocol.TField schemeField;
1603 iprot.readStructBegin();
1606 schemeField = iprot.readFieldBegin();
1607 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
1610 switch (schemeField.id) {
1612 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1613 struct.rd = iprot.readString();
1614 struct.setRdIsSet(true);
1616 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1620 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1621 struct.prefix = iprot.readString();
1622 struct.setPrefixIsSet(true);
1624 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1627 case 3: // PREFIXLEN
1628 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1629 struct.prefixlen = iprot.readI32();
1630 struct.setPrefixlenIsSet(true);
1632 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1636 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1638 iprot.readFieldEnd();
1640 iprot.readStructEnd();
1642 // check for required fields of primitive type, which can't be checked in the validate method
1646 public void write(org.apache.thrift.protocol.TProtocol oprot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException {
1649 oprot.writeStructBegin(STRUCT_DESC);
1650 if (struct.rd != null) {
1651 oprot.writeFieldBegin(RD_FIELD_DESC);
1652 oprot.writeString(struct.rd);
1653 oprot.writeFieldEnd();
1655 if (struct.prefix != null) {
1656 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
1657 oprot.writeString(struct.prefix);
1658 oprot.writeFieldEnd();
1660 oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
1661 oprot.writeI32(struct.prefixlen);
1662 oprot.writeFieldEnd();
1663 oprot.writeFieldStop();
1664 oprot.writeStructEnd();
1669 private static class onUpdateWithdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
1670 public onUpdateWithdrawRoute_argsTupleScheme getScheme() {
1671 return new onUpdateWithdrawRoute_argsTupleScheme();
1675 private static class onUpdateWithdrawRoute_argsTupleScheme extends TupleScheme<onUpdateWithdrawRoute_args> {
1678 public void write(org.apache.thrift.protocol.TProtocol prot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException {
1679 TTupleProtocol oprot = (TTupleProtocol) prot;
1680 BitSet optionals = new BitSet();
1681 if (struct.isSetRd()) {
1684 if (struct.isSetPrefix()) {
1687 if (struct.isSetPrefixlen()) {
1690 oprot.writeBitSet(optionals, 3);
1691 if (struct.isSetRd()) {
1692 oprot.writeString(struct.rd);
1694 if (struct.isSetPrefix()) {
1695 oprot.writeString(struct.prefix);
1697 if (struct.isSetPrefixlen()) {
1698 oprot.writeI32(struct.prefixlen);
1703 public void read(org.apache.thrift.protocol.TProtocol prot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException {
1704 TTupleProtocol iprot = (TTupleProtocol) prot;
1705 BitSet incoming = iprot.readBitSet(3);
1706 if (incoming.get(0)) {
1707 struct.rd = iprot.readString();
1708 struct.setRdIsSet(true);
1710 if (incoming.get(1)) {
1711 struct.prefix = iprot.readString();
1712 struct.setPrefixIsSet(true);
1714 if (incoming.get(2)) {
1715 struct.prefixlen = iprot.readI32();
1716 struct.setPrefixlenIsSet(true);
1723 public static class onStartConfigResyncNotification_args implements org.apache.thrift.TBase<onStartConfigResyncNotification_args, onStartConfigResyncNotification_args._Fields>, java.io.Serializable, Cloneable, Comparable<onStartConfigResyncNotification_args> {
1724 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onStartConfigResyncNotification_args");
1727 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
1729 schemes.put(StandardScheme.class, new onStartConfigResyncNotification_argsStandardSchemeFactory());
1730 schemes.put(TupleScheme.class, new onStartConfigResyncNotification_argsTupleSchemeFactory());
1734 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1735 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1738 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1741 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1742 byName.put(field.getFieldName(), field);
1747 * Find the _Fields constant that matches fieldId, or null if its not found.
1749 public static _Fields findByThriftId(int fieldId) {
1757 * Find the _Fields constant that matches fieldId, throwing an exception
1758 * if it is not found.
1760 public static _Fields findByThriftIdOrThrow(int fieldId) {
1761 _Fields fields = findByThriftId(fieldId);
1762 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1767 * Find the _Fields constant that matches name, or null if its not found.
1769 public static _Fields findByName(String name) {
1770 return byName.get(name);
1773 private final short _thriftId;
1774 private final String _fieldName;
1776 _Fields(short thriftId, String fieldName) {
1777 _thriftId = thriftId;
1778 _fieldName = fieldName;
1781 public short getThriftFieldId() {
1785 public String getFieldName() {
1789 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1791 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1792 metaDataMap = Collections.unmodifiableMap(tmpMap);
1793 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onStartConfigResyncNotification_args.class, metaDataMap);
1796 public onStartConfigResyncNotification_args() {
1800 * Performs a deep copy on <i>other</i>.
1802 public onStartConfigResyncNotification_args(onStartConfigResyncNotification_args other) {
1805 public onStartConfigResyncNotification_args deepCopy() {
1806 return new onStartConfigResyncNotification_args(this);
1810 public void clear() {
1813 public void setFieldValue(_Fields field, Object value) {
1818 public Object getFieldValue(_Fields field) {
1821 throw new IllegalStateException();
1824 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1825 public boolean isSet(_Fields field) {
1826 if (field == null) {
1827 throw new IllegalArgumentException();
1832 throw new IllegalStateException();
1836 public boolean equals(Object that) {
1839 if (that instanceof onStartConfigResyncNotification_args)
1840 return this.equals((onStartConfigResyncNotification_args)that);
1844 public boolean equals(onStartConfigResyncNotification_args that) {
1852 public int hashCode() {
1857 public int compareTo(onStartConfigResyncNotification_args other) {
1858 if (!getClass().equals(other.getClass())) {
1859 return getClass().getName().compareTo(other.getClass().getName());
1862 int lastComparison = 0;
1867 public _Fields fieldForId(int fieldId) {
1868 return _Fields.findByThriftId(fieldId);
1871 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1872 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
1875 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1876 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
1880 public String toString() {
1881 StringBuilder sb = new StringBuilder("onStartConfigResyncNotification_args(");
1882 boolean first = true;
1885 return sb.toString();
1888 public void validate() throws org.apache.thrift.TException {
1889 // check for required fields
1890 // check for sub-struct validity
1893 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1895 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1896 } catch (org.apache.thrift.TException te) {
1897 throw new java.io.IOException(te);
1901 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1903 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1904 } catch (org.apache.thrift.TException te) {
1905 throw new java.io.IOException(te);
1909 private static class onStartConfigResyncNotification_argsStandardSchemeFactory implements SchemeFactory {
1910 public onStartConfigResyncNotification_argsStandardScheme getScheme() {
1911 return new onStartConfigResyncNotification_argsStandardScheme();
1915 private static class onStartConfigResyncNotification_argsStandardScheme extends StandardScheme<onStartConfigResyncNotification_args> {
1917 public void read(org.apache.thrift.protocol.TProtocol iprot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
1918 org.apache.thrift.protocol.TField schemeField;
1919 iprot.readStructBegin();
1922 schemeField = iprot.readFieldBegin();
1923 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
1926 switch (schemeField.id) {
1928 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1930 iprot.readFieldEnd();
1932 iprot.readStructEnd();
1934 // check for required fields of primitive type, which can't be checked in the validate method
1938 public void write(org.apache.thrift.protocol.TProtocol oprot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
1941 oprot.writeStructBegin(STRUCT_DESC);
1942 oprot.writeFieldStop();
1943 oprot.writeStructEnd();
1948 private static class onStartConfigResyncNotification_argsTupleSchemeFactory implements SchemeFactory {
1949 public onStartConfigResyncNotification_argsTupleScheme getScheme() {
1950 return new onStartConfigResyncNotification_argsTupleScheme();
1954 private static class onStartConfigResyncNotification_argsTupleScheme extends TupleScheme<onStartConfigResyncNotification_args> {
1957 public void write(org.apache.thrift.protocol.TProtocol prot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
1958 TTupleProtocol oprot = (TTupleProtocol) prot;
1962 public void read(org.apache.thrift.protocol.TProtocol prot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
1963 TTupleProtocol iprot = (TTupleProtocol) prot;