6339516ea44fe4a427769d22a38dbf7d34ed5505
[vpnservice.git] / bgpmanager / bgpmanager-impl / src / main / java / org / opendaylight / bgpmanager / thrift / gen / BgpConfigurator.java
1 /**
2  * Autogenerated by Thrift Compiler (0.9.1)
3  *
4  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5  *  @generated
6  */
7 package org.opendaylight.bgpmanager.thrift.gen;
8
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
12
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;
22 import java.util.Map;
23 import java.util.HashMap;
24 import java.util.EnumMap;
25 import java.util.Set;
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;
34
35 public class BgpConfigurator {
36
37   public interface Iface {
38
39     public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException;
40
41     public int stopBgpServer() throws org.apache.thrift.TException;
42
43     public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException;
44
45     public int deletePeer(String ipAddress) throws org.apache.thrift.TException;
46
47     public int addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException;
48
49     public int delVrf(String rd) throws org.apache.thrift.TException;
50
51     public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException;
52
53     public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException;
54
55     public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException;
56
57   }
58
59   public interface AsyncIface {
60
61     public void startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
62
63     public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
64
65     public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
66
67     public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
68
69     public void addVrf(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
70
71     public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
72
73     public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
74
75     public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
76
77     public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
78
79   }
80
81   public static class Client extends org.apache.thrift.TServiceClient implements Iface {
82     public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
83       public Factory() {}
84       public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
85         return new Client(prot);
86       }
87       public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
88         return new Client(iprot, oprot);
89       }
90     }
91
92     public Client(org.apache.thrift.protocol.TProtocol prot)
93     {
94       super(prot, prot);
95     }
96
97     public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
98       super(iprot, oprot);
99     }
100
101     public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
102     {
103       send_startBgpServer(asNumber, routerId, port, holdTime, keepAliveTime);
104       return recv_startBgpServer();
105     }
106
107     public void send_startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
108     {
109       startBgpServer_args args = new startBgpServer_args();
110       args.setAsNumber(asNumber);
111       args.setRouterId(routerId);
112       args.setPort(port);
113       args.setHoldTime(holdTime);
114       args.setKeepAliveTime(keepAliveTime);
115       sendBase("startBgpServer", args);
116     }
117
118     public int recv_startBgpServer() throws org.apache.thrift.TException
119     {
120       startBgpServer_result result = new startBgpServer_result();
121       receiveBase(result, "startBgpServer");
122       if (result.isSetSuccess()) {
123         return result.success;
124       }
125       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startBgpServer failed: unknown result");
126     }
127
128     public int stopBgpServer() throws org.apache.thrift.TException
129     {
130       send_stopBgpServer();
131       return recv_stopBgpServer();
132     }
133
134     public void send_stopBgpServer() throws org.apache.thrift.TException
135     {
136       stopBgpServer_args args = new stopBgpServer_args();
137       sendBase("stopBgpServer", args);
138     }
139
140     public int recv_stopBgpServer() throws org.apache.thrift.TException
141     {
142       stopBgpServer_result result = new stopBgpServer_result();
143       receiveBase(result, "stopBgpServer");
144       if (result.isSetSuccess()) {
145         return result.success;
146       }
147       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stopBgpServer failed: unknown result");
148     }
149
150     public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
151     {
152       send_createPeer(ipAddress, asNumber);
153       return recv_createPeer();
154     }
155
156     public void send_createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
157     {
158       createPeer_args args = new createPeer_args();
159       args.setIpAddress(ipAddress);
160       args.setAsNumber(asNumber);
161       sendBase("createPeer", args);
162     }
163
164     public int recv_createPeer() throws org.apache.thrift.TException
165     {
166       createPeer_result result = new createPeer_result();
167       receiveBase(result, "createPeer");
168       if (result.isSetSuccess()) {
169         return result.success;
170       }
171       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPeer failed: unknown result");
172     }
173
174     public int deletePeer(String ipAddress) throws org.apache.thrift.TException
175     {
176       send_deletePeer(ipAddress);
177       return recv_deletePeer();
178     }
179
180     public void send_deletePeer(String ipAddress) throws org.apache.thrift.TException
181     {
182       deletePeer_args args = new deletePeer_args();
183       args.setIpAddress(ipAddress);
184       sendBase("deletePeer", args);
185     }
186
187     public int recv_deletePeer() throws org.apache.thrift.TException
188     {
189       deletePeer_result result = new deletePeer_result();
190       receiveBase(result, "deletePeer");
191       if (result.isSetSuccess()) {
192         return result.success;
193       }
194       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deletePeer failed: unknown result");
195     }
196
197     public int addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException
198     {
199       send_addVrf(rd, irts, erts);
200       return recv_addVrf();
201     }
202
203     public void send_addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException
204     {
205       addVrf_args args = new addVrf_args();
206       args.setRd(rd);
207       args.setIrts(irts);
208       args.setErts(erts);
209       sendBase("addVrf", args);
210     }
211
212     public int recv_addVrf() throws org.apache.thrift.TException
213     {
214       addVrf_result result = new addVrf_result();
215       receiveBase(result, "addVrf");
216       if (result.isSetSuccess()) {
217         return result.success;
218       }
219       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addVrf failed: unknown result");
220     }
221
222     public int delVrf(String rd) throws org.apache.thrift.TException
223     {
224       send_delVrf(rd);
225       return recv_delVrf();
226     }
227
228     public void send_delVrf(String rd) throws org.apache.thrift.TException
229     {
230       delVrf_args args = new delVrf_args();
231       args.setRd(rd);
232       sendBase("delVrf", args);
233     }
234
235     public int recv_delVrf() throws org.apache.thrift.TException
236     {
237       delVrf_result result = new delVrf_result();
238       receiveBase(result, "delVrf");
239       if (result.isSetSuccess()) {
240         return result.success;
241       }
242       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delVrf failed: unknown result");
243     }
244
245     public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException
246     {
247       send_pushRoute(prefix, nexthop, rd, label);
248       return recv_pushRoute();
249     }
250
251     public void send_pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException
252     {
253       pushRoute_args args = new pushRoute_args();
254       args.setPrefix(prefix);
255       args.setNexthop(nexthop);
256       args.setRd(rd);
257       args.setLabel(label);
258       sendBase("pushRoute", args);
259     }
260
261     public int recv_pushRoute() throws org.apache.thrift.TException
262     {
263       pushRoute_result result = new pushRoute_result();
264       receiveBase(result, "pushRoute");
265       if (result.isSetSuccess()) {
266         return result.success;
267       }
268       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushRoute failed: unknown result");
269     }
270
271     public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException
272     {
273       send_withdrawRoute(prefix, rd);
274       return recv_withdrawRoute();
275     }
276
277     public void send_withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException
278     {
279       withdrawRoute_args args = new withdrawRoute_args();
280       args.setPrefix(prefix);
281       args.setRd(rd);
282       sendBase("withdrawRoute", args);
283     }
284
285     public int recv_withdrawRoute() throws org.apache.thrift.TException
286     {
287       withdrawRoute_result result = new withdrawRoute_result();
288       receiveBase(result, "withdrawRoute");
289       if (result.isSetSuccess()) {
290         return result.success;
291       }
292       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "withdrawRoute failed: unknown result");
293     }
294
295     public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException
296     {
297       send_getRoutes(optype, winSize);
298       return recv_getRoutes();
299     }
300
301     public void send_getRoutes(int optype, int winSize) throws org.apache.thrift.TException
302     {
303       getRoutes_args args = new getRoutes_args();
304       args.setOptype(optype);
305       args.setWinSize(winSize);
306       sendBase("getRoutes", args);
307     }
308
309     public Routes recv_getRoutes() throws org.apache.thrift.TException
310     {
311       getRoutes_result result = new getRoutes_result();
312       receiveBase(result, "getRoutes");
313       if (result.isSetSuccess()) {
314         return result.success;
315       }
316       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRoutes failed: unknown result");
317     }
318
319   }
320   public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
321     public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
322       private org.apache.thrift.async.TAsyncClientManager clientManager;
323       private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
324       public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
325         this.clientManager = clientManager;
326         this.protocolFactory = protocolFactory;
327       }
328       public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
329         return new AsyncClient(protocolFactory, clientManager, transport);
330       }
331     }
332
333     public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
334       super(protocolFactory, clientManager, transport);
335     }
336
337     public void startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
338       checkReady();
339       startBgpServer_call method_call = new startBgpServer_call(asNumber, routerId, port, holdTime, keepAliveTime, resultHandler, this, ___protocolFactory, ___transport);
340       this.___currentMethod = method_call;
341       ___manager.call(method_call);
342     }
343
344     public static class startBgpServer_call extends org.apache.thrift.async.TAsyncMethodCall {
345       private int asNumber;
346       private String routerId;
347       private int port;
348       private int holdTime;
349       private int keepAliveTime;
350       public startBgpServer_call(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, 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 {
351         super(client, protocolFactory, transport, resultHandler, false);
352         this.asNumber = asNumber;
353         this.routerId = routerId;
354         this.port = port;
355         this.holdTime = holdTime;
356         this.keepAliveTime = keepAliveTime;
357       }
358
359       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
360         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startBgpServer", org.apache.thrift.protocol.TMessageType.CALL, 0));
361         startBgpServer_args args = new startBgpServer_args();
362         args.setAsNumber(asNumber);
363         args.setRouterId(routerId);
364         args.setPort(port);
365         args.setHoldTime(holdTime);
366         args.setKeepAliveTime(keepAliveTime);
367         args.write(prot);
368         prot.writeMessageEnd();
369       }
370
371       public int getResult() throws org.apache.thrift.TException {
372         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
373           throw new IllegalStateException("Method call not finished!");
374         }
375         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
376         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
377         return (new Client(prot)).recv_startBgpServer();
378       }
379     }
380
381     public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
382       checkReady();
383       stopBgpServer_call method_call = new stopBgpServer_call(resultHandler, this, ___protocolFactory, ___transport);
384       this.___currentMethod = method_call;
385       ___manager.call(method_call);
386     }
387
388     public static class stopBgpServer_call extends org.apache.thrift.async.TAsyncMethodCall {
389       public stopBgpServer_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 {
390         super(client, protocolFactory, transport, resultHandler, false);
391       }
392
393       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
394         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stopBgpServer", org.apache.thrift.protocol.TMessageType.CALL, 0));
395         stopBgpServer_args args = new stopBgpServer_args();
396         args.write(prot);
397         prot.writeMessageEnd();
398       }
399
400       public int getResult() throws org.apache.thrift.TException {
401         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
402           throw new IllegalStateException("Method call not finished!");
403         }
404         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
405         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
406         return (new Client(prot)).recv_stopBgpServer();
407       }
408     }
409
410     public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
411       checkReady();
412       createPeer_call method_call = new createPeer_call(ipAddress, asNumber, resultHandler, this, ___protocolFactory, ___transport);
413       this.___currentMethod = method_call;
414       ___manager.call(method_call);
415     }
416
417     public static class createPeer_call extends org.apache.thrift.async.TAsyncMethodCall {
418       private String ipAddress;
419       private int asNumber;
420       public createPeer_call(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
421         super(client, protocolFactory, transport, resultHandler, false);
422         this.ipAddress = ipAddress;
423         this.asNumber = asNumber;
424       }
425
426       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
427         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPeer", org.apache.thrift.protocol.TMessageType.CALL, 0));
428         createPeer_args args = new createPeer_args();
429         args.setIpAddress(ipAddress);
430         args.setAsNumber(asNumber);
431         args.write(prot);
432         prot.writeMessageEnd();
433       }
434
435       public int getResult() throws org.apache.thrift.TException {
436         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
437           throw new IllegalStateException("Method call not finished!");
438         }
439         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
440         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
441         return (new Client(prot)).recv_createPeer();
442       }
443     }
444
445     public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
446       checkReady();
447       deletePeer_call method_call = new deletePeer_call(ipAddress, resultHandler, this, ___protocolFactory, ___transport);
448       this.___currentMethod = method_call;
449       ___manager.call(method_call);
450     }
451
452     public static class deletePeer_call extends org.apache.thrift.async.TAsyncMethodCall {
453       private String ipAddress;
454       public deletePeer_call(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
455         super(client, protocolFactory, transport, resultHandler, false);
456         this.ipAddress = ipAddress;
457       }
458
459       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
460         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deletePeer", org.apache.thrift.protocol.TMessageType.CALL, 0));
461         deletePeer_args args = new deletePeer_args();
462         args.setIpAddress(ipAddress);
463         args.write(prot);
464         prot.writeMessageEnd();
465       }
466
467       public int getResult() throws org.apache.thrift.TException {
468         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
469           throw new IllegalStateException("Method call not finished!");
470         }
471         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
472         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
473         return (new Client(prot)).recv_deletePeer();
474       }
475     }
476
477     public void addVrf(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
478       checkReady();
479       addVrf_call method_call = new addVrf_call(rd, irts, erts, resultHandler, this, ___protocolFactory, ___transport);
480       this.___currentMethod = method_call;
481       ___manager.call(method_call);
482     }
483
484     public static class addVrf_call extends org.apache.thrift.async.TAsyncMethodCall {
485       private String rd;
486       private List<String> irts;
487       private List<String> erts;
488       public addVrf_call(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
489         super(client, protocolFactory, transport, resultHandler, false);
490         this.rd = rd;
491         this.irts = irts;
492         this.erts = erts;
493       }
494
495       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
496         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVrf", org.apache.thrift.protocol.TMessageType.CALL, 0));
497         addVrf_args args = new addVrf_args();
498         args.setRd(rd);
499         args.setIrts(irts);
500         args.setErts(erts);
501         args.write(prot);
502         prot.writeMessageEnd();
503       }
504
505       public int getResult() throws org.apache.thrift.TException {
506         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
507           throw new IllegalStateException("Method call not finished!");
508         }
509         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
510         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
511         return (new Client(prot)).recv_addVrf();
512       }
513     }
514
515     public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
516       checkReady();
517       delVrf_call method_call = new delVrf_call(rd, resultHandler, this, ___protocolFactory, ___transport);
518       this.___currentMethod = method_call;
519       ___manager.call(method_call);
520     }
521
522     public static class delVrf_call extends org.apache.thrift.async.TAsyncMethodCall {
523       private String rd;
524       public delVrf_call(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
525         super(client, protocolFactory, transport, resultHandler, false);
526         this.rd = rd;
527       }
528
529       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
530         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delVrf", org.apache.thrift.protocol.TMessageType.CALL, 0));
531         delVrf_args args = new delVrf_args();
532         args.setRd(rd);
533         args.write(prot);
534         prot.writeMessageEnd();
535       }
536
537       public int getResult() throws org.apache.thrift.TException {
538         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
539           throw new IllegalStateException("Method call not finished!");
540         }
541         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
542         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
543         return (new Client(prot)).recv_delVrf();
544       }
545     }
546
547     public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
548       checkReady();
549       pushRoute_call method_call = new pushRoute_call(prefix, nexthop, rd, label, resultHandler, this, ___protocolFactory, ___transport);
550       this.___currentMethod = method_call;
551       ___manager.call(method_call);
552     }
553
554     public static class pushRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
555       private String prefix;
556       private String nexthop;
557       private String rd;
558       private int label;
559       public pushRoute_call(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
560         super(client, protocolFactory, transport, resultHandler, false);
561         this.prefix = prefix;
562         this.nexthop = nexthop;
563         this.rd = rd;
564         this.label = label;
565       }
566
567       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
568         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
569         pushRoute_args args = new pushRoute_args();
570         args.setPrefix(prefix);
571         args.setNexthop(nexthop);
572         args.setRd(rd);
573         args.setLabel(label);
574         args.write(prot);
575         prot.writeMessageEnd();
576       }
577
578       public int getResult() throws org.apache.thrift.TException {
579         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
580           throw new IllegalStateException("Method call not finished!");
581         }
582         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
583         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
584         return (new Client(prot)).recv_pushRoute();
585       }
586     }
587
588     public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
589       checkReady();
590       withdrawRoute_call method_call = new withdrawRoute_call(prefix, rd, resultHandler, this, ___protocolFactory, ___transport);
591       this.___currentMethod = method_call;
592       ___manager.call(method_call);
593     }
594
595     public static class withdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
596       private String prefix;
597       private String rd;
598       public withdrawRoute_call(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
599         super(client, protocolFactory, transport, resultHandler, false);
600         this.prefix = prefix;
601         this.rd = rd;
602       }
603
604       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
605         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("withdrawRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
606         withdrawRoute_args args = new withdrawRoute_args();
607         args.setPrefix(prefix);
608         args.setRd(rd);
609         args.write(prot);
610         prot.writeMessageEnd();
611       }
612
613       public int getResult() throws org.apache.thrift.TException {
614         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
615           throw new IllegalStateException("Method call not finished!");
616         }
617         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
618         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
619         return (new Client(prot)).recv_withdrawRoute();
620       }
621     }
622
623     public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
624       checkReady();
625       getRoutes_call method_call = new getRoutes_call(optype, winSize, resultHandler, this, ___protocolFactory, ___transport);
626       this.___currentMethod = method_call;
627       ___manager.call(method_call);
628     }
629
630     public static class getRoutes_call extends org.apache.thrift.async.TAsyncMethodCall {
631       private int optype;
632       private int winSize;
633       public getRoutes_call(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
634         super(client, protocolFactory, transport, resultHandler, false);
635         this.optype = optype;
636         this.winSize = winSize;
637       }
638
639       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
640         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRoutes", org.apache.thrift.protocol.TMessageType.CALL, 0));
641         getRoutes_args args = new getRoutes_args();
642         args.setOptype(optype);
643         args.setWinSize(winSize);
644         args.write(prot);
645         prot.writeMessageEnd();
646       }
647
648       public Routes getResult() throws org.apache.thrift.TException {
649         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
650           throw new IllegalStateException("Method call not finished!");
651         }
652         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
653         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
654         return (new Client(prot)).recv_getRoutes();
655       }
656     }
657
658   }
659
660   public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
661     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
662     public Processor(I iface) {
663       super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
664     }
665
666     protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
667       super(iface, getProcessMap(processMap));
668     }
669
670     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) {
671       processMap.put("startBgpServer", new startBgpServer());
672       processMap.put("stopBgpServer", new stopBgpServer());
673       processMap.put("createPeer", new createPeer());
674       processMap.put("deletePeer", new deletePeer());
675       processMap.put("addVrf", new addVrf());
676       processMap.put("delVrf", new delVrf());
677       processMap.put("pushRoute", new pushRoute());
678       processMap.put("withdrawRoute", new withdrawRoute());
679       processMap.put("getRoutes", new getRoutes());
680       return processMap;
681     }
682
683     public static class startBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startBgpServer_args> {
684       public startBgpServer() {
685         super("startBgpServer");
686       }
687
688       public startBgpServer_args getEmptyArgsInstance() {
689         return new startBgpServer_args();
690       }
691
692       protected boolean isOneway() {
693         return false;
694       }
695
696       public startBgpServer_result getResult(I iface, startBgpServer_args args) throws org.apache.thrift.TException {
697         startBgpServer_result result = new startBgpServer_result();
698         result.success = iface.startBgpServer(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime);
699         result.setSuccessIsSet(true);
700         return result;
701       }
702     }
703
704     public static class stopBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stopBgpServer_args> {
705       public stopBgpServer() {
706         super("stopBgpServer");
707       }
708
709       public stopBgpServer_args getEmptyArgsInstance() {
710         return new stopBgpServer_args();
711       }
712
713       protected boolean isOneway() {
714         return false;
715       }
716
717       public stopBgpServer_result getResult(I iface, stopBgpServer_args args) throws org.apache.thrift.TException {
718         stopBgpServer_result result = new stopBgpServer_result();
719         result.success = iface.stopBgpServer();
720         result.setSuccessIsSet(true);
721         return result;
722       }
723     }
724
725     public static class createPeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPeer_args> {
726       public createPeer() {
727         super("createPeer");
728       }
729
730       public createPeer_args getEmptyArgsInstance() {
731         return new createPeer_args();
732       }
733
734       protected boolean isOneway() {
735         return false;
736       }
737
738       public createPeer_result getResult(I iface, createPeer_args args) throws org.apache.thrift.TException {
739         createPeer_result result = new createPeer_result();
740         result.success = iface.createPeer(args.ipAddress, args.asNumber);
741         result.setSuccessIsSet(true);
742         return result;
743       }
744     }
745
746     public static class deletePeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePeer_args> {
747       public deletePeer() {
748         super("deletePeer");
749       }
750
751       public deletePeer_args getEmptyArgsInstance() {
752         return new deletePeer_args();
753       }
754
755       protected boolean isOneway() {
756         return false;
757       }
758
759       public deletePeer_result getResult(I iface, deletePeer_args args) throws org.apache.thrift.TException {
760         deletePeer_result result = new deletePeer_result();
761         result.success = iface.deletePeer(args.ipAddress);
762         result.setSuccessIsSet(true);
763         return result;
764       }
765     }
766
767     public static class addVrf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVrf_args> {
768       public addVrf() {
769         super("addVrf");
770       }
771
772       public addVrf_args getEmptyArgsInstance() {
773         return new addVrf_args();
774       }
775
776       protected boolean isOneway() {
777         return false;
778       }
779
780       public addVrf_result getResult(I iface, addVrf_args args) throws org.apache.thrift.TException {
781         addVrf_result result = new addVrf_result();
782         result.success = iface.addVrf(args.rd, args.irts, args.erts);
783         result.setSuccessIsSet(true);
784         return result;
785       }
786     }
787
788     public static class delVrf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delVrf_args> {
789       public delVrf() {
790         super("delVrf");
791       }
792
793       public delVrf_args getEmptyArgsInstance() {
794         return new delVrf_args();
795       }
796
797       protected boolean isOneway() {
798         return false;
799       }
800
801       public delVrf_result getResult(I iface, delVrf_args args) throws org.apache.thrift.TException {
802         delVrf_result result = new delVrf_result();
803         result.success = iface.delVrf(args.rd);
804         result.setSuccessIsSet(true);
805         return result;
806       }
807     }
808
809     public static class pushRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushRoute_args> {
810       public pushRoute() {
811         super("pushRoute");
812       }
813
814       public pushRoute_args getEmptyArgsInstance() {
815         return new pushRoute_args();
816       }
817
818       protected boolean isOneway() {
819         return false;
820       }
821
822       public pushRoute_result getResult(I iface, pushRoute_args args) throws org.apache.thrift.TException {
823         pushRoute_result result = new pushRoute_result();
824         result.success = iface.pushRoute(args.prefix, args.nexthop, args.rd, args.label);
825         result.setSuccessIsSet(true);
826         return result;
827       }
828     }
829
830     public static class withdrawRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, withdrawRoute_args> {
831       public withdrawRoute() {
832         super("withdrawRoute");
833       }
834
835       public withdrawRoute_args getEmptyArgsInstance() {
836         return new withdrawRoute_args();
837       }
838
839       protected boolean isOneway() {
840         return false;
841       }
842
843       public withdrawRoute_result getResult(I iface, withdrawRoute_args args) throws org.apache.thrift.TException {
844         withdrawRoute_result result = new withdrawRoute_result();
845         result.success = iface.withdrawRoute(args.prefix, args.rd);
846         result.setSuccessIsSet(true);
847         return result;
848       }
849     }
850
851     public static class getRoutes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRoutes_args> {
852       public getRoutes() {
853         super("getRoutes");
854       }
855
856       public getRoutes_args getEmptyArgsInstance() {
857         return new getRoutes_args();
858       }
859
860       protected boolean isOneway() {
861         return false;
862       }
863
864       public getRoutes_result getResult(I iface, getRoutes_args args) throws org.apache.thrift.TException {
865         getRoutes_result result = new getRoutes_result();
866         result.success = iface.getRoutes(args.optype, args.winSize);
867         return result;
868       }
869     }
870
871   }
872
873   public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
874     private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
875     public AsyncProcessor(I iface) {
876       super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
877     }
878
879     protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
880       super(iface, getProcessMap(processMap));
881     }
882
883     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) {
884       processMap.put("startBgpServer", new startBgpServer());
885       processMap.put("stopBgpServer", new stopBgpServer());
886       processMap.put("createPeer", new createPeer());
887       processMap.put("deletePeer", new deletePeer());
888       processMap.put("addVrf", new addVrf());
889       processMap.put("delVrf", new delVrf());
890       processMap.put("pushRoute", new pushRoute());
891       processMap.put("withdrawRoute", new withdrawRoute());
892       processMap.put("getRoutes", new getRoutes());
893       return processMap;
894     }
895
896     public static class startBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startBgpServer_args, Integer> {
897       public startBgpServer() {
898         super("startBgpServer");
899       }
900
901       public startBgpServer_args getEmptyArgsInstance() {
902         return new startBgpServer_args();
903       }
904
905       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
906         final org.apache.thrift.AsyncProcessFunction fcall = this;
907         return new AsyncMethodCallback<Integer>() { 
908           public void onComplete(Integer o) {
909             startBgpServer_result result = new startBgpServer_result();
910             result.success = o;
911             result.setSuccessIsSet(true);
912             try {
913               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
914               return;
915             } catch (Exception e) {
916               LOGGER.error("Exception writing to internal frame buffer", e);
917             }
918             fb.close();
919           }
920           public void onError(Exception e) {
921             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
922             org.apache.thrift.TBase msg;
923             startBgpServer_result result = new startBgpServer_result();
924             {
925               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
926               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
927             }
928             try {
929               fcall.sendResponse(fb,msg,msgType,seqid);
930               return;
931             } catch (Exception ex) {
932               LOGGER.error("Exception writing to internal frame buffer", ex);
933             }
934             fb.close();
935           }
936         };
937       }
938
939       protected boolean isOneway() {
940         return false;
941       }
942
943       public void start(I iface, startBgpServer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
944         iface.startBgpServer(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime,resultHandler);
945       }
946     }
947
948     public static class stopBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stopBgpServer_args, Integer> {
949       public stopBgpServer() {
950         super("stopBgpServer");
951       }
952
953       public stopBgpServer_args getEmptyArgsInstance() {
954         return new stopBgpServer_args();
955       }
956
957       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
958         final org.apache.thrift.AsyncProcessFunction fcall = this;
959         return new AsyncMethodCallback<Integer>() { 
960           public void onComplete(Integer o) {
961             stopBgpServer_result result = new stopBgpServer_result();
962             result.success = o;
963             result.setSuccessIsSet(true);
964             try {
965               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
966               return;
967             } catch (Exception e) {
968               LOGGER.error("Exception writing to internal frame buffer", e);
969             }
970             fb.close();
971           }
972           public void onError(Exception e) {
973             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
974             org.apache.thrift.TBase msg;
975             stopBgpServer_result result = new stopBgpServer_result();
976             {
977               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
978               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
979             }
980             try {
981               fcall.sendResponse(fb,msg,msgType,seqid);
982               return;
983             } catch (Exception ex) {
984               LOGGER.error("Exception writing to internal frame buffer", ex);
985             }
986             fb.close();
987           }
988         };
989       }
990
991       protected boolean isOneway() {
992         return false;
993       }
994
995       public void start(I iface, stopBgpServer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
996         iface.stopBgpServer(resultHandler);
997       }
998     }
999
1000     public static class createPeer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createPeer_args, Integer> {
1001       public createPeer() {
1002         super("createPeer");
1003       }
1004
1005       public createPeer_args getEmptyArgsInstance() {
1006         return new createPeer_args();
1007       }
1008
1009       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1010         final org.apache.thrift.AsyncProcessFunction fcall = this;
1011         return new AsyncMethodCallback<Integer>() { 
1012           public void onComplete(Integer o) {
1013             createPeer_result result = new createPeer_result();
1014             result.success = o;
1015             result.setSuccessIsSet(true);
1016             try {
1017               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1018               return;
1019             } catch (Exception e) {
1020               LOGGER.error("Exception writing to internal frame buffer", e);
1021             }
1022             fb.close();
1023           }
1024           public void onError(Exception e) {
1025             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1026             org.apache.thrift.TBase msg;
1027             createPeer_result result = new createPeer_result();
1028             {
1029               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1030               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1031             }
1032             try {
1033               fcall.sendResponse(fb,msg,msgType,seqid);
1034               return;
1035             } catch (Exception ex) {
1036               LOGGER.error("Exception writing to internal frame buffer", ex);
1037             }
1038             fb.close();
1039           }
1040         };
1041       }
1042
1043       protected boolean isOneway() {
1044         return false;
1045       }
1046
1047       public void start(I iface, createPeer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1048         iface.createPeer(args.ipAddress, args.asNumber,resultHandler);
1049       }
1050     }
1051
1052     public static class deletePeer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePeer_args, Integer> {
1053       public deletePeer() {
1054         super("deletePeer");
1055       }
1056
1057       public deletePeer_args getEmptyArgsInstance() {
1058         return new deletePeer_args();
1059       }
1060
1061       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1062         final org.apache.thrift.AsyncProcessFunction fcall = this;
1063         return new AsyncMethodCallback<Integer>() { 
1064           public void onComplete(Integer o) {
1065             deletePeer_result result = new deletePeer_result();
1066             result.success = o;
1067             result.setSuccessIsSet(true);
1068             try {
1069               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1070               return;
1071             } catch (Exception e) {
1072               LOGGER.error("Exception writing to internal frame buffer", e);
1073             }
1074             fb.close();
1075           }
1076           public void onError(Exception e) {
1077             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1078             org.apache.thrift.TBase msg;
1079             deletePeer_result result = new deletePeer_result();
1080             {
1081               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1082               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1083             }
1084             try {
1085               fcall.sendResponse(fb,msg,msgType,seqid);
1086               return;
1087             } catch (Exception ex) {
1088               LOGGER.error("Exception writing to internal frame buffer", ex);
1089             }
1090             fb.close();
1091           }
1092         };
1093       }
1094
1095       protected boolean isOneway() {
1096         return false;
1097       }
1098
1099       public void start(I iface, deletePeer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1100         iface.deletePeer(args.ipAddress,resultHandler);
1101       }
1102     }
1103
1104     public static class addVrf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addVrf_args, Integer> {
1105       public addVrf() {
1106         super("addVrf");
1107       }
1108
1109       public addVrf_args getEmptyArgsInstance() {
1110         return new addVrf_args();
1111       }
1112
1113       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1114         final org.apache.thrift.AsyncProcessFunction fcall = this;
1115         return new AsyncMethodCallback<Integer>() { 
1116           public void onComplete(Integer o) {
1117             addVrf_result result = new addVrf_result();
1118             result.success = o;
1119             result.setSuccessIsSet(true);
1120             try {
1121               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1122               return;
1123             } catch (Exception e) {
1124               LOGGER.error("Exception writing to internal frame buffer", e);
1125             }
1126             fb.close();
1127           }
1128           public void onError(Exception e) {
1129             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1130             org.apache.thrift.TBase msg;
1131             addVrf_result result = new addVrf_result();
1132             {
1133               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1134               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1135             }
1136             try {
1137               fcall.sendResponse(fb,msg,msgType,seqid);
1138               return;
1139             } catch (Exception ex) {
1140               LOGGER.error("Exception writing to internal frame buffer", ex);
1141             }
1142             fb.close();
1143           }
1144         };
1145       }
1146
1147       protected boolean isOneway() {
1148         return false;
1149       }
1150
1151       public void start(I iface, addVrf_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1152         iface.addVrf(args.rd, args.irts, args.erts,resultHandler);
1153       }
1154     }
1155
1156     public static class delVrf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delVrf_args, Integer> {
1157       public delVrf() {
1158         super("delVrf");
1159       }
1160
1161       public delVrf_args getEmptyArgsInstance() {
1162         return new delVrf_args();
1163       }
1164
1165       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1166         final org.apache.thrift.AsyncProcessFunction fcall = this;
1167         return new AsyncMethodCallback<Integer>() { 
1168           public void onComplete(Integer o) {
1169             delVrf_result result = new delVrf_result();
1170             result.success = o;
1171             result.setSuccessIsSet(true);
1172             try {
1173               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1174               return;
1175             } catch (Exception e) {
1176               LOGGER.error("Exception writing to internal frame buffer", e);
1177             }
1178             fb.close();
1179           }
1180           public void onError(Exception e) {
1181             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1182             org.apache.thrift.TBase msg;
1183             delVrf_result result = new delVrf_result();
1184             {
1185               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1186               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1187             }
1188             try {
1189               fcall.sendResponse(fb,msg,msgType,seqid);
1190               return;
1191             } catch (Exception ex) {
1192               LOGGER.error("Exception writing to internal frame buffer", ex);
1193             }
1194             fb.close();
1195           }
1196         };
1197       }
1198
1199       protected boolean isOneway() {
1200         return false;
1201       }
1202
1203       public void start(I iface, delVrf_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1204         iface.delVrf(args.rd,resultHandler);
1205       }
1206     }
1207
1208     public static class pushRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, pushRoute_args, Integer> {
1209       public pushRoute() {
1210         super("pushRoute");
1211       }
1212
1213       public pushRoute_args getEmptyArgsInstance() {
1214         return new pushRoute_args();
1215       }
1216
1217       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1218         final org.apache.thrift.AsyncProcessFunction fcall = this;
1219         return new AsyncMethodCallback<Integer>() { 
1220           public void onComplete(Integer o) {
1221             pushRoute_result result = new pushRoute_result();
1222             result.success = o;
1223             result.setSuccessIsSet(true);
1224             try {
1225               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1226               return;
1227             } catch (Exception e) {
1228               LOGGER.error("Exception writing to internal frame buffer", e);
1229             }
1230             fb.close();
1231           }
1232           public void onError(Exception e) {
1233             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1234             org.apache.thrift.TBase msg;
1235             pushRoute_result result = new pushRoute_result();
1236             {
1237               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1238               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1239             }
1240             try {
1241               fcall.sendResponse(fb,msg,msgType,seqid);
1242               return;
1243             } catch (Exception ex) {
1244               LOGGER.error("Exception writing to internal frame buffer", ex);
1245             }
1246             fb.close();
1247           }
1248         };
1249       }
1250
1251       protected boolean isOneway() {
1252         return false;
1253       }
1254
1255       public void start(I iface, pushRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1256         iface.pushRoute(args.prefix, args.nexthop, args.rd, args.label,resultHandler);
1257       }
1258     }
1259
1260     public static class withdrawRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, withdrawRoute_args, Integer> {
1261       public withdrawRoute() {
1262         super("withdrawRoute");
1263       }
1264
1265       public withdrawRoute_args getEmptyArgsInstance() {
1266         return new withdrawRoute_args();
1267       }
1268
1269       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1270         final org.apache.thrift.AsyncProcessFunction fcall = this;
1271         return new AsyncMethodCallback<Integer>() { 
1272           public void onComplete(Integer o) {
1273             withdrawRoute_result result = new withdrawRoute_result();
1274             result.success = o;
1275             result.setSuccessIsSet(true);
1276             try {
1277               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1278               return;
1279             } catch (Exception e) {
1280               LOGGER.error("Exception writing to internal frame buffer", e);
1281             }
1282             fb.close();
1283           }
1284           public void onError(Exception e) {
1285             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1286             org.apache.thrift.TBase msg;
1287             withdrawRoute_result result = new withdrawRoute_result();
1288             {
1289               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1290               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1291             }
1292             try {
1293               fcall.sendResponse(fb,msg,msgType,seqid);
1294               return;
1295             } catch (Exception ex) {
1296               LOGGER.error("Exception writing to internal frame buffer", ex);
1297             }
1298             fb.close();
1299           }
1300         };
1301       }
1302
1303       protected boolean isOneway() {
1304         return false;
1305       }
1306
1307       public void start(I iface, withdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1308         iface.withdrawRoute(args.prefix, args.rd,resultHandler);
1309       }
1310     }
1311
1312     public static class getRoutes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRoutes_args, Routes> {
1313       public getRoutes() {
1314         super("getRoutes");
1315       }
1316
1317       public getRoutes_args getEmptyArgsInstance() {
1318         return new getRoutes_args();
1319       }
1320
1321       public AsyncMethodCallback<Routes> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
1322         final org.apache.thrift.AsyncProcessFunction fcall = this;
1323         return new AsyncMethodCallback<Routes>() { 
1324           public void onComplete(Routes o) {
1325             getRoutes_result result = new getRoutes_result();
1326             result.success = o;
1327             try {
1328               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1329               return;
1330             } catch (Exception e) {
1331               LOGGER.error("Exception writing to internal frame buffer", e);
1332             }
1333             fb.close();
1334           }
1335           public void onError(Exception e) {
1336             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
1337             org.apache.thrift.TBase msg;
1338             getRoutes_result result = new getRoutes_result();
1339             {
1340               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
1341               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
1342             }
1343             try {
1344               fcall.sendResponse(fb,msg,msgType,seqid);
1345               return;
1346             } catch (Exception ex) {
1347               LOGGER.error("Exception writing to internal frame buffer", ex);
1348             }
1349             fb.close();
1350           }
1351         };
1352       }
1353
1354       protected boolean isOneway() {
1355         return false;
1356       }
1357
1358       public void start(I iface, getRoutes_args args, org.apache.thrift.async.AsyncMethodCallback<Routes> resultHandler) throws TException {
1359         iface.getRoutes(args.optype, args.winSize,resultHandler);
1360       }
1361     }
1362
1363   }
1364
1365   public static class startBgpServer_args implements org.apache.thrift.TBase<startBgpServer_args, startBgpServer_args._Fields>, java.io.Serializable, Cloneable, Comparable<startBgpServer_args>   {
1366     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgpServer_args");
1367
1368     private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1);
1369     private static final org.apache.thrift.protocol.TField ROUTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("routerId", org.apache.thrift.protocol.TType.STRING, (short)2);
1370     private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)3);
1371     private static final org.apache.thrift.protocol.TField HOLD_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("holdTime", org.apache.thrift.protocol.TType.I32, (short)4);
1372     private static final org.apache.thrift.protocol.TField KEEP_ALIVE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("keepAliveTime", org.apache.thrift.protocol.TType.I32, (short)5);
1373
1374     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
1375     static {
1376       schemes.put(StandardScheme.class, new startBgpServer_argsStandardSchemeFactory());
1377       schemes.put(TupleScheme.class, new startBgpServer_argsTupleSchemeFactory());
1378     }
1379
1380     public int asNumber; // required
1381     public String routerId; // required
1382     public int port; // required
1383     public int holdTime; // required
1384     public int keepAliveTime; // required
1385
1386     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1387     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1388       AS_NUMBER((short)1, "asNumber"),
1389       ROUTER_ID((short)2, "routerId"),
1390       PORT((short)3, "port"),
1391       HOLD_TIME((short)4, "holdTime"),
1392       KEEP_ALIVE_TIME((short)5, "keepAliveTime");
1393
1394       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1395
1396       static {
1397         for (_Fields field : EnumSet.allOf(_Fields.class)) {
1398           byName.put(field.getFieldName(), field);
1399         }
1400       }
1401
1402       /**
1403        * Find the _Fields constant that matches fieldId, or null if its not found.
1404        */
1405       public static _Fields findByThriftId(int fieldId) {
1406         switch(fieldId) {
1407           case 1: // AS_NUMBER
1408             return AS_NUMBER;
1409           case 2: // ROUTER_ID
1410             return ROUTER_ID;
1411           case 3: // PORT
1412             return PORT;
1413           case 4: // HOLD_TIME
1414             return HOLD_TIME;
1415           case 5: // KEEP_ALIVE_TIME
1416             return KEEP_ALIVE_TIME;
1417           default:
1418             return null;
1419         }
1420       }
1421
1422       /**
1423        * Find the _Fields constant that matches fieldId, throwing an exception
1424        * if it is not found.
1425        */
1426       public static _Fields findByThriftIdOrThrow(int fieldId) {
1427         _Fields fields = findByThriftId(fieldId);
1428         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1429         return fields;
1430       }
1431
1432       /**
1433        * Find the _Fields constant that matches name, or null if its not found.
1434        */
1435       public static _Fields findByName(String name) {
1436         return byName.get(name);
1437       }
1438
1439       private final short _thriftId;
1440       private final String _fieldName;
1441
1442       _Fields(short thriftId, String fieldName) {
1443         _thriftId = thriftId;
1444         _fieldName = fieldName;
1445       }
1446
1447       public short getThriftFieldId() {
1448         return _thriftId;
1449       }
1450
1451       public String getFieldName() {
1452         return _fieldName;
1453       }
1454     }
1455
1456     // isset id assignments
1457     private static final int __ASNUMBER_ISSET_ID = 0;
1458     private static final int __PORT_ISSET_ID = 1;
1459     private static final int __HOLDTIME_ISSET_ID = 2;
1460     private static final int __KEEPALIVETIME_ISSET_ID = 3;
1461     private byte __isset_bitfield = 0;
1462     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1463     static {
1464       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1465       tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1466           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
1467       tmpMap.put(_Fields.ROUTER_ID, new org.apache.thrift.meta_data.FieldMetaData("routerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1468           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
1469       tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1470           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
1471       tmpMap.put(_Fields.HOLD_TIME, new org.apache.thrift.meta_data.FieldMetaData("holdTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1472           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
1473       tmpMap.put(_Fields.KEEP_ALIVE_TIME, new org.apache.thrift.meta_data.FieldMetaData("keepAliveTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1474           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
1475       metaDataMap = Collections.unmodifiableMap(tmpMap);
1476       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgpServer_args.class, metaDataMap);
1477     }
1478
1479     public startBgpServer_args() {
1480     }
1481
1482     public startBgpServer_args(
1483       int asNumber,
1484       String routerId,
1485       int port,
1486       int holdTime,
1487       int keepAliveTime)
1488     {
1489       this();
1490       this.asNumber = asNumber;
1491       setAsNumberIsSet(true);
1492       this.routerId = routerId;
1493       this.port = port;
1494       setPortIsSet(true);
1495       this.holdTime = holdTime;
1496       setHoldTimeIsSet(true);
1497       this.keepAliveTime = keepAliveTime;
1498       setKeepAliveTimeIsSet(true);
1499     }
1500
1501     /**
1502      * Performs a deep copy on <i>other</i>.
1503      */
1504     public startBgpServer_args(startBgpServer_args other) {
1505       __isset_bitfield = other.__isset_bitfield;
1506       this.asNumber = other.asNumber;
1507       if (other.isSetRouterId()) {
1508         this.routerId = other.routerId;
1509       }
1510       this.port = other.port;
1511       this.holdTime = other.holdTime;
1512       this.keepAliveTime = other.keepAliveTime;
1513     }
1514
1515     public startBgpServer_args deepCopy() {
1516       return new startBgpServer_args(this);
1517     }
1518
1519     @Override
1520     public void clear() {
1521       setAsNumberIsSet(false);
1522       this.asNumber = 0;
1523       this.routerId = null;
1524       setPortIsSet(false);
1525       this.port = 0;
1526       setHoldTimeIsSet(false);
1527       this.holdTime = 0;
1528       setKeepAliveTimeIsSet(false);
1529       this.keepAliveTime = 0;
1530     }
1531
1532     public int getAsNumber() {
1533       return this.asNumber;
1534     }
1535
1536     public startBgpServer_args setAsNumber(int asNumber) {
1537       this.asNumber = asNumber;
1538       setAsNumberIsSet(true);
1539       return this;
1540     }
1541
1542     public void unsetAsNumber() {
1543       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
1544     }
1545
1546     /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
1547     public boolean isSetAsNumber() {
1548       return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
1549     }
1550
1551     public void setAsNumberIsSet(boolean value) {
1552       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
1553     }
1554
1555     public String getRouterId() {
1556       return this.routerId;
1557     }
1558
1559     public startBgpServer_args setRouterId(String routerId) {
1560       this.routerId = routerId;
1561       return this;
1562     }
1563
1564     public void unsetRouterId() {
1565       this.routerId = null;
1566     }
1567
1568     /** Returns true if field routerId is set (has been assigned a value) and false otherwise */
1569     public boolean isSetRouterId() {
1570       return this.routerId != null;
1571     }
1572
1573     public void setRouterIdIsSet(boolean value) {
1574       if (!value) {
1575         this.routerId = null;
1576       }
1577     }
1578
1579     public int getPort() {
1580       return this.port;
1581     }
1582
1583     public startBgpServer_args setPort(int port) {
1584       this.port = port;
1585       setPortIsSet(true);
1586       return this;
1587     }
1588
1589     public void unsetPort() {
1590       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
1591     }
1592
1593     /** Returns true if field port is set (has been assigned a value) and false otherwise */
1594     public boolean isSetPort() {
1595       return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
1596     }
1597
1598     public void setPortIsSet(boolean value) {
1599       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
1600     }
1601
1602     public int getHoldTime() {
1603       return this.holdTime;
1604     }
1605
1606     public startBgpServer_args setHoldTime(int holdTime) {
1607       this.holdTime = holdTime;
1608       setHoldTimeIsSet(true);
1609       return this;
1610     }
1611
1612     public void unsetHoldTime() {
1613       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
1614     }
1615
1616     /** Returns true if field holdTime is set (has been assigned a value) and false otherwise */
1617     public boolean isSetHoldTime() {
1618       return EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
1619     }
1620
1621     public void setHoldTimeIsSet(boolean value) {
1622       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
1623     }
1624
1625     public int getKeepAliveTime() {
1626       return this.keepAliveTime;
1627     }
1628
1629     public startBgpServer_args setKeepAliveTime(int keepAliveTime) {
1630       this.keepAliveTime = keepAliveTime;
1631       setKeepAliveTimeIsSet(true);
1632       return this;
1633     }
1634
1635     public void unsetKeepAliveTime() {
1636       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
1637     }
1638
1639     /** Returns true if field keepAliveTime is set (has been assigned a value) and false otherwise */
1640     public boolean isSetKeepAliveTime() {
1641       return EncodingUtils.testBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
1642     }
1643
1644     public void setKeepAliveTimeIsSet(boolean value) {
1645       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID, value);
1646     }
1647
1648     public void setFieldValue(_Fields field, Object value) {
1649       switch (field) {
1650       case AS_NUMBER:
1651         if (value == null) {
1652           unsetAsNumber();
1653         } else {
1654           setAsNumber((Integer)value);
1655         }
1656         break;
1657
1658       case ROUTER_ID:
1659         if (value == null) {
1660           unsetRouterId();
1661         } else {
1662           setRouterId((String)value);
1663         }
1664         break;
1665
1666       case PORT:
1667         if (value == null) {
1668           unsetPort();
1669         } else {
1670           setPort((Integer)value);
1671         }
1672         break;
1673
1674       case HOLD_TIME:
1675         if (value == null) {
1676           unsetHoldTime();
1677         } else {
1678           setHoldTime((Integer)value);
1679         }
1680         break;
1681
1682       case KEEP_ALIVE_TIME:
1683         if (value == null) {
1684           unsetKeepAliveTime();
1685         } else {
1686           setKeepAliveTime((Integer)value);
1687         }
1688         break;
1689
1690       }
1691     }
1692
1693     public Object getFieldValue(_Fields field) {
1694       switch (field) {
1695       case AS_NUMBER:
1696         return Integer.valueOf(getAsNumber());
1697
1698       case ROUTER_ID:
1699         return getRouterId();
1700
1701       case PORT:
1702         return Integer.valueOf(getPort());
1703
1704       case HOLD_TIME:
1705         return Integer.valueOf(getHoldTime());
1706
1707       case KEEP_ALIVE_TIME:
1708         return Integer.valueOf(getKeepAliveTime());
1709
1710       }
1711       throw new IllegalStateException();
1712     }
1713
1714     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1715     public boolean isSet(_Fields field) {
1716       if (field == null) {
1717         throw new IllegalArgumentException();
1718       }
1719
1720       switch (field) {
1721       case AS_NUMBER:
1722         return isSetAsNumber();
1723       case ROUTER_ID:
1724         return isSetRouterId();
1725       case PORT:
1726         return isSetPort();
1727       case HOLD_TIME:
1728         return isSetHoldTime();
1729       case KEEP_ALIVE_TIME:
1730         return isSetKeepAliveTime();
1731       }
1732       throw new IllegalStateException();
1733     }
1734
1735     @Override
1736     public boolean equals(Object that) {
1737       if (that == null)
1738         return false;
1739       if (that instanceof startBgpServer_args)
1740         return this.equals((startBgpServer_args)that);
1741       return false;
1742     }
1743
1744     public boolean equals(startBgpServer_args that) {
1745       if (that == null)
1746         return false;
1747
1748       boolean this_present_asNumber = true;
1749       boolean that_present_asNumber = true;
1750       if (this_present_asNumber || that_present_asNumber) {
1751         if (!(this_present_asNumber && that_present_asNumber))
1752           return false;
1753         if (this.asNumber != that.asNumber)
1754           return false;
1755       }
1756
1757       boolean this_present_routerId = true && this.isSetRouterId();
1758       boolean that_present_routerId = true && that.isSetRouterId();
1759       if (this_present_routerId || that_present_routerId) {
1760         if (!(this_present_routerId && that_present_routerId))
1761           return false;
1762         if (!this.routerId.equals(that.routerId))
1763           return false;
1764       }
1765
1766       boolean this_present_port = true;
1767       boolean that_present_port = true;
1768       if (this_present_port || that_present_port) {
1769         if (!(this_present_port && that_present_port))
1770           return false;
1771         if (this.port != that.port)
1772           return false;
1773       }
1774
1775       boolean this_present_holdTime = true;
1776       boolean that_present_holdTime = true;
1777       if (this_present_holdTime || that_present_holdTime) {
1778         if (!(this_present_holdTime && that_present_holdTime))
1779           return false;
1780         if (this.holdTime != that.holdTime)
1781           return false;
1782       }
1783
1784       boolean this_present_keepAliveTime = true;
1785       boolean that_present_keepAliveTime = true;
1786       if (this_present_keepAliveTime || that_present_keepAliveTime) {
1787         if (!(this_present_keepAliveTime && that_present_keepAliveTime))
1788           return false;
1789         if (this.keepAliveTime != that.keepAliveTime)
1790           return false;
1791       }
1792
1793       return true;
1794     }
1795
1796     @Override
1797     public int hashCode() {
1798       return 0;
1799     }
1800
1801     @Override
1802     public int compareTo(startBgpServer_args other) {
1803       if (!getClass().equals(other.getClass())) {
1804         return getClass().getName().compareTo(other.getClass().getName());
1805       }
1806
1807       int lastComparison = 0;
1808
1809       lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
1810       if (lastComparison != 0) {
1811         return lastComparison;
1812       }
1813       if (isSetAsNumber()) {
1814         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
1815         if (lastComparison != 0) {
1816           return lastComparison;
1817         }
1818       }
1819       lastComparison = Boolean.valueOf(isSetRouterId()).compareTo(other.isSetRouterId());
1820       if (lastComparison != 0) {
1821         return lastComparison;
1822       }
1823       if (isSetRouterId()) {
1824         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routerId, other.routerId);
1825         if (lastComparison != 0) {
1826           return lastComparison;
1827         }
1828       }
1829       lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
1830       if (lastComparison != 0) {
1831         return lastComparison;
1832       }
1833       if (isSetPort()) {
1834         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
1835         if (lastComparison != 0) {
1836           return lastComparison;
1837         }
1838       }
1839       lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
1840       if (lastComparison != 0) {
1841         return lastComparison;
1842       }
1843       if (isSetHoldTime()) {
1844         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdTime, other.holdTime);
1845         if (lastComparison != 0) {
1846           return lastComparison;
1847         }
1848       }
1849       lastComparison = Boolean.valueOf(isSetKeepAliveTime()).compareTo(other.isSetKeepAliveTime());
1850       if (lastComparison != 0) {
1851         return lastComparison;
1852       }
1853       if (isSetKeepAliveTime()) {
1854         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepAliveTime, other.keepAliveTime);
1855         if (lastComparison != 0) {
1856           return lastComparison;
1857         }
1858       }
1859       return 0;
1860     }
1861
1862     public _Fields fieldForId(int fieldId) {
1863       return _Fields.findByThriftId(fieldId);
1864     }
1865
1866     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1867       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
1868     }
1869
1870     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1871       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
1872     }
1873
1874     @Override
1875     public String toString() {
1876       StringBuilder sb = new StringBuilder("startBgpServer_args(");
1877       boolean first = true;
1878
1879       sb.append("asNumber:");
1880       sb.append(this.asNumber);
1881       first = false;
1882       if (!first) sb.append(", ");
1883       sb.append("routerId:");
1884       if (this.routerId == null) {
1885         sb.append("null");
1886       } else {
1887         sb.append(this.routerId);
1888       }
1889       first = false;
1890       if (!first) sb.append(", ");
1891       sb.append("port:");
1892       sb.append(this.port);
1893       first = false;
1894       if (!first) sb.append(", ");
1895       sb.append("holdTime:");
1896       sb.append(this.holdTime);
1897       first = false;
1898       if (!first) sb.append(", ");
1899       sb.append("keepAliveTime:");
1900       sb.append(this.keepAliveTime);
1901       first = false;
1902       sb.append(")");
1903       return sb.toString();
1904     }
1905
1906     public void validate() throws org.apache.thrift.TException {
1907       // check for required fields
1908       // check for sub-struct validity
1909     }
1910
1911     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1912       try {
1913         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1914       } catch (org.apache.thrift.TException te) {
1915         throw new java.io.IOException(te);
1916       }
1917     }
1918
1919     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1920       try {
1921         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1922         __isset_bitfield = 0;
1923         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1924       } catch (org.apache.thrift.TException te) {
1925         throw new java.io.IOException(te);
1926       }
1927     }
1928
1929     private static class startBgpServer_argsStandardSchemeFactory implements SchemeFactory {
1930       public startBgpServer_argsStandardScheme getScheme() {
1931         return new startBgpServer_argsStandardScheme();
1932       }
1933     }
1934
1935     private static class startBgpServer_argsStandardScheme extends StandardScheme<startBgpServer_args> {
1936
1937       public void read(org.apache.thrift.protocol.TProtocol iprot, startBgpServer_args struct) throws org.apache.thrift.TException {
1938         org.apache.thrift.protocol.TField schemeField;
1939         iprot.readStructBegin();
1940         while (true)
1941         {
1942           schemeField = iprot.readFieldBegin();
1943           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
1944             break;
1945           }
1946           switch (schemeField.id) {
1947             case 1: // AS_NUMBER
1948               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1949                 struct.asNumber = iprot.readI32();
1950                 struct.setAsNumberIsSet(true);
1951               } else { 
1952                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1953               }
1954               break;
1955             case 2: // ROUTER_ID
1956               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1957                 struct.routerId = iprot.readString();
1958                 struct.setRouterIdIsSet(true);
1959               } else { 
1960                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1961               }
1962               break;
1963             case 3: // PORT
1964               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1965                 struct.port = iprot.readI32();
1966                 struct.setPortIsSet(true);
1967               } else { 
1968                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1969               }
1970               break;
1971             case 4: // HOLD_TIME
1972               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1973                 struct.holdTime = iprot.readI32();
1974                 struct.setHoldTimeIsSet(true);
1975               } else { 
1976                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1977               }
1978               break;
1979             case 5: // KEEP_ALIVE_TIME
1980               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1981                 struct.keepAliveTime = iprot.readI32();
1982                 struct.setKeepAliveTimeIsSet(true);
1983               } else { 
1984                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1985               }
1986               break;
1987             default:
1988               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1989           }
1990           iprot.readFieldEnd();
1991         }
1992         iprot.readStructEnd();
1993
1994         // check for required fields of primitive type, which can't be checked in the validate method
1995         struct.validate();
1996       }
1997
1998       public void write(org.apache.thrift.protocol.TProtocol oprot, startBgpServer_args struct) throws org.apache.thrift.TException {
1999         struct.validate();
2000
2001         oprot.writeStructBegin(STRUCT_DESC);
2002         oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
2003         oprot.writeI32(struct.asNumber);
2004         oprot.writeFieldEnd();
2005         if (struct.routerId != null) {
2006           oprot.writeFieldBegin(ROUTER_ID_FIELD_DESC);
2007           oprot.writeString(struct.routerId);
2008           oprot.writeFieldEnd();
2009         }
2010         oprot.writeFieldBegin(PORT_FIELD_DESC);
2011         oprot.writeI32(struct.port);
2012         oprot.writeFieldEnd();
2013         oprot.writeFieldBegin(HOLD_TIME_FIELD_DESC);
2014         oprot.writeI32(struct.holdTime);
2015         oprot.writeFieldEnd();
2016         oprot.writeFieldBegin(KEEP_ALIVE_TIME_FIELD_DESC);
2017         oprot.writeI32(struct.keepAliveTime);
2018         oprot.writeFieldEnd();
2019         oprot.writeFieldStop();
2020         oprot.writeStructEnd();
2021       }
2022
2023     }
2024
2025     private static class startBgpServer_argsTupleSchemeFactory implements SchemeFactory {
2026       public startBgpServer_argsTupleScheme getScheme() {
2027         return new startBgpServer_argsTupleScheme();
2028       }
2029     }
2030
2031     private static class startBgpServer_argsTupleScheme extends TupleScheme<startBgpServer_args> {
2032
2033       @Override
2034       public void write(org.apache.thrift.protocol.TProtocol prot, startBgpServer_args struct) throws org.apache.thrift.TException {
2035         TTupleProtocol oprot = (TTupleProtocol) prot;
2036         BitSet optionals = new BitSet();
2037         if (struct.isSetAsNumber()) {
2038           optionals.set(0);
2039         }
2040         if (struct.isSetRouterId()) {
2041           optionals.set(1);
2042         }
2043         if (struct.isSetPort()) {
2044           optionals.set(2);
2045         }
2046         if (struct.isSetHoldTime()) {
2047           optionals.set(3);
2048         }
2049         if (struct.isSetKeepAliveTime()) {
2050           optionals.set(4);
2051         }
2052         oprot.writeBitSet(optionals, 5);
2053         if (struct.isSetAsNumber()) {
2054           oprot.writeI32(struct.asNumber);
2055         }
2056         if (struct.isSetRouterId()) {
2057           oprot.writeString(struct.routerId);
2058         }
2059         if (struct.isSetPort()) {
2060           oprot.writeI32(struct.port);
2061         }
2062         if (struct.isSetHoldTime()) {
2063           oprot.writeI32(struct.holdTime);
2064         }
2065         if (struct.isSetKeepAliveTime()) {
2066           oprot.writeI32(struct.keepAliveTime);
2067         }
2068       }
2069
2070       @Override
2071       public void read(org.apache.thrift.protocol.TProtocol prot, startBgpServer_args struct) throws org.apache.thrift.TException {
2072         TTupleProtocol iprot = (TTupleProtocol) prot;
2073         BitSet incoming = iprot.readBitSet(5);
2074         if (incoming.get(0)) {
2075           struct.asNumber = iprot.readI32();
2076           struct.setAsNumberIsSet(true);
2077         }
2078         if (incoming.get(1)) {
2079           struct.routerId = iprot.readString();
2080           struct.setRouterIdIsSet(true);
2081         }
2082         if (incoming.get(2)) {
2083           struct.port = iprot.readI32();
2084           struct.setPortIsSet(true);
2085         }
2086         if (incoming.get(3)) {
2087           struct.holdTime = iprot.readI32();
2088           struct.setHoldTimeIsSet(true);
2089         }
2090         if (incoming.get(4)) {
2091           struct.keepAliveTime = iprot.readI32();
2092           struct.setKeepAliveTimeIsSet(true);
2093         }
2094       }
2095     }
2096
2097   }
2098
2099   public static class startBgpServer_result implements org.apache.thrift.TBase<startBgpServer_result, startBgpServer_result._Fields>, java.io.Serializable, Cloneable, Comparable<startBgpServer_result>   {
2100     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgpServer_result");
2101
2102     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
2103
2104     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
2105     static {
2106       schemes.put(StandardScheme.class, new startBgpServer_resultStandardSchemeFactory());
2107       schemes.put(TupleScheme.class, new startBgpServer_resultTupleSchemeFactory());
2108     }
2109
2110     public int success; // required
2111
2112     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2113     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2114       SUCCESS((short)0, "success");
2115
2116       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2117
2118       static {
2119         for (_Fields field : EnumSet.allOf(_Fields.class)) {
2120           byName.put(field.getFieldName(), field);
2121         }
2122       }
2123
2124       /**
2125        * Find the _Fields constant that matches fieldId, or null if its not found.
2126        */
2127       public static _Fields findByThriftId(int fieldId) {
2128         switch(fieldId) {
2129           case 0: // SUCCESS
2130             return SUCCESS;
2131           default:
2132             return null;
2133         }
2134       }
2135
2136       /**
2137        * Find the _Fields constant that matches fieldId, throwing an exception
2138        * if it is not found.
2139        */
2140       public static _Fields findByThriftIdOrThrow(int fieldId) {
2141         _Fields fields = findByThriftId(fieldId);
2142         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2143         return fields;
2144       }
2145
2146       /**
2147        * Find the _Fields constant that matches name, or null if its not found.
2148        */
2149       public static _Fields findByName(String name) {
2150         return byName.get(name);
2151       }
2152
2153       private final short _thriftId;
2154       private final String _fieldName;
2155
2156       _Fields(short thriftId, String fieldName) {
2157         _thriftId = thriftId;
2158         _fieldName = fieldName;
2159       }
2160
2161       public short getThriftFieldId() {
2162         return _thriftId;
2163       }
2164
2165       public String getFieldName() {
2166         return _fieldName;
2167       }
2168     }
2169
2170     // isset id assignments
2171     private static final int __SUCCESS_ISSET_ID = 0;
2172     private byte __isset_bitfield = 0;
2173     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2174     static {
2175       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2176       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2177           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
2178       metaDataMap = Collections.unmodifiableMap(tmpMap);
2179       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgpServer_result.class, metaDataMap);
2180     }
2181
2182     public startBgpServer_result() {
2183     }
2184
2185     public startBgpServer_result(
2186       int success)
2187     {
2188       this();
2189       this.success = success;
2190       setSuccessIsSet(true);
2191     }
2192
2193     /**
2194      * Performs a deep copy on <i>other</i>.
2195      */
2196     public startBgpServer_result(startBgpServer_result other) {
2197       __isset_bitfield = other.__isset_bitfield;
2198       this.success = other.success;
2199     }
2200
2201     public startBgpServer_result deepCopy() {
2202       return new startBgpServer_result(this);
2203     }
2204
2205     @Override
2206     public void clear() {
2207       setSuccessIsSet(false);
2208       this.success = 0;
2209     }
2210
2211     public int getSuccess() {
2212       return this.success;
2213     }
2214
2215     public startBgpServer_result setSuccess(int success) {
2216       this.success = success;
2217       setSuccessIsSet(true);
2218       return this;
2219     }
2220
2221     public void unsetSuccess() {
2222       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
2223     }
2224
2225     /** Returns true if field success is set (has been assigned a value) and false otherwise */
2226     public boolean isSetSuccess() {
2227       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
2228     }
2229
2230     public void setSuccessIsSet(boolean value) {
2231       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
2232     }
2233
2234     public void setFieldValue(_Fields field, Object value) {
2235       switch (field) {
2236       case SUCCESS:
2237         if (value == null) {
2238           unsetSuccess();
2239         } else {
2240           setSuccess((Integer)value);
2241         }
2242         break;
2243
2244       }
2245     }
2246
2247     public Object getFieldValue(_Fields field) {
2248       switch (field) {
2249       case SUCCESS:
2250         return Integer.valueOf(getSuccess());
2251
2252       }
2253       throw new IllegalStateException();
2254     }
2255
2256     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2257     public boolean isSet(_Fields field) {
2258       if (field == null) {
2259         throw new IllegalArgumentException();
2260       }
2261
2262       switch (field) {
2263       case SUCCESS:
2264         return isSetSuccess();
2265       }
2266       throw new IllegalStateException();
2267     }
2268
2269     @Override
2270     public boolean equals(Object that) {
2271       if (that == null)
2272         return false;
2273       if (that instanceof startBgpServer_result)
2274         return this.equals((startBgpServer_result)that);
2275       return false;
2276     }
2277
2278     public boolean equals(startBgpServer_result that) {
2279       if (that == null)
2280         return false;
2281
2282       boolean this_present_success = true;
2283       boolean that_present_success = true;
2284       if (this_present_success || that_present_success) {
2285         if (!(this_present_success && that_present_success))
2286           return false;
2287         if (this.success != that.success)
2288           return false;
2289       }
2290
2291       return true;
2292     }
2293
2294     @Override
2295     public int hashCode() {
2296       return 0;
2297     }
2298
2299     @Override
2300     public int compareTo(startBgpServer_result other) {
2301       if (!getClass().equals(other.getClass())) {
2302         return getClass().getName().compareTo(other.getClass().getName());
2303       }
2304
2305       int lastComparison = 0;
2306
2307       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
2308       if (lastComparison != 0) {
2309         return lastComparison;
2310       }
2311       if (isSetSuccess()) {
2312         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
2313         if (lastComparison != 0) {
2314           return lastComparison;
2315         }
2316       }
2317       return 0;
2318     }
2319
2320     public _Fields fieldForId(int fieldId) {
2321       return _Fields.findByThriftId(fieldId);
2322     }
2323
2324     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2325       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
2326     }
2327
2328     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2329       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
2330       }
2331
2332     @Override
2333     public String toString() {
2334       StringBuilder sb = new StringBuilder("startBgpServer_result(");
2335       boolean first = true;
2336
2337       sb.append("success:");
2338       sb.append(this.success);
2339       first = false;
2340       sb.append(")");
2341       return sb.toString();
2342     }
2343
2344     public void validate() throws org.apache.thrift.TException {
2345       // check for required fields
2346       // check for sub-struct validity
2347     }
2348
2349     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2350       try {
2351         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2352       } catch (org.apache.thrift.TException te) {
2353         throw new java.io.IOException(te);
2354       }
2355     }
2356
2357     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2358       try {
2359         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2360         __isset_bitfield = 0;
2361         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2362       } catch (org.apache.thrift.TException te) {
2363         throw new java.io.IOException(te);
2364       }
2365     }
2366
2367     private static class startBgpServer_resultStandardSchemeFactory implements SchemeFactory {
2368       public startBgpServer_resultStandardScheme getScheme() {
2369         return new startBgpServer_resultStandardScheme();
2370       }
2371     }
2372
2373     private static class startBgpServer_resultStandardScheme extends StandardScheme<startBgpServer_result> {
2374
2375       public void read(org.apache.thrift.protocol.TProtocol iprot, startBgpServer_result struct) throws org.apache.thrift.TException {
2376         org.apache.thrift.protocol.TField schemeField;
2377         iprot.readStructBegin();
2378         while (true)
2379         {
2380           schemeField = iprot.readFieldBegin();
2381           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
2382             break;
2383           }
2384           switch (schemeField.id) {
2385             case 0: // SUCCESS
2386               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
2387                 struct.success = iprot.readI32();
2388                 struct.setSuccessIsSet(true);
2389               } else { 
2390                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2391               }
2392               break;
2393             default:
2394               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2395           }
2396           iprot.readFieldEnd();
2397         }
2398         iprot.readStructEnd();
2399
2400         // check for required fields of primitive type, which can't be checked in the validate method
2401         struct.validate();
2402       }
2403
2404       public void write(org.apache.thrift.protocol.TProtocol oprot, startBgpServer_result struct) throws org.apache.thrift.TException {
2405         struct.validate();
2406
2407         oprot.writeStructBegin(STRUCT_DESC);
2408         if (struct.isSetSuccess()) {
2409           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2410           oprot.writeI32(struct.success);
2411           oprot.writeFieldEnd();
2412         }
2413         oprot.writeFieldStop();
2414         oprot.writeStructEnd();
2415       }
2416
2417     }
2418
2419     private static class startBgpServer_resultTupleSchemeFactory implements SchemeFactory {
2420       public startBgpServer_resultTupleScheme getScheme() {
2421         return new startBgpServer_resultTupleScheme();
2422       }
2423     }
2424
2425     private static class startBgpServer_resultTupleScheme extends TupleScheme<startBgpServer_result> {
2426
2427       @Override
2428       public void write(org.apache.thrift.protocol.TProtocol prot, startBgpServer_result struct) throws org.apache.thrift.TException {
2429         TTupleProtocol oprot = (TTupleProtocol) prot;
2430         BitSet optionals = new BitSet();
2431         if (struct.isSetSuccess()) {
2432           optionals.set(0);
2433         }
2434         oprot.writeBitSet(optionals, 1);
2435         if (struct.isSetSuccess()) {
2436           oprot.writeI32(struct.success);
2437         }
2438       }
2439
2440       @Override
2441       public void read(org.apache.thrift.protocol.TProtocol prot, startBgpServer_result struct) throws org.apache.thrift.TException {
2442         TTupleProtocol iprot = (TTupleProtocol) prot;
2443         BitSet incoming = iprot.readBitSet(1);
2444         if (incoming.get(0)) {
2445           struct.success = iprot.readI32();
2446           struct.setSuccessIsSet(true);
2447         }
2448       }
2449     }
2450
2451   }
2452
2453   public static class stopBgpServer_args implements org.apache.thrift.TBase<stopBgpServer_args, stopBgpServer_args._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgpServer_args>   {
2454     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgpServer_args");
2455
2456
2457     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
2458     static {
2459       schemes.put(StandardScheme.class, new stopBgpServer_argsStandardSchemeFactory());
2460       schemes.put(TupleScheme.class, new stopBgpServer_argsTupleSchemeFactory());
2461     }
2462
2463
2464     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2465     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2466 ;
2467
2468       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2469
2470       static {
2471         for (_Fields field : EnumSet.allOf(_Fields.class)) {
2472           byName.put(field.getFieldName(), field);
2473         }
2474       }
2475
2476       /**
2477        * Find the _Fields constant that matches fieldId, or null if its not found.
2478        */
2479       public static _Fields findByThriftId(int fieldId) {
2480         switch(fieldId) {
2481           default:
2482             return null;
2483         }
2484       }
2485
2486       /**
2487        * Find the _Fields constant that matches fieldId, throwing an exception
2488        * if it is not found.
2489        */
2490       public static _Fields findByThriftIdOrThrow(int fieldId) {
2491         _Fields fields = findByThriftId(fieldId);
2492         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2493         return fields;
2494       }
2495
2496       /**
2497        * Find the _Fields constant that matches name, or null if its not found.
2498        */
2499       public static _Fields findByName(String name) {
2500         return byName.get(name);
2501       }
2502
2503       private final short _thriftId;
2504       private final String _fieldName;
2505
2506       _Fields(short thriftId, String fieldName) {
2507         _thriftId = thriftId;
2508         _fieldName = fieldName;
2509       }
2510
2511       public short getThriftFieldId() {
2512         return _thriftId;
2513       }
2514
2515       public String getFieldName() {
2516         return _fieldName;
2517       }
2518     }
2519     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2520     static {
2521       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2522       metaDataMap = Collections.unmodifiableMap(tmpMap);
2523       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgpServer_args.class, metaDataMap);
2524     }
2525
2526     public stopBgpServer_args() {
2527     }
2528
2529     /**
2530      * Performs a deep copy on <i>other</i>.
2531      */
2532     public stopBgpServer_args(stopBgpServer_args other) {
2533     }
2534
2535     public stopBgpServer_args deepCopy() {
2536       return new stopBgpServer_args(this);
2537     }
2538
2539     @Override
2540     public void clear() {
2541     }
2542
2543     public void setFieldValue(_Fields field, Object value) {
2544       switch (field) {
2545       }
2546     }
2547
2548     public Object getFieldValue(_Fields field) {
2549       switch (field) {
2550       }
2551       throw new IllegalStateException();
2552     }
2553
2554     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2555     public boolean isSet(_Fields field) {
2556       if (field == null) {
2557         throw new IllegalArgumentException();
2558       }
2559
2560       switch (field) {
2561       }
2562       throw new IllegalStateException();
2563     }
2564
2565     @Override
2566     public boolean equals(Object that) {
2567       if (that == null)
2568         return false;
2569       if (that instanceof stopBgpServer_args)
2570         return this.equals((stopBgpServer_args)that);
2571       return false;
2572     }
2573
2574     public boolean equals(stopBgpServer_args that) {
2575       if (that == null)
2576         return false;
2577
2578       return true;
2579     }
2580
2581     @Override
2582     public int hashCode() {
2583       return 0;
2584     }
2585
2586     @Override
2587     public int compareTo(stopBgpServer_args other) {
2588       if (!getClass().equals(other.getClass())) {
2589         return getClass().getName().compareTo(other.getClass().getName());
2590       }
2591
2592       int lastComparison = 0;
2593
2594       return 0;
2595     }
2596
2597     public _Fields fieldForId(int fieldId) {
2598       return _Fields.findByThriftId(fieldId);
2599     }
2600
2601     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2602       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
2603     }
2604
2605     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2606       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
2607     }
2608
2609     @Override
2610     public String toString() {
2611       StringBuilder sb = new StringBuilder("stopBgpServer_args(");
2612       boolean first = true;
2613
2614       sb.append(")");
2615       return sb.toString();
2616     }
2617
2618     public void validate() throws org.apache.thrift.TException {
2619       // check for required fields
2620       // check for sub-struct validity
2621     }
2622
2623     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2624       try {
2625         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2626       } catch (org.apache.thrift.TException te) {
2627         throw new java.io.IOException(te);
2628       }
2629     }
2630
2631     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2632       try {
2633         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2634       } catch (org.apache.thrift.TException te) {
2635         throw new java.io.IOException(te);
2636       }
2637     }
2638
2639     private static class stopBgpServer_argsStandardSchemeFactory implements SchemeFactory {
2640       public stopBgpServer_argsStandardScheme getScheme() {
2641         return new stopBgpServer_argsStandardScheme();
2642       }
2643     }
2644
2645     private static class stopBgpServer_argsStandardScheme extends StandardScheme<stopBgpServer_args> {
2646
2647       public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2648         org.apache.thrift.protocol.TField schemeField;
2649         iprot.readStructBegin();
2650         while (true)
2651         {
2652           schemeField = iprot.readFieldBegin();
2653           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
2654             break;
2655           }
2656           switch (schemeField.id) {
2657             default:
2658               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2659           }
2660           iprot.readFieldEnd();
2661         }
2662         iprot.readStructEnd();
2663
2664         // check for required fields of primitive type, which can't be checked in the validate method
2665         struct.validate();
2666       }
2667
2668       public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2669         struct.validate();
2670
2671         oprot.writeStructBegin(STRUCT_DESC);
2672         oprot.writeFieldStop();
2673         oprot.writeStructEnd();
2674       }
2675
2676     }
2677
2678     private static class stopBgpServer_argsTupleSchemeFactory implements SchemeFactory {
2679       public stopBgpServer_argsTupleScheme getScheme() {
2680         return new stopBgpServer_argsTupleScheme();
2681       }
2682     }
2683
2684     private static class stopBgpServer_argsTupleScheme extends TupleScheme<stopBgpServer_args> {
2685
2686       @Override
2687       public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2688         TTupleProtocol oprot = (TTupleProtocol) prot;
2689       }
2690
2691       @Override
2692       public void read(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2693         TTupleProtocol iprot = (TTupleProtocol) prot;
2694       }
2695     }
2696
2697   }
2698
2699   public static class stopBgpServer_result implements org.apache.thrift.TBase<stopBgpServer_result, stopBgpServer_result._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgpServer_result>   {
2700     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgpServer_result");
2701
2702     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
2703
2704     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
2705     static {
2706       schemes.put(StandardScheme.class, new stopBgpServer_resultStandardSchemeFactory());
2707       schemes.put(TupleScheme.class, new stopBgpServer_resultTupleSchemeFactory());
2708     }
2709
2710     public int success; // required
2711
2712     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2713     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2714       SUCCESS((short)0, "success");
2715
2716       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2717
2718       static {
2719         for (_Fields field : EnumSet.allOf(_Fields.class)) {
2720           byName.put(field.getFieldName(), field);
2721         }
2722       }
2723
2724       /**
2725        * Find the _Fields constant that matches fieldId, or null if its not found.
2726        */
2727       public static _Fields findByThriftId(int fieldId) {
2728         switch(fieldId) {
2729           case 0: // SUCCESS
2730             return SUCCESS;
2731           default:
2732             return null;
2733         }
2734       }
2735
2736       /**
2737        * Find the _Fields constant that matches fieldId, throwing an exception
2738        * if it is not found.
2739        */
2740       public static _Fields findByThriftIdOrThrow(int fieldId) {
2741         _Fields fields = findByThriftId(fieldId);
2742         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2743         return fields;
2744       }
2745
2746       /**
2747        * Find the _Fields constant that matches name, or null if its not found.
2748        */
2749       public static _Fields findByName(String name) {
2750         return byName.get(name);
2751       }
2752
2753       private final short _thriftId;
2754       private final String _fieldName;
2755
2756       _Fields(short thriftId, String fieldName) {
2757         _thriftId = thriftId;
2758         _fieldName = fieldName;
2759       }
2760
2761       public short getThriftFieldId() {
2762         return _thriftId;
2763       }
2764
2765       public String getFieldName() {
2766         return _fieldName;
2767       }
2768     }
2769
2770     // isset id assignments
2771     private static final int __SUCCESS_ISSET_ID = 0;
2772     private byte __isset_bitfield = 0;
2773     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2774     static {
2775       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2776       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2777           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
2778       metaDataMap = Collections.unmodifiableMap(tmpMap);
2779       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgpServer_result.class, metaDataMap);
2780     }
2781
2782     public stopBgpServer_result() {
2783     }
2784
2785     public stopBgpServer_result(
2786       int success)
2787     {
2788       this();
2789       this.success = success;
2790       setSuccessIsSet(true);
2791     }
2792
2793     /**
2794      * Performs a deep copy on <i>other</i>.
2795      */
2796     public stopBgpServer_result(stopBgpServer_result other) {
2797       __isset_bitfield = other.__isset_bitfield;
2798       this.success = other.success;
2799     }
2800
2801     public stopBgpServer_result deepCopy() {
2802       return new stopBgpServer_result(this);
2803     }
2804
2805     @Override
2806     public void clear() {
2807       setSuccessIsSet(false);
2808       this.success = 0;
2809     }
2810
2811     public int getSuccess() {
2812       return this.success;
2813     }
2814
2815     public stopBgpServer_result setSuccess(int success) {
2816       this.success = success;
2817       setSuccessIsSet(true);
2818       return this;
2819     }
2820
2821     public void unsetSuccess() {
2822       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
2823     }
2824
2825     /** Returns true if field success is set (has been assigned a value) and false otherwise */
2826     public boolean isSetSuccess() {
2827       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
2828     }
2829
2830     public void setSuccessIsSet(boolean value) {
2831       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
2832     }
2833
2834     public void setFieldValue(_Fields field, Object value) {
2835       switch (field) {
2836       case SUCCESS:
2837         if (value == null) {
2838           unsetSuccess();
2839         } else {
2840           setSuccess((Integer)value);
2841         }
2842         break;
2843
2844       }
2845     }
2846
2847     public Object getFieldValue(_Fields field) {
2848       switch (field) {
2849       case SUCCESS:
2850         return Integer.valueOf(getSuccess());
2851
2852       }
2853       throw new IllegalStateException();
2854     }
2855
2856     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2857     public boolean isSet(_Fields field) {
2858       if (field == null) {
2859         throw new IllegalArgumentException();
2860       }
2861
2862       switch (field) {
2863       case SUCCESS:
2864         return isSetSuccess();
2865       }
2866       throw new IllegalStateException();
2867     }
2868
2869     @Override
2870     public boolean equals(Object that) {
2871       if (that == null)
2872         return false;
2873       if (that instanceof stopBgpServer_result)
2874         return this.equals((stopBgpServer_result)that);
2875       return false;
2876     }
2877
2878     public boolean equals(stopBgpServer_result that) {
2879       if (that == null)
2880         return false;
2881
2882       boolean this_present_success = true;
2883       boolean that_present_success = true;
2884       if (this_present_success || that_present_success) {
2885         if (!(this_present_success && that_present_success))
2886           return false;
2887         if (this.success != that.success)
2888           return false;
2889       }
2890
2891       return true;
2892     }
2893
2894     @Override
2895     public int hashCode() {
2896       return 0;
2897     }
2898
2899     @Override
2900     public int compareTo(stopBgpServer_result other) {
2901       if (!getClass().equals(other.getClass())) {
2902         return getClass().getName().compareTo(other.getClass().getName());
2903       }
2904
2905       int lastComparison = 0;
2906
2907       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
2908       if (lastComparison != 0) {
2909         return lastComparison;
2910       }
2911       if (isSetSuccess()) {
2912         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
2913         if (lastComparison != 0) {
2914           return lastComparison;
2915         }
2916       }
2917       return 0;
2918     }
2919
2920     public _Fields fieldForId(int fieldId) {
2921       return _Fields.findByThriftId(fieldId);
2922     }
2923
2924     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2925       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
2926     }
2927
2928     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2929       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
2930       }
2931
2932     @Override
2933     public String toString() {
2934       StringBuilder sb = new StringBuilder("stopBgpServer_result(");
2935       boolean first = true;
2936
2937       sb.append("success:");
2938       sb.append(this.success);
2939       first = false;
2940       sb.append(")");
2941       return sb.toString();
2942     }
2943
2944     public void validate() throws org.apache.thrift.TException {
2945       // check for required fields
2946       // check for sub-struct validity
2947     }
2948
2949     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2950       try {
2951         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2952       } catch (org.apache.thrift.TException te) {
2953         throw new java.io.IOException(te);
2954       }
2955     }
2956
2957     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2958       try {
2959         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2960         __isset_bitfield = 0;
2961         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2962       } catch (org.apache.thrift.TException te) {
2963         throw new java.io.IOException(te);
2964       }
2965     }
2966
2967     private static class stopBgpServer_resultStandardSchemeFactory implements SchemeFactory {
2968       public stopBgpServer_resultStandardScheme getScheme() {
2969         return new stopBgpServer_resultStandardScheme();
2970       }
2971     }
2972
2973     private static class stopBgpServer_resultStandardScheme extends StandardScheme<stopBgpServer_result> {
2974
2975       public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgpServer_result struct) throws org.apache.thrift.TException {
2976         org.apache.thrift.protocol.TField schemeField;
2977         iprot.readStructBegin();
2978         while (true)
2979         {
2980           schemeField = iprot.readFieldBegin();
2981           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
2982             break;
2983           }
2984           switch (schemeField.id) {
2985             case 0: // SUCCESS
2986               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
2987                 struct.success = iprot.readI32();
2988                 struct.setSuccessIsSet(true);
2989               } else { 
2990                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2991               }
2992               break;
2993             default:
2994               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2995           }
2996           iprot.readFieldEnd();
2997         }
2998         iprot.readStructEnd();
2999
3000         // check for required fields of primitive type, which can't be checked in the validate method
3001         struct.validate();
3002       }
3003
3004       public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgpServer_result struct) throws org.apache.thrift.TException {
3005         struct.validate();
3006
3007         oprot.writeStructBegin(STRUCT_DESC);
3008         if (struct.isSetSuccess()) {
3009           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010           oprot.writeI32(struct.success);
3011           oprot.writeFieldEnd();
3012         }
3013         oprot.writeFieldStop();
3014         oprot.writeStructEnd();
3015       }
3016
3017     }
3018
3019     private static class stopBgpServer_resultTupleSchemeFactory implements SchemeFactory {
3020       public stopBgpServer_resultTupleScheme getScheme() {
3021         return new stopBgpServer_resultTupleScheme();
3022       }
3023     }
3024
3025     private static class stopBgpServer_resultTupleScheme extends TupleScheme<stopBgpServer_result> {
3026
3027       @Override
3028       public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_result struct) throws org.apache.thrift.TException {
3029         TTupleProtocol oprot = (TTupleProtocol) prot;
3030         BitSet optionals = new BitSet();
3031         if (struct.isSetSuccess()) {
3032           optionals.set(0);
3033         }
3034         oprot.writeBitSet(optionals, 1);
3035         if (struct.isSetSuccess()) {
3036           oprot.writeI32(struct.success);
3037         }
3038       }
3039
3040       @Override
3041       public void read(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_result struct) throws org.apache.thrift.TException {
3042         TTupleProtocol iprot = (TTupleProtocol) prot;
3043         BitSet incoming = iprot.readBitSet(1);
3044         if (incoming.get(0)) {
3045           struct.success = iprot.readI32();
3046           struct.setSuccessIsSet(true);
3047         }
3048       }
3049     }
3050
3051   }
3052
3053   public static class createPeer_args implements org.apache.thrift.TBase<createPeer_args, createPeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_args>   {
3054     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_args");
3055
3056     private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
3057     private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)2);
3058
3059     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
3060     static {
3061       schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory());
3062       schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory());
3063     }
3064
3065     public String ipAddress; // required
3066     public int asNumber; // required
3067
3068     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3069     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3070       IP_ADDRESS((short)1, "ipAddress"),
3071       AS_NUMBER((short)2, "asNumber");
3072
3073       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3074
3075       static {
3076         for (_Fields field : EnumSet.allOf(_Fields.class)) {
3077           byName.put(field.getFieldName(), field);
3078         }
3079       }
3080
3081       /**
3082        * Find the _Fields constant that matches fieldId, or null if its not found.
3083        */
3084       public static _Fields findByThriftId(int fieldId) {
3085         switch(fieldId) {
3086           case 1: // IP_ADDRESS
3087             return IP_ADDRESS;
3088           case 2: // AS_NUMBER
3089             return AS_NUMBER;
3090           default:
3091             return null;
3092         }
3093       }
3094
3095       /**
3096        * Find the _Fields constant that matches fieldId, throwing an exception
3097        * if it is not found.
3098        */
3099       public static _Fields findByThriftIdOrThrow(int fieldId) {
3100         _Fields fields = findByThriftId(fieldId);
3101         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3102         return fields;
3103       }
3104
3105       /**
3106        * Find the _Fields constant that matches name, or null if its not found.
3107        */
3108       public static _Fields findByName(String name) {
3109         return byName.get(name);
3110       }
3111
3112       private final short _thriftId;
3113       private final String _fieldName;
3114
3115       _Fields(short thriftId, String fieldName) {
3116         _thriftId = thriftId;
3117         _fieldName = fieldName;
3118       }
3119
3120       public short getThriftFieldId() {
3121         return _thriftId;
3122       }
3123
3124       public String getFieldName() {
3125         return _fieldName;
3126       }
3127     }
3128
3129     // isset id assignments
3130     private static final int __ASNUMBER_ISSET_ID = 0;
3131     private byte __isset_bitfield = 0;
3132     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3133     static {
3134       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3135       tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3136           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3137       tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3138           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
3139       metaDataMap = Collections.unmodifiableMap(tmpMap);
3140       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_args.class, metaDataMap);
3141     }
3142
3143     public createPeer_args() {
3144     }
3145
3146     public createPeer_args(
3147       String ipAddress,
3148       int asNumber)
3149     {
3150       this();
3151       this.ipAddress = ipAddress;
3152       this.asNumber = asNumber;
3153       setAsNumberIsSet(true);
3154     }
3155
3156     /**
3157      * Performs a deep copy on <i>other</i>.
3158      */
3159     public createPeer_args(createPeer_args other) {
3160       __isset_bitfield = other.__isset_bitfield;
3161       if (other.isSetIpAddress()) {
3162         this.ipAddress = other.ipAddress;
3163       }
3164       this.asNumber = other.asNumber;
3165     }
3166
3167     public createPeer_args deepCopy() {
3168       return new createPeer_args(this);
3169     }
3170
3171     @Override
3172     public void clear() {
3173       this.ipAddress = null;
3174       setAsNumberIsSet(false);
3175       this.asNumber = 0;
3176     }
3177
3178     public String getIpAddress() {
3179       return this.ipAddress;
3180     }
3181
3182     public createPeer_args setIpAddress(String ipAddress) {
3183       this.ipAddress = ipAddress;
3184       return this;
3185     }
3186
3187     public void unsetIpAddress() {
3188       this.ipAddress = null;
3189     }
3190
3191     /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
3192     public boolean isSetIpAddress() {
3193       return this.ipAddress != null;
3194     }
3195
3196     public void setIpAddressIsSet(boolean value) {
3197       if (!value) {
3198         this.ipAddress = null;
3199       }
3200     }
3201
3202     public int getAsNumber() {
3203       return this.asNumber;
3204     }
3205
3206     public createPeer_args setAsNumber(int asNumber) {
3207       this.asNumber = asNumber;
3208       setAsNumberIsSet(true);
3209       return this;
3210     }
3211
3212     public void unsetAsNumber() {
3213       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
3214     }
3215
3216     /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
3217     public boolean isSetAsNumber() {
3218       return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
3219     }
3220
3221     public void setAsNumberIsSet(boolean value) {
3222       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
3223     }
3224
3225     public void setFieldValue(_Fields field, Object value) {
3226       switch (field) {
3227       case IP_ADDRESS:
3228         if (value == null) {
3229           unsetIpAddress();
3230         } else {
3231           setIpAddress((String)value);
3232         }
3233         break;
3234
3235       case AS_NUMBER:
3236         if (value == null) {
3237           unsetAsNumber();
3238         } else {
3239           setAsNumber((Integer)value);
3240         }
3241         break;
3242
3243       }
3244     }
3245
3246     public Object getFieldValue(_Fields field) {
3247       switch (field) {
3248       case IP_ADDRESS:
3249         return getIpAddress();
3250
3251       case AS_NUMBER:
3252         return Integer.valueOf(getAsNumber());
3253
3254       }
3255       throw new IllegalStateException();
3256     }
3257
3258     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3259     public boolean isSet(_Fields field) {
3260       if (field == null) {
3261         throw new IllegalArgumentException();
3262       }
3263
3264       switch (field) {
3265       case IP_ADDRESS:
3266         return isSetIpAddress();
3267       case AS_NUMBER:
3268         return isSetAsNumber();
3269       }
3270       throw new IllegalStateException();
3271     }
3272
3273     @Override
3274     public boolean equals(Object that) {
3275       if (that == null)
3276         return false;
3277       if (that instanceof createPeer_args)
3278         return this.equals((createPeer_args)that);
3279       return false;
3280     }
3281
3282     public boolean equals(createPeer_args that) {
3283       if (that == null)
3284         return false;
3285
3286       boolean this_present_ipAddress = true && this.isSetIpAddress();
3287       boolean that_present_ipAddress = true && that.isSetIpAddress();
3288       if (this_present_ipAddress || that_present_ipAddress) {
3289         if (!(this_present_ipAddress && that_present_ipAddress))
3290           return false;
3291         if (!this.ipAddress.equals(that.ipAddress))
3292           return false;
3293       }
3294
3295       boolean this_present_asNumber = true;
3296       boolean that_present_asNumber = true;
3297       if (this_present_asNumber || that_present_asNumber) {
3298         if (!(this_present_asNumber && that_present_asNumber))
3299           return false;
3300         if (this.asNumber != that.asNumber)
3301           return false;
3302       }
3303
3304       return true;
3305     }
3306
3307     @Override
3308     public int hashCode() {
3309       return 0;
3310     }
3311
3312     @Override
3313     public int compareTo(createPeer_args other) {
3314       if (!getClass().equals(other.getClass())) {
3315         return getClass().getName().compareTo(other.getClass().getName());
3316       }
3317
3318       int lastComparison = 0;
3319
3320       lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
3321       if (lastComparison != 0) {
3322         return lastComparison;
3323       }
3324       if (isSetIpAddress()) {
3325         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
3326         if (lastComparison != 0) {
3327           return lastComparison;
3328         }
3329       }
3330       lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
3331       if (lastComparison != 0) {
3332         return lastComparison;
3333       }
3334       if (isSetAsNumber()) {
3335         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
3336         if (lastComparison != 0) {
3337           return lastComparison;
3338         }
3339       }
3340       return 0;
3341     }
3342
3343     public _Fields fieldForId(int fieldId) {
3344       return _Fields.findByThriftId(fieldId);
3345     }
3346
3347     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3348       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
3349     }
3350
3351     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3352       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
3353     }
3354
3355     @Override
3356     public String toString() {
3357       StringBuilder sb = new StringBuilder("createPeer_args(");
3358       boolean first = true;
3359
3360       sb.append("ipAddress:");
3361       if (this.ipAddress == null) {
3362         sb.append("null");
3363       } else {
3364         sb.append(this.ipAddress);
3365       }
3366       first = false;
3367       if (!first) sb.append(", ");
3368       sb.append("asNumber:");
3369       sb.append(this.asNumber);
3370       first = false;
3371       sb.append(")");
3372       return sb.toString();
3373     }
3374
3375     public void validate() throws org.apache.thrift.TException {
3376       // check for required fields
3377       // check for sub-struct validity
3378     }
3379
3380     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3381       try {
3382         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3383       } catch (org.apache.thrift.TException te) {
3384         throw new java.io.IOException(te);
3385       }
3386     }
3387
3388     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3389       try {
3390         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3391         __isset_bitfield = 0;
3392         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3393       } catch (org.apache.thrift.TException te) {
3394         throw new java.io.IOException(te);
3395       }
3396     }
3397
3398     private static class createPeer_argsStandardSchemeFactory implements SchemeFactory {
3399       public createPeer_argsStandardScheme getScheme() {
3400         return new createPeer_argsStandardScheme();
3401       }
3402     }
3403
3404     private static class createPeer_argsStandardScheme extends StandardScheme<createPeer_args> {
3405
3406       public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_args struct) throws org.apache.thrift.TException {
3407         org.apache.thrift.protocol.TField schemeField;
3408         iprot.readStructBegin();
3409         while (true)
3410         {
3411           schemeField = iprot.readFieldBegin();
3412           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
3413             break;
3414           }
3415           switch (schemeField.id) {
3416             case 1: // IP_ADDRESS
3417               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
3418                 struct.ipAddress = iprot.readString();
3419                 struct.setIpAddressIsSet(true);
3420               } else { 
3421                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3422               }
3423               break;
3424             case 2: // AS_NUMBER
3425               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
3426                 struct.asNumber = iprot.readI32();
3427                 struct.setAsNumberIsSet(true);
3428               } else { 
3429                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3430               }
3431               break;
3432             default:
3433               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3434           }
3435           iprot.readFieldEnd();
3436         }
3437         iprot.readStructEnd();
3438
3439         // check for required fields of primitive type, which can't be checked in the validate method
3440         struct.validate();
3441       }
3442
3443       public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_args struct) throws org.apache.thrift.TException {
3444         struct.validate();
3445
3446         oprot.writeStructBegin(STRUCT_DESC);
3447         if (struct.ipAddress != null) {
3448           oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
3449           oprot.writeString(struct.ipAddress);
3450           oprot.writeFieldEnd();
3451         }
3452         oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
3453         oprot.writeI32(struct.asNumber);
3454         oprot.writeFieldEnd();
3455         oprot.writeFieldStop();
3456         oprot.writeStructEnd();
3457       }
3458
3459     }
3460
3461     private static class createPeer_argsTupleSchemeFactory implements SchemeFactory {
3462       public createPeer_argsTupleScheme getScheme() {
3463         return new createPeer_argsTupleScheme();
3464       }
3465     }
3466
3467     private static class createPeer_argsTupleScheme extends TupleScheme<createPeer_args> {
3468
3469       @Override
3470       public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
3471         TTupleProtocol oprot = (TTupleProtocol) prot;
3472         BitSet optionals = new BitSet();
3473         if (struct.isSetIpAddress()) {
3474           optionals.set(0);
3475         }
3476         if (struct.isSetAsNumber()) {
3477           optionals.set(1);
3478         }
3479         oprot.writeBitSet(optionals, 2);
3480         if (struct.isSetIpAddress()) {
3481           oprot.writeString(struct.ipAddress);
3482         }
3483         if (struct.isSetAsNumber()) {
3484           oprot.writeI32(struct.asNumber);
3485         }
3486       }
3487
3488       @Override
3489       public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
3490         TTupleProtocol iprot = (TTupleProtocol) prot;
3491         BitSet incoming = iprot.readBitSet(2);
3492         if (incoming.get(0)) {
3493           struct.ipAddress = iprot.readString();
3494           struct.setIpAddressIsSet(true);
3495         }
3496         if (incoming.get(1)) {
3497           struct.asNumber = iprot.readI32();
3498           struct.setAsNumberIsSet(true);
3499         }
3500       }
3501     }
3502
3503   }
3504
3505   public static class createPeer_result implements org.apache.thrift.TBase<createPeer_result, createPeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_result>   {
3506     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_result");
3507
3508     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
3509
3510     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
3511     static {
3512       schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory());
3513       schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory());
3514     }
3515
3516     public int success; // required
3517
3518     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3519     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3520       SUCCESS((short)0, "success");
3521
3522       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3523
3524       static {
3525         for (_Fields field : EnumSet.allOf(_Fields.class)) {
3526           byName.put(field.getFieldName(), field);
3527         }
3528       }
3529
3530       /**
3531        * Find the _Fields constant that matches fieldId, or null if its not found.
3532        */
3533       public static _Fields findByThriftId(int fieldId) {
3534         switch(fieldId) {
3535           case 0: // SUCCESS
3536             return SUCCESS;
3537           default:
3538             return null;
3539         }
3540       }
3541
3542       /**
3543        * Find the _Fields constant that matches fieldId, throwing an exception
3544        * if it is not found.
3545        */
3546       public static _Fields findByThriftIdOrThrow(int fieldId) {
3547         _Fields fields = findByThriftId(fieldId);
3548         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3549         return fields;
3550       }
3551
3552       /**
3553        * Find the _Fields constant that matches name, or null if its not found.
3554        */
3555       public static _Fields findByName(String name) {
3556         return byName.get(name);
3557       }
3558
3559       private final short _thriftId;
3560       private final String _fieldName;
3561
3562       _Fields(short thriftId, String fieldName) {
3563         _thriftId = thriftId;
3564         _fieldName = fieldName;
3565       }
3566
3567       public short getThriftFieldId() {
3568         return _thriftId;
3569       }
3570
3571       public String getFieldName() {
3572         return _fieldName;
3573       }
3574     }
3575
3576     // isset id assignments
3577     private static final int __SUCCESS_ISSET_ID = 0;
3578     private byte __isset_bitfield = 0;
3579     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3580     static {
3581       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3582       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3583           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
3584       metaDataMap = Collections.unmodifiableMap(tmpMap);
3585       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_result.class, metaDataMap);
3586     }
3587
3588     public createPeer_result() {
3589     }
3590
3591     public createPeer_result(
3592       int success)
3593     {
3594       this();
3595       this.success = success;
3596       setSuccessIsSet(true);
3597     }
3598
3599     /**
3600      * Performs a deep copy on <i>other</i>.
3601      */
3602     public createPeer_result(createPeer_result other) {
3603       __isset_bitfield = other.__isset_bitfield;
3604       this.success = other.success;
3605     }
3606
3607     public createPeer_result deepCopy() {
3608       return new createPeer_result(this);
3609     }
3610
3611     @Override
3612     public void clear() {
3613       setSuccessIsSet(false);
3614       this.success = 0;
3615     }
3616
3617     public int getSuccess() {
3618       return this.success;
3619     }
3620
3621     public createPeer_result setSuccess(int success) {
3622       this.success = success;
3623       setSuccessIsSet(true);
3624       return this;
3625     }
3626
3627     public void unsetSuccess() {
3628       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
3629     }
3630
3631     /** Returns true if field success is set (has been assigned a value) and false otherwise */
3632     public boolean isSetSuccess() {
3633       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
3634     }
3635
3636     public void setSuccessIsSet(boolean value) {
3637       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
3638     }
3639
3640     public void setFieldValue(_Fields field, Object value) {
3641       switch (field) {
3642       case SUCCESS:
3643         if (value == null) {
3644           unsetSuccess();
3645         } else {
3646           setSuccess((Integer)value);
3647         }
3648         break;
3649
3650       }
3651     }
3652
3653     public Object getFieldValue(_Fields field) {
3654       switch (field) {
3655       case SUCCESS:
3656         return Integer.valueOf(getSuccess());
3657
3658       }
3659       throw new IllegalStateException();
3660     }
3661
3662     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3663     public boolean isSet(_Fields field) {
3664       if (field == null) {
3665         throw new IllegalArgumentException();
3666       }
3667
3668       switch (field) {
3669       case SUCCESS:
3670         return isSetSuccess();
3671       }
3672       throw new IllegalStateException();
3673     }
3674
3675     @Override
3676     public boolean equals(Object that) {
3677       if (that == null)
3678         return false;
3679       if (that instanceof createPeer_result)
3680         return this.equals((createPeer_result)that);
3681       return false;
3682     }
3683
3684     public boolean equals(createPeer_result that) {
3685       if (that == null)
3686         return false;
3687
3688       boolean this_present_success = true;
3689       boolean that_present_success = true;
3690       if (this_present_success || that_present_success) {
3691         if (!(this_present_success && that_present_success))
3692           return false;
3693         if (this.success != that.success)
3694           return false;
3695       }
3696
3697       return true;
3698     }
3699
3700     @Override
3701     public int hashCode() {
3702       return 0;
3703     }
3704
3705     @Override
3706     public int compareTo(createPeer_result other) {
3707       if (!getClass().equals(other.getClass())) {
3708         return getClass().getName().compareTo(other.getClass().getName());
3709       }
3710
3711       int lastComparison = 0;
3712
3713       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
3714       if (lastComparison != 0) {
3715         return lastComparison;
3716       }
3717       if (isSetSuccess()) {
3718         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
3719         if (lastComparison != 0) {
3720           return lastComparison;
3721         }
3722       }
3723       return 0;
3724     }
3725
3726     public _Fields fieldForId(int fieldId) {
3727       return _Fields.findByThriftId(fieldId);
3728     }
3729
3730     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3731       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
3732     }
3733
3734     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3735       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
3736       }
3737
3738     @Override
3739     public String toString() {
3740       StringBuilder sb = new StringBuilder("createPeer_result(");
3741       boolean first = true;
3742
3743       sb.append("success:");
3744       sb.append(this.success);
3745       first = false;
3746       sb.append(")");
3747       return sb.toString();
3748     }
3749
3750     public void validate() throws org.apache.thrift.TException {
3751       // check for required fields
3752       // check for sub-struct validity
3753     }
3754
3755     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3756       try {
3757         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3758       } catch (org.apache.thrift.TException te) {
3759         throw new java.io.IOException(te);
3760       }
3761     }
3762
3763     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3764       try {
3765         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3766         __isset_bitfield = 0;
3767         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3768       } catch (org.apache.thrift.TException te) {
3769         throw new java.io.IOException(te);
3770       }
3771     }
3772
3773     private static class createPeer_resultStandardSchemeFactory implements SchemeFactory {
3774       public createPeer_resultStandardScheme getScheme() {
3775         return new createPeer_resultStandardScheme();
3776       }
3777     }
3778
3779     private static class createPeer_resultStandardScheme extends StandardScheme<createPeer_result> {
3780
3781       public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_result struct) throws org.apache.thrift.TException {
3782         org.apache.thrift.protocol.TField schemeField;
3783         iprot.readStructBegin();
3784         while (true)
3785         {
3786           schemeField = iprot.readFieldBegin();
3787           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
3788             break;
3789           }
3790           switch (schemeField.id) {
3791             case 0: // SUCCESS
3792               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
3793                 struct.success = iprot.readI32();
3794                 struct.setSuccessIsSet(true);
3795               } else { 
3796                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3797               }
3798               break;
3799             default:
3800               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3801           }
3802           iprot.readFieldEnd();
3803         }
3804         iprot.readStructEnd();
3805
3806         // check for required fields of primitive type, which can't be checked in the validate method
3807         struct.validate();
3808       }
3809
3810       public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_result struct) throws org.apache.thrift.TException {
3811         struct.validate();
3812
3813         oprot.writeStructBegin(STRUCT_DESC);
3814         if (struct.isSetSuccess()) {
3815           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3816           oprot.writeI32(struct.success);
3817           oprot.writeFieldEnd();
3818         }
3819         oprot.writeFieldStop();
3820         oprot.writeStructEnd();
3821       }
3822
3823     }
3824
3825     private static class createPeer_resultTupleSchemeFactory implements SchemeFactory {
3826       public createPeer_resultTupleScheme getScheme() {
3827         return new createPeer_resultTupleScheme();
3828       }
3829     }
3830
3831     private static class createPeer_resultTupleScheme extends TupleScheme<createPeer_result> {
3832
3833       @Override
3834       public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
3835         TTupleProtocol oprot = (TTupleProtocol) prot;
3836         BitSet optionals = new BitSet();
3837         if (struct.isSetSuccess()) {
3838           optionals.set(0);
3839         }
3840         oprot.writeBitSet(optionals, 1);
3841         if (struct.isSetSuccess()) {
3842           oprot.writeI32(struct.success);
3843         }
3844       }
3845
3846       @Override
3847       public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
3848         TTupleProtocol iprot = (TTupleProtocol) prot;
3849         BitSet incoming = iprot.readBitSet(1);
3850         if (incoming.get(0)) {
3851           struct.success = iprot.readI32();
3852           struct.setSuccessIsSet(true);
3853         }
3854       }
3855     }
3856
3857   }
3858
3859   public static class deletePeer_args implements org.apache.thrift.TBase<deletePeer_args, deletePeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_args>   {
3860     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_args");
3861
3862     private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
3863
3864     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
3865     static {
3866       schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory());
3867       schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory());
3868     }
3869
3870     public String ipAddress; // required
3871
3872     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3873     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3874       IP_ADDRESS((short)1, "ipAddress");
3875
3876       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3877
3878       static {
3879         for (_Fields field : EnumSet.allOf(_Fields.class)) {
3880           byName.put(field.getFieldName(), field);
3881         }
3882       }
3883
3884       /**
3885        * Find the _Fields constant that matches fieldId, or null if its not found.
3886        */
3887       public static _Fields findByThriftId(int fieldId) {
3888         switch(fieldId) {
3889           case 1: // IP_ADDRESS
3890             return IP_ADDRESS;
3891           default:
3892             return null;
3893         }
3894       }
3895
3896       /**
3897        * Find the _Fields constant that matches fieldId, throwing an exception
3898        * if it is not found.
3899        */
3900       public static _Fields findByThriftIdOrThrow(int fieldId) {
3901         _Fields fields = findByThriftId(fieldId);
3902         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3903         return fields;
3904       }
3905
3906       /**
3907        * Find the _Fields constant that matches name, or null if its not found.
3908        */
3909       public static _Fields findByName(String name) {
3910         return byName.get(name);
3911       }
3912
3913       private final short _thriftId;
3914       private final String _fieldName;
3915
3916       _Fields(short thriftId, String fieldName) {
3917         _thriftId = thriftId;
3918         _fieldName = fieldName;
3919       }
3920
3921       public short getThriftFieldId() {
3922         return _thriftId;
3923       }
3924
3925       public String getFieldName() {
3926         return _fieldName;
3927       }
3928     }
3929
3930     // isset id assignments
3931     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3932     static {
3933       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3934       tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3935           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3936       metaDataMap = Collections.unmodifiableMap(tmpMap);
3937       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_args.class, metaDataMap);
3938     }
3939
3940     public deletePeer_args() {
3941     }
3942
3943     public deletePeer_args(
3944       String ipAddress)
3945     {
3946       this();
3947       this.ipAddress = ipAddress;
3948     }
3949
3950     /**
3951      * Performs a deep copy on <i>other</i>.
3952      */
3953     public deletePeer_args(deletePeer_args other) {
3954       if (other.isSetIpAddress()) {
3955         this.ipAddress = other.ipAddress;
3956       }
3957     }
3958
3959     public deletePeer_args deepCopy() {
3960       return new deletePeer_args(this);
3961     }
3962
3963     @Override
3964     public void clear() {
3965       this.ipAddress = null;
3966     }
3967
3968     public String getIpAddress() {
3969       return this.ipAddress;
3970     }
3971
3972     public deletePeer_args setIpAddress(String ipAddress) {
3973       this.ipAddress = ipAddress;
3974       return this;
3975     }
3976
3977     public void unsetIpAddress() {
3978       this.ipAddress = null;
3979     }
3980
3981     /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
3982     public boolean isSetIpAddress() {
3983       return this.ipAddress != null;
3984     }
3985
3986     public void setIpAddressIsSet(boolean value) {
3987       if (!value) {
3988         this.ipAddress = null;
3989       }
3990     }
3991
3992     public void setFieldValue(_Fields field, Object value) {
3993       switch (field) {
3994       case IP_ADDRESS:
3995         if (value == null) {
3996           unsetIpAddress();
3997         } else {
3998           setIpAddress((String)value);
3999         }
4000         break;
4001
4002       }
4003     }
4004
4005     public Object getFieldValue(_Fields field) {
4006       switch (field) {
4007       case IP_ADDRESS:
4008         return getIpAddress();
4009
4010       }
4011       throw new IllegalStateException();
4012     }
4013
4014     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4015     public boolean isSet(_Fields field) {
4016       if (field == null) {
4017         throw new IllegalArgumentException();
4018       }
4019
4020       switch (field) {
4021       case IP_ADDRESS:
4022         return isSetIpAddress();
4023       }
4024       throw new IllegalStateException();
4025     }
4026
4027     @Override
4028     public boolean equals(Object that) {
4029       if (that == null)
4030         return false;
4031       if (that instanceof deletePeer_args)
4032         return this.equals((deletePeer_args)that);
4033       return false;
4034     }
4035
4036     public boolean equals(deletePeer_args that) {
4037       if (that == null)
4038         return false;
4039
4040       boolean this_present_ipAddress = true && this.isSetIpAddress();
4041       boolean that_present_ipAddress = true && that.isSetIpAddress();
4042       if (this_present_ipAddress || that_present_ipAddress) {
4043         if (!(this_present_ipAddress && that_present_ipAddress))
4044           return false;
4045         if (!this.ipAddress.equals(that.ipAddress))
4046           return false;
4047       }
4048
4049       return true;
4050     }
4051
4052     @Override
4053     public int hashCode() {
4054       return 0;
4055     }
4056
4057     @Override
4058     public int compareTo(deletePeer_args other) {
4059       if (!getClass().equals(other.getClass())) {
4060         return getClass().getName().compareTo(other.getClass().getName());
4061       }
4062
4063       int lastComparison = 0;
4064
4065       lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
4066       if (lastComparison != 0) {
4067         return lastComparison;
4068       }
4069       if (isSetIpAddress()) {
4070         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
4071         if (lastComparison != 0) {
4072           return lastComparison;
4073         }
4074       }
4075       return 0;
4076     }
4077
4078     public _Fields fieldForId(int fieldId) {
4079       return _Fields.findByThriftId(fieldId);
4080     }
4081
4082     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4083       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
4084     }
4085
4086     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4087       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
4088     }
4089
4090     @Override
4091     public String toString() {
4092       StringBuilder sb = new StringBuilder("deletePeer_args(");
4093       boolean first = true;
4094
4095       sb.append("ipAddress:");
4096       if (this.ipAddress == null) {
4097         sb.append("null");
4098       } else {
4099         sb.append(this.ipAddress);
4100       }
4101       first = false;
4102       sb.append(")");
4103       return sb.toString();
4104     }
4105
4106     public void validate() throws org.apache.thrift.TException {
4107       // check for required fields
4108       // check for sub-struct validity
4109     }
4110
4111     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4112       try {
4113         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4114       } catch (org.apache.thrift.TException te) {
4115         throw new java.io.IOException(te);
4116       }
4117     }
4118
4119     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4120       try {
4121         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4122       } catch (org.apache.thrift.TException te) {
4123         throw new java.io.IOException(te);
4124       }
4125     }
4126
4127     private static class deletePeer_argsStandardSchemeFactory implements SchemeFactory {
4128       public deletePeer_argsStandardScheme getScheme() {
4129         return new deletePeer_argsStandardScheme();
4130       }
4131     }
4132
4133     private static class deletePeer_argsStandardScheme extends StandardScheme<deletePeer_args> {
4134
4135       public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_args struct) throws org.apache.thrift.TException {
4136         org.apache.thrift.protocol.TField schemeField;
4137         iprot.readStructBegin();
4138         while (true)
4139         {
4140           schemeField = iprot.readFieldBegin();
4141           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
4142             break;
4143           }
4144           switch (schemeField.id) {
4145             case 1: // IP_ADDRESS
4146               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
4147                 struct.ipAddress = iprot.readString();
4148                 struct.setIpAddressIsSet(true);
4149               } else { 
4150                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4151               }
4152               break;
4153             default:
4154               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4155           }
4156           iprot.readFieldEnd();
4157         }
4158         iprot.readStructEnd();
4159
4160         // check for required fields of primitive type, which can't be checked in the validate method
4161         struct.validate();
4162       }
4163
4164       public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_args struct) throws org.apache.thrift.TException {
4165         struct.validate();
4166
4167         oprot.writeStructBegin(STRUCT_DESC);
4168         if (struct.ipAddress != null) {
4169           oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
4170           oprot.writeString(struct.ipAddress);
4171           oprot.writeFieldEnd();
4172         }
4173         oprot.writeFieldStop();
4174         oprot.writeStructEnd();
4175       }
4176
4177     }
4178
4179     private static class deletePeer_argsTupleSchemeFactory implements SchemeFactory {
4180       public deletePeer_argsTupleScheme getScheme() {
4181         return new deletePeer_argsTupleScheme();
4182       }
4183     }
4184
4185     private static class deletePeer_argsTupleScheme extends TupleScheme<deletePeer_args> {
4186
4187       @Override
4188       public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
4189         TTupleProtocol oprot = (TTupleProtocol) prot;
4190         BitSet optionals = new BitSet();
4191         if (struct.isSetIpAddress()) {
4192           optionals.set(0);
4193         }
4194         oprot.writeBitSet(optionals, 1);
4195         if (struct.isSetIpAddress()) {
4196           oprot.writeString(struct.ipAddress);
4197         }
4198       }
4199
4200       @Override
4201       public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
4202         TTupleProtocol iprot = (TTupleProtocol) prot;
4203         BitSet incoming = iprot.readBitSet(1);
4204         if (incoming.get(0)) {
4205           struct.ipAddress = iprot.readString();
4206           struct.setIpAddressIsSet(true);
4207         }
4208       }
4209     }
4210
4211   }
4212
4213   public static class deletePeer_result implements org.apache.thrift.TBase<deletePeer_result, deletePeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_result>   {
4214     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_result");
4215
4216     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
4217
4218     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
4219     static {
4220       schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory());
4221       schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory());
4222     }
4223
4224     public int success; // required
4225
4226     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4227     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4228       SUCCESS((short)0, "success");
4229
4230       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4231
4232       static {
4233         for (_Fields field : EnumSet.allOf(_Fields.class)) {
4234           byName.put(field.getFieldName(), field);
4235         }
4236       }
4237
4238       /**
4239        * Find the _Fields constant that matches fieldId, or null if its not found.
4240        */
4241       public static _Fields findByThriftId(int fieldId) {
4242         switch(fieldId) {
4243           case 0: // SUCCESS
4244             return SUCCESS;
4245           default:
4246             return null;
4247         }
4248       }
4249
4250       /**
4251        * Find the _Fields constant that matches fieldId, throwing an exception
4252        * if it is not found.
4253        */
4254       public static _Fields findByThriftIdOrThrow(int fieldId) {
4255         _Fields fields = findByThriftId(fieldId);
4256         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4257         return fields;
4258       }
4259
4260       /**
4261        * Find the _Fields constant that matches name, or null if its not found.
4262        */
4263       public static _Fields findByName(String name) {
4264         return byName.get(name);
4265       }
4266
4267       private final short _thriftId;
4268       private final String _fieldName;
4269
4270       _Fields(short thriftId, String fieldName) {
4271         _thriftId = thriftId;
4272         _fieldName = fieldName;
4273       }
4274
4275       public short getThriftFieldId() {
4276         return _thriftId;
4277       }
4278
4279       public String getFieldName() {
4280         return _fieldName;
4281       }
4282     }
4283
4284     // isset id assignments
4285     private static final int __SUCCESS_ISSET_ID = 0;
4286     private byte __isset_bitfield = 0;
4287     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4288     static {
4289       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4290       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4291           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
4292       metaDataMap = Collections.unmodifiableMap(tmpMap);
4293       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_result.class, metaDataMap);
4294     }
4295
4296     public deletePeer_result() {
4297     }
4298
4299     public deletePeer_result(
4300       int success)
4301     {
4302       this();
4303       this.success = success;
4304       setSuccessIsSet(true);
4305     }
4306
4307     /**
4308      * Performs a deep copy on <i>other</i>.
4309      */
4310     public deletePeer_result(deletePeer_result other) {
4311       __isset_bitfield = other.__isset_bitfield;
4312       this.success = other.success;
4313     }
4314
4315     public deletePeer_result deepCopy() {
4316       return new deletePeer_result(this);
4317     }
4318
4319     @Override
4320     public void clear() {
4321       setSuccessIsSet(false);
4322       this.success = 0;
4323     }
4324
4325     public int getSuccess() {
4326       return this.success;
4327     }
4328
4329     public deletePeer_result setSuccess(int success) {
4330       this.success = success;
4331       setSuccessIsSet(true);
4332       return this;
4333     }
4334
4335     public void unsetSuccess() {
4336       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
4337     }
4338
4339     /** Returns true if field success is set (has been assigned a value) and false otherwise */
4340     public boolean isSetSuccess() {
4341       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
4342     }
4343
4344     public void setSuccessIsSet(boolean value) {
4345       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
4346     }
4347
4348     public void setFieldValue(_Fields field, Object value) {
4349       switch (field) {
4350       case SUCCESS:
4351         if (value == null) {
4352           unsetSuccess();
4353         } else {
4354           setSuccess((Integer)value);
4355         }
4356         break;
4357
4358       }
4359     }
4360
4361     public Object getFieldValue(_Fields field) {
4362       switch (field) {
4363       case SUCCESS:
4364         return Integer.valueOf(getSuccess());
4365
4366       }
4367       throw new IllegalStateException();
4368     }
4369
4370     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4371     public boolean isSet(_Fields field) {
4372       if (field == null) {
4373         throw new IllegalArgumentException();
4374       }
4375
4376       switch (field) {
4377       case SUCCESS:
4378         return isSetSuccess();
4379       }
4380       throw new IllegalStateException();
4381     }
4382
4383     @Override
4384     public boolean equals(Object that) {
4385       if (that == null)
4386         return false;
4387       if (that instanceof deletePeer_result)
4388         return this.equals((deletePeer_result)that);
4389       return false;
4390     }
4391
4392     public boolean equals(deletePeer_result that) {
4393       if (that == null)
4394         return false;
4395
4396       boolean this_present_success = true;
4397       boolean that_present_success = true;
4398       if (this_present_success || that_present_success) {
4399         if (!(this_present_success && that_present_success))
4400           return false;
4401         if (this.success != that.success)
4402           return false;
4403       }
4404
4405       return true;
4406     }
4407
4408     @Override
4409     public int hashCode() {
4410       return 0;
4411     }
4412
4413     @Override
4414     public int compareTo(deletePeer_result other) {
4415       if (!getClass().equals(other.getClass())) {
4416         return getClass().getName().compareTo(other.getClass().getName());
4417       }
4418
4419       int lastComparison = 0;
4420
4421       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
4422       if (lastComparison != 0) {
4423         return lastComparison;
4424       }
4425       if (isSetSuccess()) {
4426         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
4427         if (lastComparison != 0) {
4428           return lastComparison;
4429         }
4430       }
4431       return 0;
4432     }
4433
4434     public _Fields fieldForId(int fieldId) {
4435       return _Fields.findByThriftId(fieldId);
4436     }
4437
4438     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4439       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
4440     }
4441
4442     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4443       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
4444       }
4445
4446     @Override
4447     public String toString() {
4448       StringBuilder sb = new StringBuilder("deletePeer_result(");
4449       boolean first = true;
4450
4451       sb.append("success:");
4452       sb.append(this.success);
4453       first = false;
4454       sb.append(")");
4455       return sb.toString();
4456     }
4457
4458     public void validate() throws org.apache.thrift.TException {
4459       // check for required fields
4460       // check for sub-struct validity
4461     }
4462
4463     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4464       try {
4465         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4466       } catch (org.apache.thrift.TException te) {
4467         throw new java.io.IOException(te);
4468       }
4469     }
4470
4471     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4472       try {
4473         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4474         __isset_bitfield = 0;
4475         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4476       } catch (org.apache.thrift.TException te) {
4477         throw new java.io.IOException(te);
4478       }
4479     }
4480
4481     private static class deletePeer_resultStandardSchemeFactory implements SchemeFactory {
4482       public deletePeer_resultStandardScheme getScheme() {
4483         return new deletePeer_resultStandardScheme();
4484       }
4485     }
4486
4487     private static class deletePeer_resultStandardScheme extends StandardScheme<deletePeer_result> {
4488
4489       public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_result struct) throws org.apache.thrift.TException {
4490         org.apache.thrift.protocol.TField schemeField;
4491         iprot.readStructBegin();
4492         while (true)
4493         {
4494           schemeField = iprot.readFieldBegin();
4495           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
4496             break;
4497           }
4498           switch (schemeField.id) {
4499             case 0: // SUCCESS
4500               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
4501                 struct.success = iprot.readI32();
4502                 struct.setSuccessIsSet(true);
4503               } else { 
4504                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4505               }
4506               break;
4507             default:
4508               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4509           }
4510           iprot.readFieldEnd();
4511         }
4512         iprot.readStructEnd();
4513
4514         // check for required fields of primitive type, which can't be checked in the validate method
4515         struct.validate();
4516       }
4517
4518       public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_result struct) throws org.apache.thrift.TException {
4519         struct.validate();
4520
4521         oprot.writeStructBegin(STRUCT_DESC);
4522         if (struct.isSetSuccess()) {
4523           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4524           oprot.writeI32(struct.success);
4525           oprot.writeFieldEnd();
4526         }
4527         oprot.writeFieldStop();
4528         oprot.writeStructEnd();
4529       }
4530
4531     }
4532
4533     private static class deletePeer_resultTupleSchemeFactory implements SchemeFactory {
4534       public deletePeer_resultTupleScheme getScheme() {
4535         return new deletePeer_resultTupleScheme();
4536       }
4537     }
4538
4539     private static class deletePeer_resultTupleScheme extends TupleScheme<deletePeer_result> {
4540
4541       @Override
4542       public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
4543         TTupleProtocol oprot = (TTupleProtocol) prot;
4544         BitSet optionals = new BitSet();
4545         if (struct.isSetSuccess()) {
4546           optionals.set(0);
4547         }
4548         oprot.writeBitSet(optionals, 1);
4549         if (struct.isSetSuccess()) {
4550           oprot.writeI32(struct.success);
4551         }
4552       }
4553
4554       @Override
4555       public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
4556         TTupleProtocol iprot = (TTupleProtocol) prot;
4557         BitSet incoming = iprot.readBitSet(1);
4558         if (incoming.get(0)) {
4559           struct.success = iprot.readI32();
4560           struct.setSuccessIsSet(true);
4561         }
4562       }
4563     }
4564
4565   }
4566
4567   public static class addVrf_args implements org.apache.thrift.TBase<addVrf_args, addVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_args>   {
4568     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_args");
4569
4570     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);
4571     private static final org.apache.thrift.protocol.TField IRTS_FIELD_DESC = new org.apache.thrift.protocol.TField("irts", org.apache.thrift.protocol.TType.LIST, (short)2);
4572     private static final org.apache.thrift.protocol.TField ERTS_FIELD_DESC = new org.apache.thrift.protocol.TField("erts", org.apache.thrift.protocol.TType.LIST, (short)3);
4573
4574     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
4575     static {
4576       schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory());
4577       schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory());
4578     }
4579
4580     public String rd; // required
4581     public List<String> irts; // required
4582     public List<String> erts; // required
4583
4584     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4585     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4586       RD((short)1, "rd"),
4587       IRTS((short)2, "irts"),
4588       ERTS((short)3, "erts");
4589
4590       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4591
4592       static {
4593         for (_Fields field : EnumSet.allOf(_Fields.class)) {
4594           byName.put(field.getFieldName(), field);
4595         }
4596       }
4597
4598       /**
4599        * Find the _Fields constant that matches fieldId, or null if its not found.
4600        */
4601       public static _Fields findByThriftId(int fieldId) {
4602         switch(fieldId) {
4603           case 1: // RD
4604             return RD;
4605           case 2: // IRTS
4606             return IRTS;
4607           case 3: // ERTS
4608             return ERTS;
4609           default:
4610             return null;
4611         }
4612       }
4613
4614       /**
4615        * Find the _Fields constant that matches fieldId, throwing an exception
4616        * if it is not found.
4617        */
4618       public static _Fields findByThriftIdOrThrow(int fieldId) {
4619         _Fields fields = findByThriftId(fieldId);
4620         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4621         return fields;
4622       }
4623
4624       /**
4625        * Find the _Fields constant that matches name, or null if its not found.
4626        */
4627       public static _Fields findByName(String name) {
4628         return byName.get(name);
4629       }
4630
4631       private final short _thriftId;
4632       private final String _fieldName;
4633
4634       _Fields(short thriftId, String fieldName) {
4635         _thriftId = thriftId;
4636         _fieldName = fieldName;
4637       }
4638
4639       public short getThriftFieldId() {
4640         return _thriftId;
4641       }
4642
4643       public String getFieldName() {
4644         return _fieldName;
4645       }
4646     }
4647
4648     // isset id assignments
4649     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4650     static {
4651       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4652       tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4653           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4654       tmpMap.put(_Fields.IRTS, new org.apache.thrift.meta_data.FieldMetaData("irts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4655           new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4656               new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
4657       tmpMap.put(_Fields.ERTS, new org.apache.thrift.meta_data.FieldMetaData("erts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4658           new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4659               new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
4660       metaDataMap = Collections.unmodifiableMap(tmpMap);
4661       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_args.class, metaDataMap);
4662     }
4663
4664     public addVrf_args() {
4665     }
4666
4667     public addVrf_args(
4668       String rd,
4669       List<String> irts,
4670       List<String> erts)
4671     {
4672       this();
4673       this.rd = rd;
4674       this.irts = irts;
4675       this.erts = erts;
4676     }
4677
4678     /**
4679      * Performs a deep copy on <i>other</i>.
4680      */
4681     public addVrf_args(addVrf_args other) {
4682       if (other.isSetRd()) {
4683         this.rd = other.rd;
4684       }
4685       if (other.isSetIrts()) {
4686         List<String> __this__irts = new ArrayList<String>(other.irts);
4687         this.irts = __this__irts;
4688       }
4689       if (other.isSetErts()) {
4690         List<String> __this__erts = new ArrayList<String>(other.erts);
4691         this.erts = __this__erts;
4692       }
4693     }
4694
4695     public addVrf_args deepCopy() {
4696       return new addVrf_args(this);
4697     }
4698
4699     @Override
4700     public void clear() {
4701       this.rd = null;
4702       this.irts = null;
4703       this.erts = null;
4704     }
4705
4706     public String getRd() {
4707       return this.rd;
4708     }
4709
4710     public addVrf_args setRd(String rd) {
4711       this.rd = rd;
4712       return this;
4713     }
4714
4715     public void unsetRd() {
4716       this.rd = null;
4717     }
4718
4719     /** Returns true if field rd is set (has been assigned a value) and false otherwise */
4720     public boolean isSetRd() {
4721       return this.rd != null;
4722     }
4723
4724     public void setRdIsSet(boolean value) {
4725       if (!value) {
4726         this.rd = null;
4727       }
4728     }
4729
4730     public int getIrtsSize() {
4731       return (this.irts == null) ? 0 : this.irts.size();
4732     }
4733
4734     public java.util.Iterator<String> getIrtsIterator() {
4735       return (this.irts == null) ? null : this.irts.iterator();
4736     }
4737
4738     public void addToIrts(String elem) {
4739       if (this.irts == null) {
4740         this.irts = new ArrayList<String>();
4741       }
4742       this.irts.add(elem);
4743     }
4744
4745     public List<String> getIrts() {
4746       return this.irts;
4747     }
4748
4749     public addVrf_args setIrts(List<String> irts) {
4750       this.irts = irts;
4751       return this;
4752     }
4753
4754     public void unsetIrts() {
4755       this.irts = null;
4756     }
4757
4758     /** Returns true if field irts is set (has been assigned a value) and false otherwise */
4759     public boolean isSetIrts() {
4760       return this.irts != null;
4761     }
4762
4763     public void setIrtsIsSet(boolean value) {
4764       if (!value) {
4765         this.irts = null;
4766       }
4767     }
4768
4769     public int getErtsSize() {
4770       return (this.erts == null) ? 0 : this.erts.size();
4771     }
4772
4773     public java.util.Iterator<String> getErtsIterator() {
4774       return (this.erts == null) ? null : this.erts.iterator();
4775     }
4776
4777     public void addToErts(String elem) {
4778       if (this.erts == null) {
4779         this.erts = new ArrayList<String>();
4780       }
4781       this.erts.add(elem);
4782     }
4783
4784     public List<String> getErts() {
4785       return this.erts;
4786     }
4787
4788     public addVrf_args setErts(List<String> erts) {
4789       this.erts = erts;
4790       return this;
4791     }
4792
4793     public void unsetErts() {
4794       this.erts = null;
4795     }
4796
4797     /** Returns true if field erts is set (has been assigned a value) and false otherwise */
4798     public boolean isSetErts() {
4799       return this.erts != null;
4800     }
4801
4802     public void setErtsIsSet(boolean value) {
4803       if (!value) {
4804         this.erts = null;
4805       }
4806     }
4807
4808     public void setFieldValue(_Fields field, Object value) {
4809       switch (field) {
4810       case RD:
4811         if (value == null) {
4812           unsetRd();
4813         } else {
4814           setRd((String)value);
4815         }
4816         break;
4817
4818       case IRTS:
4819         if (value == null) {
4820           unsetIrts();
4821         } else {
4822           setIrts((List<String>)value);
4823         }
4824         break;
4825
4826       case ERTS:
4827         if (value == null) {
4828           unsetErts();
4829         } else {
4830           setErts((List<String>)value);
4831         }
4832         break;
4833
4834       }
4835     }
4836
4837     public Object getFieldValue(_Fields field) {
4838       switch (field) {
4839       case RD:
4840         return getRd();
4841
4842       case IRTS:
4843         return getIrts();
4844
4845       case ERTS:
4846         return getErts();
4847
4848       }
4849       throw new IllegalStateException();
4850     }
4851
4852     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4853     public boolean isSet(_Fields field) {
4854       if (field == null) {
4855         throw new IllegalArgumentException();
4856       }
4857
4858       switch (field) {
4859       case RD:
4860         return isSetRd();
4861       case IRTS:
4862         return isSetIrts();
4863       case ERTS:
4864         return isSetErts();
4865       }
4866       throw new IllegalStateException();
4867     }
4868
4869     @Override
4870     public boolean equals(Object that) {
4871       if (that == null)
4872         return false;
4873       if (that instanceof addVrf_args)
4874         return this.equals((addVrf_args)that);
4875       return false;
4876     }
4877
4878     public boolean equals(addVrf_args that) {
4879       if (that == null)
4880         return false;
4881
4882       boolean this_present_rd = true && this.isSetRd();
4883       boolean that_present_rd = true && that.isSetRd();
4884       if (this_present_rd || that_present_rd) {
4885         if (!(this_present_rd && that_present_rd))
4886           return false;
4887         if (!this.rd.equals(that.rd))
4888           return false;
4889       }
4890
4891       boolean this_present_irts = true && this.isSetIrts();
4892       boolean that_present_irts = true && that.isSetIrts();
4893       if (this_present_irts || that_present_irts) {
4894         if (!(this_present_irts && that_present_irts))
4895           return false;
4896         if (!this.irts.equals(that.irts))
4897           return false;
4898       }
4899
4900       boolean this_present_erts = true && this.isSetErts();
4901       boolean that_present_erts = true && that.isSetErts();
4902       if (this_present_erts || that_present_erts) {
4903         if (!(this_present_erts && that_present_erts))
4904           return false;
4905         if (!this.erts.equals(that.erts))
4906           return false;
4907       }
4908
4909       return true;
4910     }
4911
4912     @Override
4913     public int hashCode() {
4914       return 0;
4915     }
4916
4917     @Override
4918     public int compareTo(addVrf_args other) {
4919       if (!getClass().equals(other.getClass())) {
4920         return getClass().getName().compareTo(other.getClass().getName());
4921       }
4922
4923       int lastComparison = 0;
4924
4925       lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
4926       if (lastComparison != 0) {
4927         return lastComparison;
4928       }
4929       if (isSetRd()) {
4930         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
4931         if (lastComparison != 0) {
4932           return lastComparison;
4933         }
4934       }
4935       lastComparison = Boolean.valueOf(isSetIrts()).compareTo(other.isSetIrts());
4936       if (lastComparison != 0) {
4937         return lastComparison;
4938       }
4939       if (isSetIrts()) {
4940         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.irts, other.irts);
4941         if (lastComparison != 0) {
4942           return lastComparison;
4943         }
4944       }
4945       lastComparison = Boolean.valueOf(isSetErts()).compareTo(other.isSetErts());
4946       if (lastComparison != 0) {
4947         return lastComparison;
4948       }
4949       if (isSetErts()) {
4950         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.erts, other.erts);
4951         if (lastComparison != 0) {
4952           return lastComparison;
4953         }
4954       }
4955       return 0;
4956     }
4957
4958     public _Fields fieldForId(int fieldId) {
4959       return _Fields.findByThriftId(fieldId);
4960     }
4961
4962     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4963       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
4964     }
4965
4966     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4967       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
4968     }
4969
4970     @Override
4971     public String toString() {
4972       StringBuilder sb = new StringBuilder("addVrf_args(");
4973       boolean first = true;
4974
4975       sb.append("rd:");
4976       if (this.rd == null) {
4977         sb.append("null");
4978       } else {
4979         sb.append(this.rd);
4980       }
4981       first = false;
4982       if (!first) sb.append(", ");
4983       sb.append("irts:");
4984       if (this.irts == null) {
4985         sb.append("null");
4986       } else {
4987         sb.append(this.irts);
4988       }
4989       first = false;
4990       if (!first) sb.append(", ");
4991       sb.append("erts:");
4992       if (this.erts == null) {
4993         sb.append("null");
4994       } else {
4995         sb.append(this.erts);
4996       }
4997       first = false;
4998       sb.append(")");
4999       return sb.toString();
5000     }
5001
5002     public void validate() throws org.apache.thrift.TException {
5003       // check for required fields
5004       // check for sub-struct validity
5005     }
5006
5007     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5008       try {
5009         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5010       } catch (org.apache.thrift.TException te) {
5011         throw new java.io.IOException(te);
5012       }
5013     }
5014
5015     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5016       try {
5017         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5018       } catch (org.apache.thrift.TException te) {
5019         throw new java.io.IOException(te);
5020       }
5021     }
5022
5023     private static class addVrf_argsStandardSchemeFactory implements SchemeFactory {
5024       public addVrf_argsStandardScheme getScheme() {
5025         return new addVrf_argsStandardScheme();
5026       }
5027     }
5028
5029     private static class addVrf_argsStandardScheme extends StandardScheme<addVrf_args> {
5030
5031       public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_args struct) throws org.apache.thrift.TException {
5032         org.apache.thrift.protocol.TField schemeField;
5033         iprot.readStructBegin();
5034         while (true)
5035         {
5036           schemeField = iprot.readFieldBegin();
5037           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
5038             break;
5039           }
5040           switch (schemeField.id) {
5041             case 1: // RD
5042               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
5043                 struct.rd = iprot.readString();
5044                 struct.setRdIsSet(true);
5045               } else { 
5046                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5047               }
5048               break;
5049             case 2: // IRTS
5050               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
5051                 {
5052                   org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
5053                   struct.irts = new ArrayList<String>(_list8.size);
5054                   for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5055                   {
5056                     String _elem10;
5057                     _elem10 = iprot.readString();
5058                     struct.irts.add(_elem10);
5059                   }
5060                   iprot.readListEnd();
5061                 }
5062                 struct.setIrtsIsSet(true);
5063               } else { 
5064                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5065               }
5066               break;
5067             case 3: // ERTS
5068               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
5069                 {
5070                   org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
5071                   struct.erts = new ArrayList<String>(_list11.size);
5072                   for (int _i12 = 0; _i12 < _list11.size; ++_i12)
5073                   {
5074                     String _elem13;
5075                     _elem13 = iprot.readString();
5076                     struct.erts.add(_elem13);
5077                   }
5078                   iprot.readListEnd();
5079                 }
5080                 struct.setErtsIsSet(true);
5081               } else { 
5082                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5083               }
5084               break;
5085             default:
5086               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5087           }
5088           iprot.readFieldEnd();
5089         }
5090         iprot.readStructEnd();
5091
5092         // check for required fields of primitive type, which can't be checked in the validate method
5093         struct.validate();
5094       }
5095
5096       public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_args struct) throws org.apache.thrift.TException {
5097         struct.validate();
5098
5099         oprot.writeStructBegin(STRUCT_DESC);
5100         if (struct.rd != null) {
5101           oprot.writeFieldBegin(RD_FIELD_DESC);
5102           oprot.writeString(struct.rd);
5103           oprot.writeFieldEnd();
5104         }
5105         if (struct.irts != null) {
5106           oprot.writeFieldBegin(IRTS_FIELD_DESC);
5107           {
5108             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.irts.size()));
5109             for (String _iter14 : struct.irts)
5110             {
5111               oprot.writeString(_iter14);
5112             }
5113             oprot.writeListEnd();
5114           }
5115           oprot.writeFieldEnd();
5116         }
5117         if (struct.erts != null) {
5118           oprot.writeFieldBegin(ERTS_FIELD_DESC);
5119           {
5120             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.erts.size()));
5121             for (String _iter15 : struct.erts)
5122             {
5123               oprot.writeString(_iter15);
5124             }
5125             oprot.writeListEnd();
5126           }
5127           oprot.writeFieldEnd();
5128         }
5129         oprot.writeFieldStop();
5130         oprot.writeStructEnd();
5131       }
5132
5133     }
5134
5135     private static class addVrf_argsTupleSchemeFactory implements SchemeFactory {
5136       public addVrf_argsTupleScheme getScheme() {
5137         return new addVrf_argsTupleScheme();
5138       }
5139     }
5140
5141     private static class addVrf_argsTupleScheme extends TupleScheme<addVrf_args> {
5142
5143       @Override
5144       public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
5145         TTupleProtocol oprot = (TTupleProtocol) prot;
5146         BitSet optionals = new BitSet();
5147         if (struct.isSetRd()) {
5148           optionals.set(0);
5149         }
5150         if (struct.isSetIrts()) {
5151           optionals.set(1);
5152         }
5153         if (struct.isSetErts()) {
5154           optionals.set(2);
5155         }
5156         oprot.writeBitSet(optionals, 3);
5157         if (struct.isSetRd()) {
5158           oprot.writeString(struct.rd);
5159         }
5160         if (struct.isSetIrts()) {
5161           {
5162             oprot.writeI32(struct.irts.size());
5163             for (String _iter16 : struct.irts)
5164             {
5165               oprot.writeString(_iter16);
5166             }
5167           }
5168         }
5169         if (struct.isSetErts()) {
5170           {
5171             oprot.writeI32(struct.erts.size());
5172             for (String _iter17 : struct.erts)
5173             {
5174               oprot.writeString(_iter17);
5175             }
5176           }
5177         }
5178       }
5179
5180       @Override
5181       public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
5182         TTupleProtocol iprot = (TTupleProtocol) prot;
5183         BitSet incoming = iprot.readBitSet(3);
5184         if (incoming.get(0)) {
5185           struct.rd = iprot.readString();
5186           struct.setRdIsSet(true);
5187         }
5188         if (incoming.get(1)) {
5189           {
5190             org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
5191             struct.irts = new ArrayList<String>(_list18.size);
5192             for (int _i19 = 0; _i19 < _list18.size; ++_i19)
5193             {
5194               String _elem20;
5195               _elem20 = iprot.readString();
5196               struct.irts.add(_elem20);
5197             }
5198           }
5199           struct.setIrtsIsSet(true);
5200         }
5201         if (incoming.get(2)) {
5202           {
5203             org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
5204             struct.erts = new ArrayList<String>(_list21.size);
5205             for (int _i22 = 0; _i22 < _list21.size; ++_i22)
5206             {
5207               String _elem23;
5208               _elem23 = iprot.readString();
5209               struct.erts.add(_elem23);
5210             }
5211           }
5212           struct.setErtsIsSet(true);
5213         }
5214       }
5215     }
5216
5217   }
5218
5219   public static class addVrf_result implements org.apache.thrift.TBase<addVrf_result, addVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_result>   {
5220     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_result");
5221
5222     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
5223
5224     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
5225     static {
5226       schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory());
5227       schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory());
5228     }
5229
5230     public int success; // required
5231
5232     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5233     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5234       SUCCESS((short)0, "success");
5235
5236       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5237
5238       static {
5239         for (_Fields field : EnumSet.allOf(_Fields.class)) {
5240           byName.put(field.getFieldName(), field);
5241         }
5242       }
5243
5244       /**
5245        * Find the _Fields constant that matches fieldId, or null if its not found.
5246        */
5247       public static _Fields findByThriftId(int fieldId) {
5248         switch(fieldId) {
5249           case 0: // SUCCESS
5250             return SUCCESS;
5251           default:
5252             return null;
5253         }
5254       }
5255
5256       /**
5257        * Find the _Fields constant that matches fieldId, throwing an exception
5258        * if it is not found.
5259        */
5260       public static _Fields findByThriftIdOrThrow(int fieldId) {
5261         _Fields fields = findByThriftId(fieldId);
5262         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5263         return fields;
5264       }
5265
5266       /**
5267        * Find the _Fields constant that matches name, or null if its not found.
5268        */
5269       public static _Fields findByName(String name) {
5270         return byName.get(name);
5271       }
5272
5273       private final short _thriftId;
5274       private final String _fieldName;
5275
5276       _Fields(short thriftId, String fieldName) {
5277         _thriftId = thriftId;
5278         _fieldName = fieldName;
5279       }
5280
5281       public short getThriftFieldId() {
5282         return _thriftId;
5283       }
5284
5285       public String getFieldName() {
5286         return _fieldName;
5287       }
5288     }
5289
5290     // isset id assignments
5291     private static final int __SUCCESS_ISSET_ID = 0;
5292     private byte __isset_bitfield = 0;
5293     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5294     static {
5295       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5296       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5297           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
5298       metaDataMap = Collections.unmodifiableMap(tmpMap);
5299       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_result.class, metaDataMap);
5300     }
5301
5302     public addVrf_result() {
5303     }
5304
5305     public addVrf_result(
5306       int success)
5307     {
5308       this();
5309       this.success = success;
5310       setSuccessIsSet(true);
5311     }
5312
5313     /**
5314      * Performs a deep copy on <i>other</i>.
5315      */
5316     public addVrf_result(addVrf_result other) {
5317       __isset_bitfield = other.__isset_bitfield;
5318       this.success = other.success;
5319     }
5320
5321     public addVrf_result deepCopy() {
5322       return new addVrf_result(this);
5323     }
5324
5325     @Override
5326     public void clear() {
5327       setSuccessIsSet(false);
5328       this.success = 0;
5329     }
5330
5331     public int getSuccess() {
5332       return this.success;
5333     }
5334
5335     public addVrf_result setSuccess(int success) {
5336       this.success = success;
5337       setSuccessIsSet(true);
5338       return this;
5339     }
5340
5341     public void unsetSuccess() {
5342       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
5343     }
5344
5345     /** Returns true if field success is set (has been assigned a value) and false otherwise */
5346     public boolean isSetSuccess() {
5347       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
5348     }
5349
5350     public void setSuccessIsSet(boolean value) {
5351       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
5352     }
5353
5354     public void setFieldValue(_Fields field, Object value) {
5355       switch (field) {
5356       case SUCCESS:
5357         if (value == null) {
5358           unsetSuccess();
5359         } else {
5360           setSuccess((Integer)value);
5361         }
5362         break;
5363
5364       }
5365     }
5366
5367     public Object getFieldValue(_Fields field) {
5368       switch (field) {
5369       case SUCCESS:
5370         return Integer.valueOf(getSuccess());
5371
5372       }
5373       throw new IllegalStateException();
5374     }
5375
5376     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5377     public boolean isSet(_Fields field) {
5378       if (field == null) {
5379         throw new IllegalArgumentException();
5380       }
5381
5382       switch (field) {
5383       case SUCCESS:
5384         return isSetSuccess();
5385       }
5386       throw new IllegalStateException();
5387     }
5388
5389     @Override
5390     public boolean equals(Object that) {
5391       if (that == null)
5392         return false;
5393       if (that instanceof addVrf_result)
5394         return this.equals((addVrf_result)that);
5395       return false;
5396     }
5397
5398     public boolean equals(addVrf_result that) {
5399       if (that == null)
5400         return false;
5401
5402       boolean this_present_success = true;
5403       boolean that_present_success = true;
5404       if (this_present_success || that_present_success) {
5405         if (!(this_present_success && that_present_success))
5406           return false;
5407         if (this.success != that.success)
5408           return false;
5409       }
5410
5411       return true;
5412     }
5413
5414     @Override
5415     public int hashCode() {
5416       return 0;
5417     }
5418
5419     @Override
5420     public int compareTo(addVrf_result other) {
5421       if (!getClass().equals(other.getClass())) {
5422         return getClass().getName().compareTo(other.getClass().getName());
5423       }
5424
5425       int lastComparison = 0;
5426
5427       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
5428       if (lastComparison != 0) {
5429         return lastComparison;
5430       }
5431       if (isSetSuccess()) {
5432         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
5433         if (lastComparison != 0) {
5434           return lastComparison;
5435         }
5436       }
5437       return 0;
5438     }
5439
5440     public _Fields fieldForId(int fieldId) {
5441       return _Fields.findByThriftId(fieldId);
5442     }
5443
5444     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5445       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
5446     }
5447
5448     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5449       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
5450       }
5451
5452     @Override
5453     public String toString() {
5454       StringBuilder sb = new StringBuilder("addVrf_result(");
5455       boolean first = true;
5456
5457       sb.append("success:");
5458       sb.append(this.success);
5459       first = false;
5460       sb.append(")");
5461       return sb.toString();
5462     }
5463
5464     public void validate() throws org.apache.thrift.TException {
5465       // check for required fields
5466       // check for sub-struct validity
5467     }
5468
5469     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5470       try {
5471         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5472       } catch (org.apache.thrift.TException te) {
5473         throw new java.io.IOException(te);
5474       }
5475     }
5476
5477     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5478       try {
5479         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5480         __isset_bitfield = 0;
5481         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5482       } catch (org.apache.thrift.TException te) {
5483         throw new java.io.IOException(te);
5484       }
5485     }
5486
5487     private static class addVrf_resultStandardSchemeFactory implements SchemeFactory {
5488       public addVrf_resultStandardScheme getScheme() {
5489         return new addVrf_resultStandardScheme();
5490       }
5491     }
5492
5493     private static class addVrf_resultStandardScheme extends StandardScheme<addVrf_result> {
5494
5495       public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_result struct) throws org.apache.thrift.TException {
5496         org.apache.thrift.protocol.TField schemeField;
5497         iprot.readStructBegin();
5498         while (true)
5499         {
5500           schemeField = iprot.readFieldBegin();
5501           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
5502             break;
5503           }
5504           switch (schemeField.id) {
5505             case 0: // SUCCESS
5506               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
5507                 struct.success = iprot.readI32();
5508                 struct.setSuccessIsSet(true);
5509               } else { 
5510                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5511               }
5512               break;
5513             default:
5514               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5515           }
5516           iprot.readFieldEnd();
5517         }
5518         iprot.readStructEnd();
5519
5520         // check for required fields of primitive type, which can't be checked in the validate method
5521         struct.validate();
5522       }
5523
5524       public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_result struct) throws org.apache.thrift.TException {
5525         struct.validate();
5526
5527         oprot.writeStructBegin(STRUCT_DESC);
5528         if (struct.isSetSuccess()) {
5529           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5530           oprot.writeI32(struct.success);
5531           oprot.writeFieldEnd();
5532         }
5533         oprot.writeFieldStop();
5534         oprot.writeStructEnd();
5535       }
5536
5537     }
5538
5539     private static class addVrf_resultTupleSchemeFactory implements SchemeFactory {
5540       public addVrf_resultTupleScheme getScheme() {
5541         return new addVrf_resultTupleScheme();
5542       }
5543     }
5544
5545     private static class addVrf_resultTupleScheme extends TupleScheme<addVrf_result> {
5546
5547       @Override
5548       public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
5549         TTupleProtocol oprot = (TTupleProtocol) prot;
5550         BitSet optionals = new BitSet();
5551         if (struct.isSetSuccess()) {
5552           optionals.set(0);
5553         }
5554         oprot.writeBitSet(optionals, 1);
5555         if (struct.isSetSuccess()) {
5556           oprot.writeI32(struct.success);
5557         }
5558       }
5559
5560       @Override
5561       public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
5562         TTupleProtocol iprot = (TTupleProtocol) prot;
5563         BitSet incoming = iprot.readBitSet(1);
5564         if (incoming.get(0)) {
5565           struct.success = iprot.readI32();
5566           struct.setSuccessIsSet(true);
5567         }
5568       }
5569     }
5570
5571   }
5572
5573   public static class delVrf_args implements org.apache.thrift.TBase<delVrf_args, delVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_args>   {
5574     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_args");
5575
5576     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);
5577
5578     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
5579     static {
5580       schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory());
5581       schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory());
5582     }
5583
5584     public String rd; // required
5585
5586     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5587     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5588       RD((short)1, "rd");
5589
5590       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5591
5592       static {
5593         for (_Fields field : EnumSet.allOf(_Fields.class)) {
5594           byName.put(field.getFieldName(), field);
5595         }
5596       }
5597
5598       /**
5599        * Find the _Fields constant that matches fieldId, or null if its not found.
5600        */
5601       public static _Fields findByThriftId(int fieldId) {
5602         switch(fieldId) {
5603           case 1: // RD
5604             return RD;
5605           default:
5606             return null;
5607         }
5608       }
5609
5610       /**
5611        * Find the _Fields constant that matches fieldId, throwing an exception
5612        * if it is not found.
5613        */
5614       public static _Fields findByThriftIdOrThrow(int fieldId) {
5615         _Fields fields = findByThriftId(fieldId);
5616         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5617         return fields;
5618       }
5619
5620       /**
5621        * Find the _Fields constant that matches name, or null if its not found.
5622        */
5623       public static _Fields findByName(String name) {
5624         return byName.get(name);
5625       }
5626
5627       private final short _thriftId;
5628       private final String _fieldName;
5629
5630       _Fields(short thriftId, String fieldName) {
5631         _thriftId = thriftId;
5632         _fieldName = fieldName;
5633       }
5634
5635       public short getThriftFieldId() {
5636         return _thriftId;
5637       }
5638
5639       public String getFieldName() {
5640         return _fieldName;
5641       }
5642     }
5643
5644     // isset id assignments
5645     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5646     static {
5647       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5648       tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5649           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5650       metaDataMap = Collections.unmodifiableMap(tmpMap);
5651       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_args.class, metaDataMap);
5652     }
5653
5654     public delVrf_args() {
5655     }
5656
5657     public delVrf_args(
5658       String rd)
5659     {
5660       this();
5661       this.rd = rd;
5662     }
5663
5664     /**
5665      * Performs a deep copy on <i>other</i>.
5666      */
5667     public delVrf_args(delVrf_args other) {
5668       if (other.isSetRd()) {
5669         this.rd = other.rd;
5670       }
5671     }
5672
5673     public delVrf_args deepCopy() {
5674       return new delVrf_args(this);
5675     }
5676
5677     @Override
5678     public void clear() {
5679       this.rd = null;
5680     }
5681
5682     public String getRd() {
5683       return this.rd;
5684     }
5685
5686     public delVrf_args setRd(String rd) {
5687       this.rd = rd;
5688       return this;
5689     }
5690
5691     public void unsetRd() {
5692       this.rd = null;
5693     }
5694
5695     /** Returns true if field rd is set (has been assigned a value) and false otherwise */
5696     public boolean isSetRd() {
5697       return this.rd != null;
5698     }
5699
5700     public void setRdIsSet(boolean value) {
5701       if (!value) {
5702         this.rd = null;
5703       }
5704     }
5705
5706     public void setFieldValue(_Fields field, Object value) {
5707       switch (field) {
5708       case RD:
5709         if (value == null) {
5710           unsetRd();
5711         } else {
5712           setRd((String)value);
5713         }
5714         break;
5715
5716       }
5717     }
5718
5719     public Object getFieldValue(_Fields field) {
5720       switch (field) {
5721       case RD:
5722         return getRd();
5723
5724       }
5725       throw new IllegalStateException();
5726     }
5727
5728     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5729     public boolean isSet(_Fields field) {
5730       if (field == null) {
5731         throw new IllegalArgumentException();
5732       }
5733
5734       switch (field) {
5735       case RD:
5736         return isSetRd();
5737       }
5738       throw new IllegalStateException();
5739     }
5740
5741     @Override
5742     public boolean equals(Object that) {
5743       if (that == null)
5744         return false;
5745       if (that instanceof delVrf_args)
5746         return this.equals((delVrf_args)that);
5747       return false;
5748     }
5749
5750     public boolean equals(delVrf_args that) {
5751       if (that == null)
5752         return false;
5753
5754       boolean this_present_rd = true && this.isSetRd();
5755       boolean that_present_rd = true && that.isSetRd();
5756       if (this_present_rd || that_present_rd) {
5757         if (!(this_present_rd && that_present_rd))
5758           return false;
5759         if (!this.rd.equals(that.rd))
5760           return false;
5761       }
5762
5763       return true;
5764     }
5765
5766     @Override
5767     public int hashCode() {
5768       return 0;
5769     }
5770
5771     @Override
5772     public int compareTo(delVrf_args other) {
5773       if (!getClass().equals(other.getClass())) {
5774         return getClass().getName().compareTo(other.getClass().getName());
5775       }
5776
5777       int lastComparison = 0;
5778
5779       lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
5780       if (lastComparison != 0) {
5781         return lastComparison;
5782       }
5783       if (isSetRd()) {
5784         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
5785         if (lastComparison != 0) {
5786           return lastComparison;
5787         }
5788       }
5789       return 0;
5790     }
5791
5792     public _Fields fieldForId(int fieldId) {
5793       return _Fields.findByThriftId(fieldId);
5794     }
5795
5796     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5797       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
5798     }
5799
5800     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5801       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
5802     }
5803
5804     @Override
5805     public String toString() {
5806       StringBuilder sb = new StringBuilder("delVrf_args(");
5807       boolean first = true;
5808
5809       sb.append("rd:");
5810       if (this.rd == null) {
5811         sb.append("null");
5812       } else {
5813         sb.append(this.rd);
5814       }
5815       first = false;
5816       sb.append(")");
5817       return sb.toString();
5818     }
5819
5820     public void validate() throws org.apache.thrift.TException {
5821       // check for required fields
5822       // check for sub-struct validity
5823     }
5824
5825     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5826       try {
5827         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5828       } catch (org.apache.thrift.TException te) {
5829         throw new java.io.IOException(te);
5830       }
5831     }
5832
5833     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5834       try {
5835         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5836       } catch (org.apache.thrift.TException te) {
5837         throw new java.io.IOException(te);
5838       }
5839     }
5840
5841     private static class delVrf_argsStandardSchemeFactory implements SchemeFactory {
5842       public delVrf_argsStandardScheme getScheme() {
5843         return new delVrf_argsStandardScheme();
5844       }
5845     }
5846
5847     private static class delVrf_argsStandardScheme extends StandardScheme<delVrf_args> {
5848
5849       public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_args struct) throws org.apache.thrift.TException {
5850         org.apache.thrift.protocol.TField schemeField;
5851         iprot.readStructBegin();
5852         while (true)
5853         {
5854           schemeField = iprot.readFieldBegin();
5855           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
5856             break;
5857           }
5858           switch (schemeField.id) {
5859             case 1: // RD
5860               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
5861                 struct.rd = iprot.readString();
5862                 struct.setRdIsSet(true);
5863               } else { 
5864                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5865               }
5866               break;
5867             default:
5868               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5869           }
5870           iprot.readFieldEnd();
5871         }
5872         iprot.readStructEnd();
5873
5874         // check for required fields of primitive type, which can't be checked in the validate method
5875         struct.validate();
5876       }
5877
5878       public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_args struct) throws org.apache.thrift.TException {
5879         struct.validate();
5880
5881         oprot.writeStructBegin(STRUCT_DESC);
5882         if (struct.rd != null) {
5883           oprot.writeFieldBegin(RD_FIELD_DESC);
5884           oprot.writeString(struct.rd);
5885           oprot.writeFieldEnd();
5886         }
5887         oprot.writeFieldStop();
5888         oprot.writeStructEnd();
5889       }
5890
5891     }
5892
5893     private static class delVrf_argsTupleSchemeFactory implements SchemeFactory {
5894       public delVrf_argsTupleScheme getScheme() {
5895         return new delVrf_argsTupleScheme();
5896       }
5897     }
5898
5899     private static class delVrf_argsTupleScheme extends TupleScheme<delVrf_args> {
5900
5901       @Override
5902       public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
5903         TTupleProtocol oprot = (TTupleProtocol) prot;
5904         BitSet optionals = new BitSet();
5905         if (struct.isSetRd()) {
5906           optionals.set(0);
5907         }
5908         oprot.writeBitSet(optionals, 1);
5909         if (struct.isSetRd()) {
5910           oprot.writeString(struct.rd);
5911         }
5912       }
5913
5914       @Override
5915       public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
5916         TTupleProtocol iprot = (TTupleProtocol) prot;
5917         BitSet incoming = iprot.readBitSet(1);
5918         if (incoming.get(0)) {
5919           struct.rd = iprot.readString();
5920           struct.setRdIsSet(true);
5921         }
5922       }
5923     }
5924
5925   }
5926
5927   public static class delVrf_result implements org.apache.thrift.TBase<delVrf_result, delVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_result>   {
5928     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_result");
5929
5930     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
5931
5932     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
5933     static {
5934       schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory());
5935       schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory());
5936     }
5937
5938     public int success; // required
5939
5940     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5941     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5942       SUCCESS((short)0, "success");
5943
5944       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5945
5946       static {
5947         for (_Fields field : EnumSet.allOf(_Fields.class)) {
5948           byName.put(field.getFieldName(), field);
5949         }
5950       }
5951
5952       /**
5953        * Find the _Fields constant that matches fieldId, or null if its not found.
5954        */
5955       public static _Fields findByThriftId(int fieldId) {
5956         switch(fieldId) {
5957           case 0: // SUCCESS
5958             return SUCCESS;
5959           default:
5960             return null;
5961         }
5962       }
5963
5964       /**
5965        * Find the _Fields constant that matches fieldId, throwing an exception
5966        * if it is not found.
5967        */
5968       public static _Fields findByThriftIdOrThrow(int fieldId) {
5969         _Fields fields = findByThriftId(fieldId);
5970         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5971         return fields;
5972       }
5973
5974       /**
5975        * Find the _Fields constant that matches name, or null if its not found.
5976        */
5977       public static _Fields findByName(String name) {
5978         return byName.get(name);
5979       }
5980
5981       private final short _thriftId;
5982       private final String _fieldName;
5983
5984       _Fields(short thriftId, String fieldName) {
5985         _thriftId = thriftId;
5986         _fieldName = fieldName;
5987       }
5988
5989       public short getThriftFieldId() {
5990         return _thriftId;
5991       }
5992
5993       public String getFieldName() {
5994         return _fieldName;
5995       }
5996     }
5997
5998     // isset id assignments
5999     private static final int __SUCCESS_ISSET_ID = 0;
6000     private byte __isset_bitfield = 0;
6001     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6002     static {
6003       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6004       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6005           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
6006       metaDataMap = Collections.unmodifiableMap(tmpMap);
6007       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_result.class, metaDataMap);
6008     }
6009
6010     public delVrf_result() {
6011     }
6012
6013     public delVrf_result(
6014       int success)
6015     {
6016       this();
6017       this.success = success;
6018       setSuccessIsSet(true);
6019     }
6020
6021     /**
6022      * Performs a deep copy on <i>other</i>.
6023      */
6024     public delVrf_result(delVrf_result other) {
6025       __isset_bitfield = other.__isset_bitfield;
6026       this.success = other.success;
6027     }
6028
6029     public delVrf_result deepCopy() {
6030       return new delVrf_result(this);
6031     }
6032
6033     @Override
6034     public void clear() {
6035       setSuccessIsSet(false);
6036       this.success = 0;
6037     }
6038
6039     public int getSuccess() {
6040       return this.success;
6041     }
6042
6043     public delVrf_result setSuccess(int success) {
6044       this.success = success;
6045       setSuccessIsSet(true);
6046       return this;
6047     }
6048
6049     public void unsetSuccess() {
6050       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
6051     }
6052
6053     /** Returns true if field success is set (has been assigned a value) and false otherwise */
6054     public boolean isSetSuccess() {
6055       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
6056     }
6057
6058     public void setSuccessIsSet(boolean value) {
6059       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
6060     }
6061
6062     public void setFieldValue(_Fields field, Object value) {
6063       switch (field) {
6064       case SUCCESS:
6065         if (value == null) {
6066           unsetSuccess();
6067         } else {
6068           setSuccess((Integer)value);
6069         }
6070         break;
6071
6072       }
6073     }
6074
6075     public Object getFieldValue(_Fields field) {
6076       switch (field) {
6077       case SUCCESS:
6078         return Integer.valueOf(getSuccess());
6079
6080       }
6081       throw new IllegalStateException();
6082     }
6083
6084     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6085     public boolean isSet(_Fields field) {
6086       if (field == null) {
6087         throw new IllegalArgumentException();
6088       }
6089
6090       switch (field) {
6091       case SUCCESS:
6092         return isSetSuccess();
6093       }
6094       throw new IllegalStateException();
6095     }
6096
6097     @Override
6098     public boolean equals(Object that) {
6099       if (that == null)
6100         return false;
6101       if (that instanceof delVrf_result)
6102         return this.equals((delVrf_result)that);
6103       return false;
6104     }
6105
6106     public boolean equals(delVrf_result that) {
6107       if (that == null)
6108         return false;
6109
6110       boolean this_present_success = true;
6111       boolean that_present_success = true;
6112       if (this_present_success || that_present_success) {
6113         if (!(this_present_success && that_present_success))
6114           return false;
6115         if (this.success != that.success)
6116           return false;
6117       }
6118
6119       return true;
6120     }
6121
6122     @Override
6123     public int hashCode() {
6124       return 0;
6125     }
6126
6127     @Override
6128     public int compareTo(delVrf_result other) {
6129       if (!getClass().equals(other.getClass())) {
6130         return getClass().getName().compareTo(other.getClass().getName());
6131       }
6132
6133       int lastComparison = 0;
6134
6135       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
6136       if (lastComparison != 0) {
6137         return lastComparison;
6138       }
6139       if (isSetSuccess()) {
6140         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
6141         if (lastComparison != 0) {
6142           return lastComparison;
6143         }
6144       }
6145       return 0;
6146     }
6147
6148     public _Fields fieldForId(int fieldId) {
6149       return _Fields.findByThriftId(fieldId);
6150     }
6151
6152     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6153       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
6154     }
6155
6156     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6157       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
6158       }
6159
6160     @Override
6161     public String toString() {
6162       StringBuilder sb = new StringBuilder("delVrf_result(");
6163       boolean first = true;
6164
6165       sb.append("success:");
6166       sb.append(this.success);
6167       first = false;
6168       sb.append(")");
6169       return sb.toString();
6170     }
6171
6172     public void validate() throws org.apache.thrift.TException {
6173       // check for required fields
6174       // check for sub-struct validity
6175     }
6176
6177     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6178       try {
6179         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6180       } catch (org.apache.thrift.TException te) {
6181         throw new java.io.IOException(te);
6182       }
6183     }
6184
6185     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6186       try {
6187         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6188         __isset_bitfield = 0;
6189         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6190       } catch (org.apache.thrift.TException te) {
6191         throw new java.io.IOException(te);
6192       }
6193     }
6194
6195     private static class delVrf_resultStandardSchemeFactory implements SchemeFactory {
6196       public delVrf_resultStandardScheme getScheme() {
6197         return new delVrf_resultStandardScheme();
6198       }
6199     }
6200
6201     private static class delVrf_resultStandardScheme extends StandardScheme<delVrf_result> {
6202
6203       public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_result struct) throws org.apache.thrift.TException {
6204         org.apache.thrift.protocol.TField schemeField;
6205         iprot.readStructBegin();
6206         while (true)
6207         {
6208           schemeField = iprot.readFieldBegin();
6209           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
6210             break;
6211           }
6212           switch (schemeField.id) {
6213             case 0: // SUCCESS
6214               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
6215                 struct.success = iprot.readI32();
6216                 struct.setSuccessIsSet(true);
6217               } else { 
6218                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6219               }
6220               break;
6221             default:
6222               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6223           }
6224           iprot.readFieldEnd();
6225         }
6226         iprot.readStructEnd();
6227
6228         // check for required fields of primitive type, which can't be checked in the validate method
6229         struct.validate();
6230       }
6231
6232       public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_result struct) throws org.apache.thrift.TException {
6233         struct.validate();
6234
6235         oprot.writeStructBegin(STRUCT_DESC);
6236         if (struct.isSetSuccess()) {
6237           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6238           oprot.writeI32(struct.success);
6239           oprot.writeFieldEnd();
6240         }
6241         oprot.writeFieldStop();
6242         oprot.writeStructEnd();
6243       }
6244
6245     }
6246
6247     private static class delVrf_resultTupleSchemeFactory implements SchemeFactory {
6248       public delVrf_resultTupleScheme getScheme() {
6249         return new delVrf_resultTupleScheme();
6250       }
6251     }
6252
6253     private static class delVrf_resultTupleScheme extends TupleScheme<delVrf_result> {
6254
6255       @Override
6256       public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
6257         TTupleProtocol oprot = (TTupleProtocol) prot;
6258         BitSet optionals = new BitSet();
6259         if (struct.isSetSuccess()) {
6260           optionals.set(0);
6261         }
6262         oprot.writeBitSet(optionals, 1);
6263         if (struct.isSetSuccess()) {
6264           oprot.writeI32(struct.success);
6265         }
6266       }
6267
6268       @Override
6269       public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
6270         TTupleProtocol iprot = (TTupleProtocol) prot;
6271         BitSet incoming = iprot.readBitSet(1);
6272         if (incoming.get(0)) {
6273           struct.success = iprot.readI32();
6274           struct.setSuccessIsSet(true);
6275         }
6276       }
6277     }
6278
6279   }
6280
6281   public static class pushRoute_args implements org.apache.thrift.TBase<pushRoute_args, pushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_args>   {
6282     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_args");
6283
6284     private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
6285     private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)2);
6286     private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)3);
6287     private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)4);
6288
6289     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
6290     static {
6291       schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory());
6292       schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory());
6293     }
6294
6295     public String prefix; // required
6296     public String nexthop; // required
6297     public String rd; // required
6298     public int label; // required
6299
6300     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6301     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6302       PREFIX((short)1, "prefix"),
6303       NEXTHOP((short)2, "nexthop"),
6304       RD((short)3, "rd"),
6305       LABEL((short)4, "label");
6306
6307       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6308
6309       static {
6310         for (_Fields field : EnumSet.allOf(_Fields.class)) {
6311           byName.put(field.getFieldName(), field);
6312         }
6313       }
6314
6315       /**
6316        * Find the _Fields constant that matches fieldId, or null if its not found.
6317        */
6318       public static _Fields findByThriftId(int fieldId) {
6319         switch(fieldId) {
6320           case 1: // PREFIX
6321             return PREFIX;
6322           case 2: // NEXTHOP
6323             return NEXTHOP;
6324           case 3: // RD
6325             return RD;
6326           case 4: // LABEL
6327             return LABEL;
6328           default:
6329             return null;
6330         }
6331       }
6332
6333       /**
6334        * Find the _Fields constant that matches fieldId, throwing an exception
6335        * if it is not found.
6336        */
6337       public static _Fields findByThriftIdOrThrow(int fieldId) {
6338         _Fields fields = findByThriftId(fieldId);
6339         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6340         return fields;
6341       }
6342
6343       /**
6344        * Find the _Fields constant that matches name, or null if its not found.
6345        */
6346       public static _Fields findByName(String name) {
6347         return byName.get(name);
6348       }
6349
6350       private final short _thriftId;
6351       private final String _fieldName;
6352
6353       _Fields(short thriftId, String fieldName) {
6354         _thriftId = thriftId;
6355         _fieldName = fieldName;
6356       }
6357
6358       public short getThriftFieldId() {
6359         return _thriftId;
6360       }
6361
6362       public String getFieldName() {
6363         return _fieldName;
6364       }
6365     }
6366
6367     // isset id assignments
6368     private static final int __LABEL_ISSET_ID = 0;
6369     private byte __isset_bitfield = 0;
6370     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6371     static {
6372       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6373       tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6374           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6375       tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6376           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6377       tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6378           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6379       tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6380           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
6381       metaDataMap = Collections.unmodifiableMap(tmpMap);
6382       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_args.class, metaDataMap);
6383     }
6384
6385     public pushRoute_args() {
6386     }
6387
6388     public pushRoute_args(
6389       String prefix,
6390       String nexthop,
6391       String rd,
6392       int label)
6393     {
6394       this();
6395       this.prefix = prefix;
6396       this.nexthop = nexthop;
6397       this.rd = rd;
6398       this.label = label;
6399       setLabelIsSet(true);
6400     }
6401
6402     /**
6403      * Performs a deep copy on <i>other</i>.
6404      */
6405     public pushRoute_args(pushRoute_args other) {
6406       __isset_bitfield = other.__isset_bitfield;
6407       if (other.isSetPrefix()) {
6408         this.prefix = other.prefix;
6409       }
6410       if (other.isSetNexthop()) {
6411         this.nexthop = other.nexthop;
6412       }
6413       if (other.isSetRd()) {
6414         this.rd = other.rd;
6415       }
6416       this.label = other.label;
6417     }
6418
6419     public pushRoute_args deepCopy() {
6420       return new pushRoute_args(this);
6421     }
6422
6423     @Override
6424     public void clear() {
6425       this.prefix = null;
6426       this.nexthop = null;
6427       this.rd = null;
6428       setLabelIsSet(false);
6429       this.label = 0;
6430     }
6431
6432     public String getPrefix() {
6433       return this.prefix;
6434     }
6435
6436     public pushRoute_args setPrefix(String prefix) {
6437       this.prefix = prefix;
6438       return this;
6439     }
6440
6441     public void unsetPrefix() {
6442       this.prefix = null;
6443     }
6444
6445     /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
6446     public boolean isSetPrefix() {
6447       return this.prefix != null;
6448     }
6449
6450     public void setPrefixIsSet(boolean value) {
6451       if (!value) {
6452         this.prefix = null;
6453       }
6454     }
6455
6456     public String getNexthop() {
6457       return this.nexthop;
6458     }
6459
6460     public pushRoute_args setNexthop(String nexthop) {
6461       this.nexthop = nexthop;
6462       return this;
6463     }
6464
6465     public void unsetNexthop() {
6466       this.nexthop = null;
6467     }
6468
6469     /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
6470     public boolean isSetNexthop() {
6471       return this.nexthop != null;
6472     }
6473
6474     public void setNexthopIsSet(boolean value) {
6475       if (!value) {
6476         this.nexthop = null;
6477       }
6478     }
6479
6480     public String getRd() {
6481       return this.rd;
6482     }
6483
6484     public pushRoute_args setRd(String rd) {
6485       this.rd = rd;
6486       return this;
6487     }
6488
6489     public void unsetRd() {
6490       this.rd = null;
6491     }
6492
6493     /** Returns true if field rd is set (has been assigned a value) and false otherwise */
6494     public boolean isSetRd() {
6495       return this.rd != null;
6496     }
6497
6498     public void setRdIsSet(boolean value) {
6499       if (!value) {
6500         this.rd = null;
6501       }
6502     }
6503
6504     public int getLabel() {
6505       return this.label;
6506     }
6507
6508     public pushRoute_args setLabel(int label) {
6509       this.label = label;
6510       setLabelIsSet(true);
6511       return this;
6512     }
6513
6514     public void unsetLabel() {
6515       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
6516     }
6517
6518     /** Returns true if field label is set (has been assigned a value) and false otherwise */
6519     public boolean isSetLabel() {
6520       return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
6521     }
6522
6523     public void setLabelIsSet(boolean value) {
6524       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
6525     }
6526
6527     public void setFieldValue(_Fields field, Object value) {
6528       switch (field) {
6529       case PREFIX:
6530         if (value == null) {
6531           unsetPrefix();
6532         } else {
6533           setPrefix((String)value);
6534         }
6535         break;
6536
6537       case NEXTHOP:
6538         if (value == null) {
6539           unsetNexthop();
6540         } else {
6541           setNexthop((String)value);
6542         }
6543         break;
6544
6545       case RD:
6546         if (value == null) {
6547           unsetRd();
6548         } else {
6549           setRd((String)value);
6550         }
6551         break;
6552
6553       case LABEL:
6554         if (value == null) {
6555           unsetLabel();
6556         } else {
6557           setLabel((Integer)value);
6558         }
6559         break;
6560
6561       }
6562     }
6563
6564     public Object getFieldValue(_Fields field) {
6565       switch (field) {
6566       case PREFIX:
6567         return getPrefix();
6568
6569       case NEXTHOP:
6570         return getNexthop();
6571
6572       case RD:
6573         return getRd();
6574
6575       case LABEL:
6576         return Integer.valueOf(getLabel());
6577
6578       }
6579       throw new IllegalStateException();
6580     }
6581
6582     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6583     public boolean isSet(_Fields field) {
6584       if (field == null) {
6585         throw new IllegalArgumentException();
6586       }
6587
6588       switch (field) {
6589       case PREFIX:
6590         return isSetPrefix();
6591       case NEXTHOP:
6592         return isSetNexthop();
6593       case RD:
6594         return isSetRd();
6595       case LABEL:
6596         return isSetLabel();
6597       }
6598       throw new IllegalStateException();
6599     }
6600
6601     @Override
6602     public boolean equals(Object that) {
6603       if (that == null)
6604         return false;
6605       if (that instanceof pushRoute_args)
6606         return this.equals((pushRoute_args)that);
6607       return false;
6608     }
6609
6610     public boolean equals(pushRoute_args that) {
6611       if (that == null)
6612         return false;
6613
6614       boolean this_present_prefix = true && this.isSetPrefix();
6615       boolean that_present_prefix = true && that.isSetPrefix();
6616       if (this_present_prefix || that_present_prefix) {
6617         if (!(this_present_prefix && that_present_prefix))
6618           return false;
6619         if (!this.prefix.equals(that.prefix))
6620           return false;
6621       }
6622
6623       boolean this_present_nexthop = true && this.isSetNexthop();
6624       boolean that_present_nexthop = true && that.isSetNexthop();
6625       if (this_present_nexthop || that_present_nexthop) {
6626         if (!(this_present_nexthop && that_present_nexthop))
6627           return false;
6628         if (!this.nexthop.equals(that.nexthop))
6629           return false;
6630       }
6631
6632       boolean this_present_rd = true && this.isSetRd();
6633       boolean that_present_rd = true && that.isSetRd();
6634       if (this_present_rd || that_present_rd) {
6635         if (!(this_present_rd && that_present_rd))
6636           return false;
6637         if (!this.rd.equals(that.rd))
6638           return false;
6639       }
6640
6641       boolean this_present_label = true;
6642       boolean that_present_label = true;
6643       if (this_present_label || that_present_label) {
6644         if (!(this_present_label && that_present_label))
6645           return false;
6646         if (this.label != that.label)
6647           return false;
6648       }
6649
6650       return true;
6651     }
6652
6653     @Override
6654     public int hashCode() {
6655       return 0;
6656     }
6657
6658     @Override
6659     public int compareTo(pushRoute_args other) {
6660       if (!getClass().equals(other.getClass())) {
6661         return getClass().getName().compareTo(other.getClass().getName());
6662       }
6663
6664       int lastComparison = 0;
6665
6666       lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
6667       if (lastComparison != 0) {
6668         return lastComparison;
6669       }
6670       if (isSetPrefix()) {
6671         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
6672         if (lastComparison != 0) {
6673           return lastComparison;
6674         }
6675       }
6676       lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
6677       if (lastComparison != 0) {
6678         return lastComparison;
6679       }
6680       if (isSetNexthop()) {
6681         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
6682         if (lastComparison != 0) {
6683           return lastComparison;
6684         }
6685       }
6686       lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
6687       if (lastComparison != 0) {
6688         return lastComparison;
6689       }
6690       if (isSetRd()) {
6691         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
6692         if (lastComparison != 0) {
6693           return lastComparison;
6694         }
6695       }
6696       lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
6697       if (lastComparison != 0) {
6698         return lastComparison;
6699       }
6700       if (isSetLabel()) {
6701         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
6702         if (lastComparison != 0) {
6703           return lastComparison;
6704         }
6705       }
6706       return 0;
6707     }
6708
6709     public _Fields fieldForId(int fieldId) {
6710       return _Fields.findByThriftId(fieldId);
6711     }
6712
6713     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6714       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
6715     }
6716
6717     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6718       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
6719     }
6720
6721     @Override
6722     public String toString() {
6723       StringBuilder sb = new StringBuilder("pushRoute_args(");
6724       boolean first = true;
6725
6726       sb.append("prefix:");
6727       if (this.prefix == null) {
6728         sb.append("null");
6729       } else {
6730         sb.append(this.prefix);
6731       }
6732       first = false;
6733       if (!first) sb.append(", ");
6734       sb.append("nexthop:");
6735       if (this.nexthop == null) {
6736         sb.append("null");
6737       } else {
6738         sb.append(this.nexthop);
6739       }
6740       first = false;
6741       if (!first) sb.append(", ");
6742       sb.append("rd:");
6743       if (this.rd == null) {
6744         sb.append("null");
6745       } else {
6746         sb.append(this.rd);
6747       }
6748       first = false;
6749       if (!first) sb.append(", ");
6750       sb.append("label:");
6751       sb.append(this.label);
6752       first = false;
6753       sb.append(")");
6754       return sb.toString();
6755     }
6756
6757     public void validate() throws org.apache.thrift.TException {
6758       // check for required fields
6759       // check for sub-struct validity
6760     }
6761
6762     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6763       try {
6764         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6765       } catch (org.apache.thrift.TException te) {
6766         throw new java.io.IOException(te);
6767       }
6768     }
6769
6770     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6771       try {
6772         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6773         __isset_bitfield = 0;
6774         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6775       } catch (org.apache.thrift.TException te) {
6776         throw new java.io.IOException(te);
6777       }
6778     }
6779
6780     private static class pushRoute_argsStandardSchemeFactory implements SchemeFactory {
6781       public pushRoute_argsStandardScheme getScheme() {
6782         return new pushRoute_argsStandardScheme();
6783       }
6784     }
6785
6786     private static class pushRoute_argsStandardScheme extends StandardScheme<pushRoute_args> {
6787
6788       public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_args struct) throws org.apache.thrift.TException {
6789         org.apache.thrift.protocol.TField schemeField;
6790         iprot.readStructBegin();
6791         while (true)
6792         {
6793           schemeField = iprot.readFieldBegin();
6794           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
6795             break;
6796           }
6797           switch (schemeField.id) {
6798             case 1: // PREFIX
6799               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
6800                 struct.prefix = iprot.readString();
6801                 struct.setPrefixIsSet(true);
6802               } else { 
6803                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6804               }
6805               break;
6806             case 2: // NEXTHOP
6807               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
6808                 struct.nexthop = iprot.readString();
6809                 struct.setNexthopIsSet(true);
6810               } else { 
6811                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6812               }
6813               break;
6814             case 3: // RD
6815               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
6816                 struct.rd = iprot.readString();
6817                 struct.setRdIsSet(true);
6818               } else { 
6819                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6820               }
6821               break;
6822             case 4: // LABEL
6823               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
6824                 struct.label = iprot.readI32();
6825                 struct.setLabelIsSet(true);
6826               } else { 
6827                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6828               }
6829               break;
6830             default:
6831               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6832           }
6833           iprot.readFieldEnd();
6834         }
6835         iprot.readStructEnd();
6836
6837         // check for required fields of primitive type, which can't be checked in the validate method
6838         struct.validate();
6839       }
6840
6841       public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_args struct) throws org.apache.thrift.TException {
6842         struct.validate();
6843
6844         oprot.writeStructBegin(STRUCT_DESC);
6845         if (struct.prefix != null) {
6846           oprot.writeFieldBegin(PREFIX_FIELD_DESC);
6847           oprot.writeString(struct.prefix);
6848           oprot.writeFieldEnd();
6849         }
6850         if (struct.nexthop != null) {
6851           oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
6852           oprot.writeString(struct.nexthop);
6853           oprot.writeFieldEnd();
6854         }
6855         if (struct.rd != null) {
6856           oprot.writeFieldBegin(RD_FIELD_DESC);
6857           oprot.writeString(struct.rd);
6858           oprot.writeFieldEnd();
6859         }
6860         oprot.writeFieldBegin(LABEL_FIELD_DESC);
6861         oprot.writeI32(struct.label);
6862         oprot.writeFieldEnd();
6863         oprot.writeFieldStop();
6864         oprot.writeStructEnd();
6865       }
6866
6867     }
6868
6869     private static class pushRoute_argsTupleSchemeFactory implements SchemeFactory {
6870       public pushRoute_argsTupleScheme getScheme() {
6871         return new pushRoute_argsTupleScheme();
6872       }
6873     }
6874
6875     private static class pushRoute_argsTupleScheme extends TupleScheme<pushRoute_args> {
6876
6877       @Override
6878       public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
6879         TTupleProtocol oprot = (TTupleProtocol) prot;
6880         BitSet optionals = new BitSet();
6881         if (struct.isSetPrefix()) {
6882           optionals.set(0);
6883         }
6884         if (struct.isSetNexthop()) {
6885           optionals.set(1);
6886         }
6887         if (struct.isSetRd()) {
6888           optionals.set(2);
6889         }
6890         if (struct.isSetLabel()) {
6891           optionals.set(3);
6892         }
6893         oprot.writeBitSet(optionals, 4);
6894         if (struct.isSetPrefix()) {
6895           oprot.writeString(struct.prefix);
6896         }
6897         if (struct.isSetNexthop()) {
6898           oprot.writeString(struct.nexthop);
6899         }
6900         if (struct.isSetRd()) {
6901           oprot.writeString(struct.rd);
6902         }
6903         if (struct.isSetLabel()) {
6904           oprot.writeI32(struct.label);
6905         }
6906       }
6907
6908       @Override
6909       public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
6910         TTupleProtocol iprot = (TTupleProtocol) prot;
6911         BitSet incoming = iprot.readBitSet(4);
6912         if (incoming.get(0)) {
6913           struct.prefix = iprot.readString();
6914           struct.setPrefixIsSet(true);
6915         }
6916         if (incoming.get(1)) {
6917           struct.nexthop = iprot.readString();
6918           struct.setNexthopIsSet(true);
6919         }
6920         if (incoming.get(2)) {
6921           struct.rd = iprot.readString();
6922           struct.setRdIsSet(true);
6923         }
6924         if (incoming.get(3)) {
6925           struct.label = iprot.readI32();
6926           struct.setLabelIsSet(true);
6927         }
6928       }
6929     }
6930
6931   }
6932
6933   public static class pushRoute_result implements org.apache.thrift.TBase<pushRoute_result, pushRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_result>   {
6934     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_result");
6935
6936     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
6937
6938     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
6939     static {
6940       schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory());
6941       schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory());
6942     }
6943
6944     public int success; // required
6945
6946     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6947     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6948       SUCCESS((short)0, "success");
6949
6950       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6951
6952       static {
6953         for (_Fields field : EnumSet.allOf(_Fields.class)) {
6954           byName.put(field.getFieldName(), field);
6955         }
6956       }
6957
6958       /**
6959        * Find the _Fields constant that matches fieldId, or null if its not found.
6960        */
6961       public static _Fields findByThriftId(int fieldId) {
6962         switch(fieldId) {
6963           case 0: // SUCCESS
6964             return SUCCESS;
6965           default:
6966             return null;
6967         }
6968       }
6969
6970       /**
6971        * Find the _Fields constant that matches fieldId, throwing an exception
6972        * if it is not found.
6973        */
6974       public static _Fields findByThriftIdOrThrow(int fieldId) {
6975         _Fields fields = findByThriftId(fieldId);
6976         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6977         return fields;
6978       }
6979
6980       /**
6981        * Find the _Fields constant that matches name, or null if its not found.
6982        */
6983       public static _Fields findByName(String name) {
6984         return byName.get(name);
6985       }
6986
6987       private final short _thriftId;
6988       private final String _fieldName;
6989
6990       _Fields(short thriftId, String fieldName) {
6991         _thriftId = thriftId;
6992         _fieldName = fieldName;
6993       }
6994
6995       public short getThriftFieldId() {
6996         return _thriftId;
6997       }
6998
6999       public String getFieldName() {
7000         return _fieldName;
7001       }
7002     }
7003
7004     // isset id assignments
7005     private static final int __SUCCESS_ISSET_ID = 0;
7006     private byte __isset_bitfield = 0;
7007     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7008     static {
7009       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7010       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7011           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
7012       metaDataMap = Collections.unmodifiableMap(tmpMap);
7013       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_result.class, metaDataMap);
7014     }
7015
7016     public pushRoute_result() {
7017     }
7018
7019     public pushRoute_result(
7020       int success)
7021     {
7022       this();
7023       this.success = success;
7024       setSuccessIsSet(true);
7025     }
7026
7027     /**
7028      * Performs a deep copy on <i>other</i>.
7029      */
7030     public pushRoute_result(pushRoute_result other) {
7031       __isset_bitfield = other.__isset_bitfield;
7032       this.success = other.success;
7033     }
7034
7035     public pushRoute_result deepCopy() {
7036       return new pushRoute_result(this);
7037     }
7038
7039     @Override
7040     public void clear() {
7041       setSuccessIsSet(false);
7042       this.success = 0;
7043     }
7044
7045     public int getSuccess() {
7046       return this.success;
7047     }
7048
7049     public pushRoute_result setSuccess(int success) {
7050       this.success = success;
7051       setSuccessIsSet(true);
7052       return this;
7053     }
7054
7055     public void unsetSuccess() {
7056       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
7057     }
7058
7059     /** Returns true if field success is set (has been assigned a value) and false otherwise */
7060     public boolean isSetSuccess() {
7061       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
7062     }
7063
7064     public void setSuccessIsSet(boolean value) {
7065       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
7066     }
7067
7068     public void setFieldValue(_Fields field, Object value) {
7069       switch (field) {
7070       case SUCCESS:
7071         if (value == null) {
7072           unsetSuccess();
7073         } else {
7074           setSuccess((Integer)value);
7075         }
7076         break;
7077
7078       }
7079     }
7080
7081     public Object getFieldValue(_Fields field) {
7082       switch (field) {
7083       case SUCCESS:
7084         return Integer.valueOf(getSuccess());
7085
7086       }
7087       throw new IllegalStateException();
7088     }
7089
7090     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7091     public boolean isSet(_Fields field) {
7092       if (field == null) {
7093         throw new IllegalArgumentException();
7094       }
7095
7096       switch (field) {
7097       case SUCCESS:
7098         return isSetSuccess();
7099       }
7100       throw new IllegalStateException();
7101     }
7102
7103     @Override
7104     public boolean equals(Object that) {
7105       if (that == null)
7106         return false;
7107       if (that instanceof pushRoute_result)
7108         return this.equals((pushRoute_result)that);
7109       return false;
7110     }
7111
7112     public boolean equals(pushRoute_result that) {
7113       if (that == null)
7114         return false;
7115
7116       boolean this_present_success = true;
7117       boolean that_present_success = true;
7118       if (this_present_success || that_present_success) {
7119         if (!(this_present_success && that_present_success))
7120           return false;
7121         if (this.success != that.success)
7122           return false;
7123       }
7124
7125       return true;
7126     }
7127
7128     @Override
7129     public int hashCode() {
7130       return 0;
7131     }
7132
7133     @Override
7134     public int compareTo(pushRoute_result other) {
7135       if (!getClass().equals(other.getClass())) {
7136         return getClass().getName().compareTo(other.getClass().getName());
7137       }
7138
7139       int lastComparison = 0;
7140
7141       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
7142       if (lastComparison != 0) {
7143         return lastComparison;
7144       }
7145       if (isSetSuccess()) {
7146         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
7147         if (lastComparison != 0) {
7148           return lastComparison;
7149         }
7150       }
7151       return 0;
7152     }
7153
7154     public _Fields fieldForId(int fieldId) {
7155       return _Fields.findByThriftId(fieldId);
7156     }
7157
7158     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7159       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
7160     }
7161
7162     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7163       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
7164       }
7165
7166     @Override
7167     public String toString() {
7168       StringBuilder sb = new StringBuilder("pushRoute_result(");
7169       boolean first = true;
7170
7171       sb.append("success:");
7172       sb.append(this.success);
7173       first = false;
7174       sb.append(")");
7175       return sb.toString();
7176     }
7177
7178     public void validate() throws org.apache.thrift.TException {
7179       // check for required fields
7180       // check for sub-struct validity
7181     }
7182
7183     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7184       try {
7185         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7186       } catch (org.apache.thrift.TException te) {
7187         throw new java.io.IOException(te);
7188       }
7189     }
7190
7191     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7192       try {
7193         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7194         __isset_bitfield = 0;
7195         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7196       } catch (org.apache.thrift.TException te) {
7197         throw new java.io.IOException(te);
7198       }
7199     }
7200
7201     private static class pushRoute_resultStandardSchemeFactory implements SchemeFactory {
7202       public pushRoute_resultStandardScheme getScheme() {
7203         return new pushRoute_resultStandardScheme();
7204       }
7205     }
7206
7207     private static class pushRoute_resultStandardScheme extends StandardScheme<pushRoute_result> {
7208
7209       public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_result struct) throws org.apache.thrift.TException {
7210         org.apache.thrift.protocol.TField schemeField;
7211         iprot.readStructBegin();
7212         while (true)
7213         {
7214           schemeField = iprot.readFieldBegin();
7215           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
7216             break;
7217           }
7218           switch (schemeField.id) {
7219             case 0: // SUCCESS
7220               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
7221                 struct.success = iprot.readI32();
7222                 struct.setSuccessIsSet(true);
7223               } else { 
7224                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7225               }
7226               break;
7227             default:
7228               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7229           }
7230           iprot.readFieldEnd();
7231         }
7232         iprot.readStructEnd();
7233
7234         // check for required fields of primitive type, which can't be checked in the validate method
7235         struct.validate();
7236       }
7237
7238       public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_result struct) throws org.apache.thrift.TException {
7239         struct.validate();
7240
7241         oprot.writeStructBegin(STRUCT_DESC);
7242         if (struct.isSetSuccess()) {
7243           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7244           oprot.writeI32(struct.success);
7245           oprot.writeFieldEnd();
7246         }
7247         oprot.writeFieldStop();
7248         oprot.writeStructEnd();
7249       }
7250
7251     }
7252
7253     private static class pushRoute_resultTupleSchemeFactory implements SchemeFactory {
7254       public pushRoute_resultTupleScheme getScheme() {
7255         return new pushRoute_resultTupleScheme();
7256       }
7257     }
7258
7259     private static class pushRoute_resultTupleScheme extends TupleScheme<pushRoute_result> {
7260
7261       @Override
7262       public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
7263         TTupleProtocol oprot = (TTupleProtocol) prot;
7264         BitSet optionals = new BitSet();
7265         if (struct.isSetSuccess()) {
7266           optionals.set(0);
7267         }
7268         oprot.writeBitSet(optionals, 1);
7269         if (struct.isSetSuccess()) {
7270           oprot.writeI32(struct.success);
7271         }
7272       }
7273
7274       @Override
7275       public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
7276         TTupleProtocol iprot = (TTupleProtocol) prot;
7277         BitSet incoming = iprot.readBitSet(1);
7278         if (incoming.get(0)) {
7279           struct.success = iprot.readI32();
7280           struct.setSuccessIsSet(true);
7281         }
7282       }
7283     }
7284
7285   }
7286
7287   public static class withdrawRoute_args implements org.apache.thrift.TBase<withdrawRoute_args, withdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_args>   {
7288     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_args");
7289
7290     private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
7291     private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)2);
7292
7293     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
7294     static {
7295       schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory());
7296       schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory());
7297     }
7298
7299     public String prefix; // required
7300     public String rd; // required
7301
7302     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7303     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7304       PREFIX((short)1, "prefix"),
7305       RD((short)2, "rd");
7306
7307       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7308
7309       static {
7310         for (_Fields field : EnumSet.allOf(_Fields.class)) {
7311           byName.put(field.getFieldName(), field);
7312         }
7313       }
7314
7315       /**
7316        * Find the _Fields constant that matches fieldId, or null if its not found.
7317        */
7318       public static _Fields findByThriftId(int fieldId) {
7319         switch(fieldId) {
7320           case 1: // PREFIX
7321             return PREFIX;
7322           case 2: // RD
7323             return RD;
7324           default:
7325             return null;
7326         }
7327       }
7328
7329       /**
7330        * Find the _Fields constant that matches fieldId, throwing an exception
7331        * if it is not found.
7332        */
7333       public static _Fields findByThriftIdOrThrow(int fieldId) {
7334         _Fields fields = findByThriftId(fieldId);
7335         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7336         return fields;
7337       }
7338
7339       /**
7340        * Find the _Fields constant that matches name, or null if its not found.
7341        */
7342       public static _Fields findByName(String name) {
7343         return byName.get(name);
7344       }
7345
7346       private final short _thriftId;
7347       private final String _fieldName;
7348
7349       _Fields(short thriftId, String fieldName) {
7350         _thriftId = thriftId;
7351         _fieldName = fieldName;
7352       }
7353
7354       public short getThriftFieldId() {
7355         return _thriftId;
7356       }
7357
7358       public String getFieldName() {
7359         return _fieldName;
7360       }
7361     }
7362
7363     // isset id assignments
7364     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7365     static {
7366       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7367       tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7368           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7369       tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7370           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7371       metaDataMap = Collections.unmodifiableMap(tmpMap);
7372       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_args.class, metaDataMap);
7373     }
7374
7375     public withdrawRoute_args() {
7376     }
7377
7378     public withdrawRoute_args(
7379       String prefix,
7380       String rd)
7381     {
7382       this();
7383       this.prefix = prefix;
7384       this.rd = rd;
7385     }
7386
7387     /**
7388      * Performs a deep copy on <i>other</i>.
7389      */
7390     public withdrawRoute_args(withdrawRoute_args other) {
7391       if (other.isSetPrefix()) {
7392         this.prefix = other.prefix;
7393       }
7394       if (other.isSetRd()) {
7395         this.rd = other.rd;
7396       }
7397     }
7398
7399     public withdrawRoute_args deepCopy() {
7400       return new withdrawRoute_args(this);
7401     }
7402
7403     @Override
7404     public void clear() {
7405       this.prefix = null;
7406       this.rd = null;
7407     }
7408
7409     public String getPrefix() {
7410       return this.prefix;
7411     }
7412
7413     public withdrawRoute_args setPrefix(String prefix) {
7414       this.prefix = prefix;
7415       return this;
7416     }
7417
7418     public void unsetPrefix() {
7419       this.prefix = null;
7420     }
7421
7422     /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
7423     public boolean isSetPrefix() {
7424       return this.prefix != null;
7425     }
7426
7427     public void setPrefixIsSet(boolean value) {
7428       if (!value) {
7429         this.prefix = null;
7430       }
7431     }
7432
7433     public String getRd() {
7434       return this.rd;
7435     }
7436
7437     public withdrawRoute_args setRd(String rd) {
7438       this.rd = rd;
7439       return this;
7440     }
7441
7442     public void unsetRd() {
7443       this.rd = null;
7444     }
7445
7446     /** Returns true if field rd is set (has been assigned a value) and false otherwise */
7447     public boolean isSetRd() {
7448       return this.rd != null;
7449     }
7450
7451     public void setRdIsSet(boolean value) {
7452       if (!value) {
7453         this.rd = null;
7454       }
7455     }
7456
7457     public void setFieldValue(_Fields field, Object value) {
7458       switch (field) {
7459       case PREFIX:
7460         if (value == null) {
7461           unsetPrefix();
7462         } else {
7463           setPrefix((String)value);
7464         }
7465         break;
7466
7467       case RD:
7468         if (value == null) {
7469           unsetRd();
7470         } else {
7471           setRd((String)value);
7472         }
7473         break;
7474
7475       }
7476     }
7477
7478     public Object getFieldValue(_Fields field) {
7479       switch (field) {
7480       case PREFIX:
7481         return getPrefix();
7482
7483       case RD:
7484         return getRd();
7485
7486       }
7487       throw new IllegalStateException();
7488     }
7489
7490     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7491     public boolean isSet(_Fields field) {
7492       if (field == null) {
7493         throw new IllegalArgumentException();
7494       }
7495
7496       switch (field) {
7497       case PREFIX:
7498         return isSetPrefix();
7499       case RD:
7500         return isSetRd();
7501       }
7502       throw new IllegalStateException();
7503     }
7504
7505     @Override
7506     public boolean equals(Object that) {
7507       if (that == null)
7508         return false;
7509       if (that instanceof withdrawRoute_args)
7510         return this.equals((withdrawRoute_args)that);
7511       return false;
7512     }
7513
7514     public boolean equals(withdrawRoute_args that) {
7515       if (that == null)
7516         return false;
7517
7518       boolean this_present_prefix = true && this.isSetPrefix();
7519       boolean that_present_prefix = true && that.isSetPrefix();
7520       if (this_present_prefix || that_present_prefix) {
7521         if (!(this_present_prefix && that_present_prefix))
7522           return false;
7523         if (!this.prefix.equals(that.prefix))
7524           return false;
7525       }
7526
7527       boolean this_present_rd = true && this.isSetRd();
7528       boolean that_present_rd = true && that.isSetRd();
7529       if (this_present_rd || that_present_rd) {
7530         if (!(this_present_rd && that_present_rd))
7531           return false;
7532         if (!this.rd.equals(that.rd))
7533           return false;
7534       }
7535
7536       return true;
7537     }
7538
7539     @Override
7540     public int hashCode() {
7541       return 0;
7542     }
7543
7544     @Override
7545     public int compareTo(withdrawRoute_args other) {
7546       if (!getClass().equals(other.getClass())) {
7547         return getClass().getName().compareTo(other.getClass().getName());
7548       }
7549
7550       int lastComparison = 0;
7551
7552       lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
7553       if (lastComparison != 0) {
7554         return lastComparison;
7555       }
7556       if (isSetPrefix()) {
7557         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
7558         if (lastComparison != 0) {
7559           return lastComparison;
7560         }
7561       }
7562       lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
7563       if (lastComparison != 0) {
7564         return lastComparison;
7565       }
7566       if (isSetRd()) {
7567         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
7568         if (lastComparison != 0) {
7569           return lastComparison;
7570         }
7571       }
7572       return 0;
7573     }
7574
7575     public _Fields fieldForId(int fieldId) {
7576       return _Fields.findByThriftId(fieldId);
7577     }
7578
7579     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7580       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
7581     }
7582
7583     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7584       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
7585     }
7586
7587     @Override
7588     public String toString() {
7589       StringBuilder sb = new StringBuilder("withdrawRoute_args(");
7590       boolean first = true;
7591
7592       sb.append("prefix:");
7593       if (this.prefix == null) {
7594         sb.append("null");
7595       } else {
7596         sb.append(this.prefix);
7597       }
7598       first = false;
7599       if (!first) sb.append(", ");
7600       sb.append("rd:");
7601       if (this.rd == null) {
7602         sb.append("null");
7603       } else {
7604         sb.append(this.rd);
7605       }
7606       first = false;
7607       sb.append(")");
7608       return sb.toString();
7609     }
7610
7611     public void validate() throws org.apache.thrift.TException {
7612       // check for required fields
7613       // check for sub-struct validity
7614     }
7615
7616     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7617       try {
7618         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7619       } catch (org.apache.thrift.TException te) {
7620         throw new java.io.IOException(te);
7621       }
7622     }
7623
7624     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7625       try {
7626         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7627       } catch (org.apache.thrift.TException te) {
7628         throw new java.io.IOException(te);
7629       }
7630     }
7631
7632     private static class withdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
7633       public withdrawRoute_argsStandardScheme getScheme() {
7634         return new withdrawRoute_argsStandardScheme();
7635       }
7636     }
7637
7638     private static class withdrawRoute_argsStandardScheme extends StandardScheme<withdrawRoute_args> {
7639
7640       public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
7641         org.apache.thrift.protocol.TField schemeField;
7642         iprot.readStructBegin();
7643         while (true)
7644         {
7645           schemeField = iprot.readFieldBegin();
7646           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
7647             break;
7648           }
7649           switch (schemeField.id) {
7650             case 1: // PREFIX
7651               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
7652                 struct.prefix = iprot.readString();
7653                 struct.setPrefixIsSet(true);
7654               } else { 
7655                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7656               }
7657               break;
7658             case 2: // RD
7659               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
7660                 struct.rd = iprot.readString();
7661                 struct.setRdIsSet(true);
7662               } else { 
7663                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7664               }
7665               break;
7666             default:
7667               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7668           }
7669           iprot.readFieldEnd();
7670         }
7671         iprot.readStructEnd();
7672
7673         // check for required fields of primitive type, which can't be checked in the validate method
7674         struct.validate();
7675       }
7676
7677       public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
7678         struct.validate();
7679
7680         oprot.writeStructBegin(STRUCT_DESC);
7681         if (struct.prefix != null) {
7682           oprot.writeFieldBegin(PREFIX_FIELD_DESC);
7683           oprot.writeString(struct.prefix);
7684           oprot.writeFieldEnd();
7685         }
7686         if (struct.rd != null) {
7687           oprot.writeFieldBegin(RD_FIELD_DESC);
7688           oprot.writeString(struct.rd);
7689           oprot.writeFieldEnd();
7690         }
7691         oprot.writeFieldStop();
7692         oprot.writeStructEnd();
7693       }
7694
7695     }
7696
7697     private static class withdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
7698       public withdrawRoute_argsTupleScheme getScheme() {
7699         return new withdrawRoute_argsTupleScheme();
7700       }
7701     }
7702
7703     private static class withdrawRoute_argsTupleScheme extends TupleScheme<withdrawRoute_args> {
7704
7705       @Override
7706       public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
7707         TTupleProtocol oprot = (TTupleProtocol) prot;
7708         BitSet optionals = new BitSet();
7709         if (struct.isSetPrefix()) {
7710           optionals.set(0);
7711         }
7712         if (struct.isSetRd()) {
7713           optionals.set(1);
7714         }
7715         oprot.writeBitSet(optionals, 2);
7716         if (struct.isSetPrefix()) {
7717           oprot.writeString(struct.prefix);
7718         }
7719         if (struct.isSetRd()) {
7720           oprot.writeString(struct.rd);
7721         }
7722       }
7723
7724       @Override
7725       public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
7726         TTupleProtocol iprot = (TTupleProtocol) prot;
7727         BitSet incoming = iprot.readBitSet(2);
7728         if (incoming.get(0)) {
7729           struct.prefix = iprot.readString();
7730           struct.setPrefixIsSet(true);
7731         }
7732         if (incoming.get(1)) {
7733           struct.rd = iprot.readString();
7734           struct.setRdIsSet(true);
7735         }
7736       }
7737     }
7738
7739   }
7740
7741   public static class withdrawRoute_result implements org.apache.thrift.TBase<withdrawRoute_result, withdrawRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_result>   {
7742     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_result");
7743
7744     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
7745
7746     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
7747     static {
7748       schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory());
7749       schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory());
7750     }
7751
7752     public int success; // required
7753
7754     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7755     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7756       SUCCESS((short)0, "success");
7757
7758       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7759
7760       static {
7761         for (_Fields field : EnumSet.allOf(_Fields.class)) {
7762           byName.put(field.getFieldName(), field);
7763         }
7764       }
7765
7766       /**
7767        * Find the _Fields constant that matches fieldId, or null if its not found.
7768        */
7769       public static _Fields findByThriftId(int fieldId) {
7770         switch(fieldId) {
7771           case 0: // SUCCESS
7772             return SUCCESS;
7773           default:
7774             return null;
7775         }
7776       }
7777
7778       /**
7779        * Find the _Fields constant that matches fieldId, throwing an exception
7780        * if it is not found.
7781        */
7782       public static _Fields findByThriftIdOrThrow(int fieldId) {
7783         _Fields fields = findByThriftId(fieldId);
7784         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7785         return fields;
7786       }
7787
7788       /**
7789        * Find the _Fields constant that matches name, or null if its not found.
7790        */
7791       public static _Fields findByName(String name) {
7792         return byName.get(name);
7793       }
7794
7795       private final short _thriftId;
7796       private final String _fieldName;
7797
7798       _Fields(short thriftId, String fieldName) {
7799         _thriftId = thriftId;
7800         _fieldName = fieldName;
7801       }
7802
7803       public short getThriftFieldId() {
7804         return _thriftId;
7805       }
7806
7807       public String getFieldName() {
7808         return _fieldName;
7809       }
7810     }
7811
7812     // isset id assignments
7813     private static final int __SUCCESS_ISSET_ID = 0;
7814     private byte __isset_bitfield = 0;
7815     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7816     static {
7817       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7818       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7819           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
7820       metaDataMap = Collections.unmodifiableMap(tmpMap);
7821       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_result.class, metaDataMap);
7822     }
7823
7824     public withdrawRoute_result() {
7825     }
7826
7827     public withdrawRoute_result(
7828       int success)
7829     {
7830       this();
7831       this.success = success;
7832       setSuccessIsSet(true);
7833     }
7834
7835     /**
7836      * Performs a deep copy on <i>other</i>.
7837      */
7838     public withdrawRoute_result(withdrawRoute_result other) {
7839       __isset_bitfield = other.__isset_bitfield;
7840       this.success = other.success;
7841     }
7842
7843     public withdrawRoute_result deepCopy() {
7844       return new withdrawRoute_result(this);
7845     }
7846
7847     @Override
7848     public void clear() {
7849       setSuccessIsSet(false);
7850       this.success = 0;
7851     }
7852
7853     public int getSuccess() {
7854       return this.success;
7855     }
7856
7857     public withdrawRoute_result setSuccess(int success) {
7858       this.success = success;
7859       setSuccessIsSet(true);
7860       return this;
7861     }
7862
7863     public void unsetSuccess() {
7864       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
7865     }
7866
7867     /** Returns true if field success is set (has been assigned a value) and false otherwise */
7868     public boolean isSetSuccess() {
7869       return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
7870     }
7871
7872     public void setSuccessIsSet(boolean value) {
7873       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
7874     }
7875
7876     public void setFieldValue(_Fields field, Object value) {
7877       switch (field) {
7878       case SUCCESS:
7879         if (value == null) {
7880           unsetSuccess();
7881         } else {
7882           setSuccess((Integer)value);
7883         }
7884         break;
7885
7886       }
7887     }
7888
7889     public Object getFieldValue(_Fields field) {
7890       switch (field) {
7891       case SUCCESS:
7892         return Integer.valueOf(getSuccess());
7893
7894       }
7895       throw new IllegalStateException();
7896     }
7897
7898     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7899     public boolean isSet(_Fields field) {
7900       if (field == null) {
7901         throw new IllegalArgumentException();
7902       }
7903
7904       switch (field) {
7905       case SUCCESS:
7906         return isSetSuccess();
7907       }
7908       throw new IllegalStateException();
7909     }
7910
7911     @Override
7912     public boolean equals(Object that) {
7913       if (that == null)
7914         return false;
7915       if (that instanceof withdrawRoute_result)
7916         return this.equals((withdrawRoute_result)that);
7917       return false;
7918     }
7919
7920     public boolean equals(withdrawRoute_result that) {
7921       if (that == null)
7922         return false;
7923
7924       boolean this_present_success = true;
7925       boolean that_present_success = true;
7926       if (this_present_success || that_present_success) {
7927         if (!(this_present_success && that_present_success))
7928           return false;
7929         if (this.success != that.success)
7930           return false;
7931       }
7932
7933       return true;
7934     }
7935
7936     @Override
7937     public int hashCode() {
7938       return 0;
7939     }
7940
7941     @Override
7942     public int compareTo(withdrawRoute_result other) {
7943       if (!getClass().equals(other.getClass())) {
7944         return getClass().getName().compareTo(other.getClass().getName());
7945       }
7946
7947       int lastComparison = 0;
7948
7949       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
7950       if (lastComparison != 0) {
7951         return lastComparison;
7952       }
7953       if (isSetSuccess()) {
7954         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
7955         if (lastComparison != 0) {
7956           return lastComparison;
7957         }
7958       }
7959       return 0;
7960     }
7961
7962     public _Fields fieldForId(int fieldId) {
7963       return _Fields.findByThriftId(fieldId);
7964     }
7965
7966     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7967       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
7968     }
7969
7970     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7971       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
7972       }
7973
7974     @Override
7975     public String toString() {
7976       StringBuilder sb = new StringBuilder("withdrawRoute_result(");
7977       boolean first = true;
7978
7979       sb.append("success:");
7980       sb.append(this.success);
7981       first = false;
7982       sb.append(")");
7983       return sb.toString();
7984     }
7985
7986     public void validate() throws org.apache.thrift.TException {
7987       // check for required fields
7988       // check for sub-struct validity
7989     }
7990
7991     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7992       try {
7993         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7994       } catch (org.apache.thrift.TException te) {
7995         throw new java.io.IOException(te);
7996       }
7997     }
7998
7999     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8000       try {
8001         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8002         __isset_bitfield = 0;
8003         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8004       } catch (org.apache.thrift.TException te) {
8005         throw new java.io.IOException(te);
8006       }
8007     }
8008
8009     private static class withdrawRoute_resultStandardSchemeFactory implements SchemeFactory {
8010       public withdrawRoute_resultStandardScheme getScheme() {
8011         return new withdrawRoute_resultStandardScheme();
8012       }
8013     }
8014
8015     private static class withdrawRoute_resultStandardScheme extends StandardScheme<withdrawRoute_result> {
8016
8017       public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
8018         org.apache.thrift.protocol.TField schemeField;
8019         iprot.readStructBegin();
8020         while (true)
8021         {
8022           schemeField = iprot.readFieldBegin();
8023           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
8024             break;
8025           }
8026           switch (schemeField.id) {
8027             case 0: // SUCCESS
8028               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
8029                 struct.success = iprot.readI32();
8030                 struct.setSuccessIsSet(true);
8031               } else { 
8032                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8033               }
8034               break;
8035             default:
8036               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8037           }
8038           iprot.readFieldEnd();
8039         }
8040         iprot.readStructEnd();
8041
8042         // check for required fields of primitive type, which can't be checked in the validate method
8043         struct.validate();
8044       }
8045
8046       public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
8047         struct.validate();
8048
8049         oprot.writeStructBegin(STRUCT_DESC);
8050         if (struct.isSetSuccess()) {
8051           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8052           oprot.writeI32(struct.success);
8053           oprot.writeFieldEnd();
8054         }
8055         oprot.writeFieldStop();
8056         oprot.writeStructEnd();
8057       }
8058
8059     }
8060
8061     private static class withdrawRoute_resultTupleSchemeFactory implements SchemeFactory {
8062       public withdrawRoute_resultTupleScheme getScheme() {
8063         return new withdrawRoute_resultTupleScheme();
8064       }
8065     }
8066
8067     private static class withdrawRoute_resultTupleScheme extends TupleScheme<withdrawRoute_result> {
8068
8069       @Override
8070       public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
8071         TTupleProtocol oprot = (TTupleProtocol) prot;
8072         BitSet optionals = new BitSet();
8073         if (struct.isSetSuccess()) {
8074           optionals.set(0);
8075         }
8076         oprot.writeBitSet(optionals, 1);
8077         if (struct.isSetSuccess()) {
8078           oprot.writeI32(struct.success);
8079         }
8080       }
8081
8082       @Override
8083       public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
8084         TTupleProtocol iprot = (TTupleProtocol) prot;
8085         BitSet incoming = iprot.readBitSet(1);
8086         if (incoming.get(0)) {
8087           struct.success = iprot.readI32();
8088           struct.setSuccessIsSet(true);
8089         }
8090       }
8091     }
8092
8093   }
8094
8095   public static class getRoutes_args implements org.apache.thrift.TBase<getRoutes_args, getRoutes_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRoutes_args>   {
8096     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoutes_args");
8097
8098     private static final org.apache.thrift.protocol.TField OPTYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("optype", org.apache.thrift.protocol.TType.I32, (short)1);
8099     private static final org.apache.thrift.protocol.TField WIN_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("winSize", org.apache.thrift.protocol.TType.I32, (short)2);
8100
8101     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
8102     static {
8103       schemes.put(StandardScheme.class, new getRoutes_argsStandardSchemeFactory());
8104       schemes.put(TupleScheme.class, new getRoutes_argsTupleSchemeFactory());
8105     }
8106
8107     public int optype; // required
8108     public int winSize; // required
8109
8110     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8111     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8112       OPTYPE((short)1, "optype"),
8113       WIN_SIZE((short)2, "winSize");
8114
8115       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8116
8117       static {
8118         for (_Fields field : EnumSet.allOf(_Fields.class)) {
8119           byName.put(field.getFieldName(), field);
8120         }
8121       }
8122
8123       /**
8124        * Find the _Fields constant that matches fieldId, or null if its not found.
8125        */
8126       public static _Fields findByThriftId(int fieldId) {
8127         switch(fieldId) {
8128           case 1: // OPTYPE
8129             return OPTYPE;
8130           case 2: // WIN_SIZE
8131             return WIN_SIZE;
8132           default:
8133             return null;
8134         }
8135       }
8136
8137       /**
8138        * Find the _Fields constant that matches fieldId, throwing an exception
8139        * if it is not found.
8140        */
8141       public static _Fields findByThriftIdOrThrow(int fieldId) {
8142         _Fields fields = findByThriftId(fieldId);
8143         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8144         return fields;
8145       }
8146
8147       /**
8148        * Find the _Fields constant that matches name, or null if its not found.
8149        */
8150       public static _Fields findByName(String name) {
8151         return byName.get(name);
8152       }
8153
8154       private final short _thriftId;
8155       private final String _fieldName;
8156
8157       _Fields(short thriftId, String fieldName) {
8158         _thriftId = thriftId;
8159         _fieldName = fieldName;
8160       }
8161
8162       public short getThriftFieldId() {
8163         return _thriftId;
8164       }
8165
8166       public String getFieldName() {
8167         return _fieldName;
8168       }
8169     }
8170
8171     // isset id assignments
8172     private static final int __OPTYPE_ISSET_ID = 0;
8173     private static final int __WINSIZE_ISSET_ID = 1;
8174     private byte __isset_bitfield = 0;
8175     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8176     static {
8177       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8178       tmpMap.put(_Fields.OPTYPE, new org.apache.thrift.meta_data.FieldMetaData("optype", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8179           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
8180       tmpMap.put(_Fields.WIN_SIZE, new org.apache.thrift.meta_data.FieldMetaData("winSize", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8181           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
8182       metaDataMap = Collections.unmodifiableMap(tmpMap);
8183       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoutes_args.class, metaDataMap);
8184     }
8185
8186     public getRoutes_args() {
8187     }
8188
8189     public getRoutes_args(
8190       int optype,
8191       int winSize)
8192     {
8193       this();
8194       this.optype = optype;
8195       setOptypeIsSet(true);
8196       this.winSize = winSize;
8197       setWinSizeIsSet(true);
8198     }
8199
8200     /**
8201      * Performs a deep copy on <i>other</i>.
8202      */
8203     public getRoutes_args(getRoutes_args other) {
8204       __isset_bitfield = other.__isset_bitfield;
8205       this.optype = other.optype;
8206       this.winSize = other.winSize;
8207     }
8208
8209     public getRoutes_args deepCopy() {
8210       return new getRoutes_args(this);
8211     }
8212
8213     @Override
8214     public void clear() {
8215       setOptypeIsSet(false);
8216       this.optype = 0;
8217       setWinSizeIsSet(false);
8218       this.winSize = 0;
8219     }
8220
8221     public int getOptype() {
8222       return this.optype;
8223     }
8224
8225     public getRoutes_args setOptype(int optype) {
8226       this.optype = optype;
8227       setOptypeIsSet(true);
8228       return this;
8229     }
8230
8231     public void unsetOptype() {
8232       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPTYPE_ISSET_ID);
8233     }
8234
8235     /** Returns true if field optype is set (has been assigned a value) and false otherwise */
8236     public boolean isSetOptype() {
8237       return EncodingUtils.testBit(__isset_bitfield, __OPTYPE_ISSET_ID);
8238     }
8239
8240     public void setOptypeIsSet(boolean value) {
8241       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPTYPE_ISSET_ID, value);
8242     }
8243
8244     public int getWinSize() {
8245       return this.winSize;
8246     }
8247
8248     public getRoutes_args setWinSize(int winSize) {
8249       this.winSize = winSize;
8250       setWinSizeIsSet(true);
8251       return this;
8252     }
8253
8254     public void unsetWinSize() {
8255       __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WINSIZE_ISSET_ID);
8256     }
8257
8258     /** Returns true if field winSize is set (has been assigned a value) and false otherwise */
8259     public boolean isSetWinSize() {
8260       return EncodingUtils.testBit(__isset_bitfield, __WINSIZE_ISSET_ID);
8261     }
8262
8263     public void setWinSizeIsSet(boolean value) {
8264       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WINSIZE_ISSET_ID, value);
8265     }
8266
8267     public void setFieldValue(_Fields field, Object value) {
8268       switch (field) {
8269       case OPTYPE:
8270         if (value == null) {
8271           unsetOptype();
8272         } else {
8273           setOptype((Integer)value);
8274         }
8275         break;
8276
8277       case WIN_SIZE:
8278         if (value == null) {
8279           unsetWinSize();
8280         } else {
8281           setWinSize((Integer)value);
8282         }
8283         break;
8284
8285       }
8286     }
8287
8288     public Object getFieldValue(_Fields field) {
8289       switch (field) {
8290       case OPTYPE:
8291         return Integer.valueOf(getOptype());
8292
8293       case WIN_SIZE:
8294         return Integer.valueOf(getWinSize());
8295
8296       }
8297       throw new IllegalStateException();
8298     }
8299
8300     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8301     public boolean isSet(_Fields field) {
8302       if (field == null) {
8303         throw new IllegalArgumentException();
8304       }
8305
8306       switch (field) {
8307       case OPTYPE:
8308         return isSetOptype();
8309       case WIN_SIZE:
8310         return isSetWinSize();
8311       }
8312       throw new IllegalStateException();
8313     }
8314
8315     @Override
8316     public boolean equals(Object that) {
8317       if (that == null)
8318         return false;
8319       if (that instanceof getRoutes_args)
8320         return this.equals((getRoutes_args)that);
8321       return false;
8322     }
8323
8324     public boolean equals(getRoutes_args that) {
8325       if (that == null)
8326         return false;
8327
8328       boolean this_present_optype = true;
8329       boolean that_present_optype = true;
8330       if (this_present_optype || that_present_optype) {
8331         if (!(this_present_optype && that_present_optype))
8332           return false;
8333         if (this.optype != that.optype)
8334           return false;
8335       }
8336
8337       boolean this_present_winSize = true;
8338       boolean that_present_winSize = true;
8339       if (this_present_winSize || that_present_winSize) {
8340         if (!(this_present_winSize && that_present_winSize))
8341           return false;
8342         if (this.winSize != that.winSize)
8343           return false;
8344       }
8345
8346       return true;
8347     }
8348
8349     @Override
8350     public int hashCode() {
8351       return 0;
8352     }
8353
8354     @Override
8355     public int compareTo(getRoutes_args other) {
8356       if (!getClass().equals(other.getClass())) {
8357         return getClass().getName().compareTo(other.getClass().getName());
8358       }
8359
8360       int lastComparison = 0;
8361
8362       lastComparison = Boolean.valueOf(isSetOptype()).compareTo(other.isSetOptype());
8363       if (lastComparison != 0) {
8364         return lastComparison;
8365       }
8366       if (isSetOptype()) {
8367         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.optype, other.optype);
8368         if (lastComparison != 0) {
8369           return lastComparison;
8370         }
8371       }
8372       lastComparison = Boolean.valueOf(isSetWinSize()).compareTo(other.isSetWinSize());
8373       if (lastComparison != 0) {
8374         return lastComparison;
8375       }
8376       if (isSetWinSize()) {
8377         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.winSize, other.winSize);
8378         if (lastComparison != 0) {
8379           return lastComparison;
8380         }
8381       }
8382       return 0;
8383     }
8384
8385     public _Fields fieldForId(int fieldId) {
8386       return _Fields.findByThriftId(fieldId);
8387     }
8388
8389     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8390       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
8391     }
8392
8393     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8394       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
8395     }
8396
8397     @Override
8398     public String toString() {
8399       StringBuilder sb = new StringBuilder("getRoutes_args(");
8400       boolean first = true;
8401
8402       sb.append("optype:");
8403       sb.append(this.optype);
8404       first = false;
8405       if (!first) sb.append(", ");
8406       sb.append("winSize:");
8407       sb.append(this.winSize);
8408       first = false;
8409       sb.append(")");
8410       return sb.toString();
8411     }
8412
8413     public void validate() throws org.apache.thrift.TException {
8414       // check for required fields
8415       // check for sub-struct validity
8416     }
8417
8418     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8419       try {
8420         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8421       } catch (org.apache.thrift.TException te) {
8422         throw new java.io.IOException(te);
8423       }
8424     }
8425
8426     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8427       try {
8428         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8429         __isset_bitfield = 0;
8430         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8431       } catch (org.apache.thrift.TException te) {
8432         throw new java.io.IOException(te);
8433       }
8434     }
8435
8436     private static class getRoutes_argsStandardSchemeFactory implements SchemeFactory {
8437       public getRoutes_argsStandardScheme getScheme() {
8438         return new getRoutes_argsStandardScheme();
8439       }
8440     }
8441
8442     private static class getRoutes_argsStandardScheme extends StandardScheme<getRoutes_args> {
8443
8444       public void read(org.apache.thrift.protocol.TProtocol iprot, getRoutes_args struct) throws org.apache.thrift.TException {
8445         org.apache.thrift.protocol.TField schemeField;
8446         iprot.readStructBegin();
8447         while (true)
8448         {
8449           schemeField = iprot.readFieldBegin();
8450           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
8451             break;
8452           }
8453           switch (schemeField.id) {
8454             case 1: // OPTYPE
8455               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
8456                 struct.optype = iprot.readI32();
8457                 struct.setOptypeIsSet(true);
8458               } else { 
8459                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8460               }
8461               break;
8462             case 2: // WIN_SIZE
8463               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
8464                 struct.winSize = iprot.readI32();
8465                 struct.setWinSizeIsSet(true);
8466               } else { 
8467                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8468               }
8469               break;
8470             default:
8471               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8472           }
8473           iprot.readFieldEnd();
8474         }
8475         iprot.readStructEnd();
8476
8477         // check for required fields of primitive type, which can't be checked in the validate method
8478         struct.validate();
8479       }
8480
8481       public void write(org.apache.thrift.protocol.TProtocol oprot, getRoutes_args struct) throws org.apache.thrift.TException {
8482         struct.validate();
8483
8484         oprot.writeStructBegin(STRUCT_DESC);
8485         oprot.writeFieldBegin(OPTYPE_FIELD_DESC);
8486         oprot.writeI32(struct.optype);
8487         oprot.writeFieldEnd();
8488         oprot.writeFieldBegin(WIN_SIZE_FIELD_DESC);
8489         oprot.writeI32(struct.winSize);
8490         oprot.writeFieldEnd();
8491         oprot.writeFieldStop();
8492         oprot.writeStructEnd();
8493       }
8494
8495     }
8496
8497     private static class getRoutes_argsTupleSchemeFactory implements SchemeFactory {
8498       public getRoutes_argsTupleScheme getScheme() {
8499         return new getRoutes_argsTupleScheme();
8500       }
8501     }
8502
8503     private static class getRoutes_argsTupleScheme extends TupleScheme<getRoutes_args> {
8504
8505       @Override
8506       public void write(org.apache.thrift.protocol.TProtocol prot, getRoutes_args struct) throws org.apache.thrift.TException {
8507         TTupleProtocol oprot = (TTupleProtocol) prot;
8508         BitSet optionals = new BitSet();
8509         if (struct.isSetOptype()) {
8510           optionals.set(0);
8511         }
8512         if (struct.isSetWinSize()) {
8513           optionals.set(1);
8514         }
8515         oprot.writeBitSet(optionals, 2);
8516         if (struct.isSetOptype()) {
8517           oprot.writeI32(struct.optype);
8518         }
8519         if (struct.isSetWinSize()) {
8520           oprot.writeI32(struct.winSize);
8521         }
8522       }
8523
8524       @Override
8525       public void read(org.apache.thrift.protocol.TProtocol prot, getRoutes_args struct) throws org.apache.thrift.TException {
8526         TTupleProtocol iprot = (TTupleProtocol) prot;
8527         BitSet incoming = iprot.readBitSet(2);
8528         if (incoming.get(0)) {
8529           struct.optype = iprot.readI32();
8530           struct.setOptypeIsSet(true);
8531         }
8532         if (incoming.get(1)) {
8533           struct.winSize = iprot.readI32();
8534           struct.setWinSizeIsSet(true);
8535         }
8536       }
8537     }
8538
8539   }
8540
8541   public static class getRoutes_result implements org.apache.thrift.TBase<getRoutes_result, getRoutes_result._Fields>, java.io.Serializable, Cloneable, Comparable<getRoutes_result>   {
8542     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoutes_result");
8543
8544     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
8545
8546     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
8547     static {
8548       schemes.put(StandardScheme.class, new getRoutes_resultStandardSchemeFactory());
8549       schemes.put(TupleScheme.class, new getRoutes_resultTupleSchemeFactory());
8550     }
8551
8552     public Routes success; // required
8553
8554     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8555     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8556       SUCCESS((short)0, "success");
8557
8558       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8559
8560       static {
8561         for (_Fields field : EnumSet.allOf(_Fields.class)) {
8562           byName.put(field.getFieldName(), field);
8563         }
8564       }
8565
8566       /**
8567        * Find the _Fields constant that matches fieldId, or null if its not found.
8568        */
8569       public static _Fields findByThriftId(int fieldId) {
8570         switch(fieldId) {
8571           case 0: // SUCCESS
8572             return SUCCESS;
8573           default:
8574             return null;
8575         }
8576       }
8577
8578       /**
8579        * Find the _Fields constant that matches fieldId, throwing an exception
8580        * if it is not found.
8581        */
8582       public static _Fields findByThriftIdOrThrow(int fieldId) {
8583         _Fields fields = findByThriftId(fieldId);
8584         if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8585         return fields;
8586       }
8587
8588       /**
8589        * Find the _Fields constant that matches name, or null if its not found.
8590        */
8591       public static _Fields findByName(String name) {
8592         return byName.get(name);
8593       }
8594
8595       private final short _thriftId;
8596       private final String _fieldName;
8597
8598       _Fields(short thriftId, String fieldName) {
8599         _thriftId = thriftId;
8600         _fieldName = fieldName;
8601       }
8602
8603       public short getThriftFieldId() {
8604         return _thriftId;
8605       }
8606
8607       public String getFieldName() {
8608         return _fieldName;
8609       }
8610     }
8611
8612     // isset id assignments
8613     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8614     static {
8615       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8616       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8617           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Routes.class)));
8618       metaDataMap = Collections.unmodifiableMap(tmpMap);
8619       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoutes_result.class, metaDataMap);
8620     }
8621
8622     public getRoutes_result() {
8623     }
8624
8625     public getRoutes_result(
8626       Routes success)
8627     {
8628       this();
8629       this.success = success;
8630     }
8631
8632     /**
8633      * Performs a deep copy on <i>other</i>.
8634      */
8635     public getRoutes_result(getRoutes_result other) {
8636       if (other.isSetSuccess()) {
8637         this.success = new Routes(other.success);
8638       }
8639     }
8640
8641     public getRoutes_result deepCopy() {
8642       return new getRoutes_result(this);
8643     }
8644
8645     @Override
8646     public void clear() {
8647       this.success = null;
8648     }
8649
8650     public Routes getSuccess() {
8651       return this.success;
8652     }
8653
8654     public getRoutes_result setSuccess(Routes success) {
8655       this.success = success;
8656       return this;
8657     }
8658
8659     public void unsetSuccess() {
8660       this.success = null;
8661     }
8662
8663     /** Returns true if field success is set (has been assigned a value) and false otherwise */
8664     public boolean isSetSuccess() {
8665       return this.success != null;
8666     }
8667
8668     public void setSuccessIsSet(boolean value) {
8669       if (!value) {
8670         this.success = null;
8671       }
8672     }
8673
8674     public void setFieldValue(_Fields field, Object value) {
8675       switch (field) {
8676       case SUCCESS:
8677         if (value == null) {
8678           unsetSuccess();
8679         } else {
8680           setSuccess((Routes)value);
8681         }
8682         break;
8683
8684       }
8685     }
8686
8687     public Object getFieldValue(_Fields field) {
8688       switch (field) {
8689       case SUCCESS:
8690         return getSuccess();
8691
8692       }
8693       throw new IllegalStateException();
8694     }
8695
8696     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8697     public boolean isSet(_Fields field) {
8698       if (field == null) {
8699         throw new IllegalArgumentException();
8700       }
8701
8702       switch (field) {
8703       case SUCCESS:
8704         return isSetSuccess();
8705       }
8706       throw new IllegalStateException();
8707     }
8708
8709     @Override
8710     public boolean equals(Object that) {
8711       if (that == null)
8712         return false;
8713       if (that instanceof getRoutes_result)
8714         return this.equals((getRoutes_result)that);
8715       return false;
8716     }
8717
8718     public boolean equals(getRoutes_result that) {
8719       if (that == null)
8720         return false;
8721
8722       boolean this_present_success = true && this.isSetSuccess();
8723       boolean that_present_success = true && that.isSetSuccess();
8724       if (this_present_success || that_present_success) {
8725         if (!(this_present_success && that_present_success))
8726           return false;
8727         if (!this.success.equals(that.success))
8728           return false;
8729       }
8730
8731       return true;
8732     }
8733
8734     @Override
8735     public int hashCode() {
8736       return 0;
8737     }
8738
8739     @Override
8740     public int compareTo(getRoutes_result other) {
8741       if (!getClass().equals(other.getClass())) {
8742         return getClass().getName().compareTo(other.getClass().getName());
8743       }
8744
8745       int lastComparison = 0;
8746
8747       lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
8748       if (lastComparison != 0) {
8749         return lastComparison;
8750       }
8751       if (isSetSuccess()) {
8752         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
8753         if (lastComparison != 0) {
8754           return lastComparison;
8755         }
8756       }
8757       return 0;
8758     }
8759
8760     public _Fields fieldForId(int fieldId) {
8761       return _Fields.findByThriftId(fieldId);
8762     }
8763
8764     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8765       schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
8766     }
8767
8768     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8769       schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
8770       }
8771
8772     @Override
8773     public String toString() {
8774       StringBuilder sb = new StringBuilder("getRoutes_result(");
8775       boolean first = true;
8776
8777       sb.append("success:");
8778       if (this.success == null) {
8779         sb.append("null");
8780       } else {
8781         sb.append(this.success);
8782       }
8783       first = false;
8784       sb.append(")");
8785       return sb.toString();
8786     }
8787
8788     public void validate() throws org.apache.thrift.TException {
8789       // check for required fields
8790       // check for sub-struct validity
8791       if (success != null) {
8792         success.validate();
8793       }
8794     }
8795
8796     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8797       try {
8798         write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8799       } catch (org.apache.thrift.TException te) {
8800         throw new java.io.IOException(te);
8801       }
8802     }
8803
8804     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8805       try {
8806         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8807       } catch (org.apache.thrift.TException te) {
8808         throw new java.io.IOException(te);
8809       }
8810     }
8811
8812     private static class getRoutes_resultStandardSchemeFactory implements SchemeFactory {
8813       public getRoutes_resultStandardScheme getScheme() {
8814         return new getRoutes_resultStandardScheme();
8815       }
8816     }
8817
8818     private static class getRoutes_resultStandardScheme extends StandardScheme<getRoutes_result> {
8819
8820       public void read(org.apache.thrift.protocol.TProtocol iprot, getRoutes_result struct) throws org.apache.thrift.TException {
8821         org.apache.thrift.protocol.TField schemeField;
8822         iprot.readStructBegin();
8823         while (true)
8824         {
8825           schemeField = iprot.readFieldBegin();
8826           if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
8827             break;
8828           }
8829           switch (schemeField.id) {
8830             case 0: // SUCCESS
8831               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
8832                 struct.success = new Routes();
8833                 struct.success.read(iprot);
8834                 struct.setSuccessIsSet(true);
8835               } else { 
8836                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8837               }
8838               break;
8839             default:
8840               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8841           }
8842           iprot.readFieldEnd();
8843         }
8844         iprot.readStructEnd();
8845
8846         // check for required fields of primitive type, which can't be checked in the validate method
8847         struct.validate();
8848       }
8849
8850       public void write(org.apache.thrift.protocol.TProtocol oprot, getRoutes_result struct) throws org.apache.thrift.TException {
8851         struct.validate();
8852
8853         oprot.writeStructBegin(STRUCT_DESC);
8854         if (struct.success != null) {
8855           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8856           struct.success.write(oprot);
8857           oprot.writeFieldEnd();
8858         }
8859         oprot.writeFieldStop();
8860         oprot.writeStructEnd();
8861       }
8862
8863     }
8864
8865     private static class getRoutes_resultTupleSchemeFactory implements SchemeFactory {
8866       public getRoutes_resultTupleScheme getScheme() {
8867         return new getRoutes_resultTupleScheme();
8868       }
8869     }
8870
8871     private static class getRoutes_resultTupleScheme extends TupleScheme<getRoutes_result> {
8872
8873       @Override
8874       public void write(org.apache.thrift.protocol.TProtocol prot, getRoutes_result struct) throws org.apache.thrift.TException {
8875         TTupleProtocol oprot = (TTupleProtocol) prot;
8876         BitSet optionals = new BitSet();
8877         if (struct.isSetSuccess()) {
8878           optionals.set(0);
8879         }
8880         oprot.writeBitSet(optionals, 1);
8881         if (struct.isSetSuccess()) {
8882           struct.success.write(oprot);
8883         }
8884       }
8885
8886       @Override
8887       public void read(org.apache.thrift.protocol.TProtocol prot, getRoutes_result struct) throws org.apache.thrift.TException {
8888         TTupleProtocol iprot = (TTupleProtocol) prot;
8889         BitSet incoming = iprot.readBitSet(1);
8890         if (incoming.get(0)) {
8891           struct.success = new Routes();
8892           struct.success.read(iprot);
8893           struct.setSuccessIsSet(true);
8894         }
8895       }
8896     }
8897
8898   }
8899
8900 }