2 * Autogenerated by Thrift Compiler (0.9.1)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
7 package org.opendaylight.bgpmanager.thrift.gen;
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import org.apache.thrift.protocol.TProtocolException;
16 import org.apache.thrift.EncodingUtils;
17 import org.apache.thrift.TException;
18 import org.apache.thrift.async.AsyncMethodCallback;
19 import org.apache.thrift.server.AbstractNonblockingServer.*;
20 import java.util.List;
21 import java.util.ArrayList;
23 import java.util.HashMap;
24 import java.util.EnumMap;
26 import java.util.HashSet;
27 import java.util.EnumSet;
28 import java.util.Collections;
29 import java.util.BitSet;
30 import java.nio.ByteBuffer;
31 import java.util.Arrays;
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
35 public class BgpConfigurator {
37 public interface Iface {
39 public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException;
41 public int stopBgpServer() throws org.apache.thrift.TException;
43 public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException;
45 public int deletePeer(String ipAddress) throws org.apache.thrift.TException;
47 public int addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException;
49 public int delVrf(String rd) throws org.apache.thrift.TException;
51 public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException;
53 public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException;
55 public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException;
59 public interface AsyncIface {
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;
63 public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
65 public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
67 public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
69 public void addVrf(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
71 public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
73 public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
75 public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
77 public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
81 public static class Client extends org.apache.thrift.TServiceClient implements Iface {
82 public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
84 public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
85 return new Client(prot);
87 public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
88 return new Client(iprot, oprot);
92 public Client(org.apache.thrift.protocol.TProtocol prot)
97 public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
101 public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
103 send_startBgpServer(asNumber, routerId, port, holdTime, keepAliveTime);
104 return recv_startBgpServer();
107 public void send_startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
109 startBgpServer_args args = new startBgpServer_args();
110 args.setAsNumber(asNumber);
111 args.setRouterId(routerId);
113 args.setHoldTime(holdTime);
114 args.setKeepAliveTime(keepAliveTime);
115 sendBase("startBgpServer", args);
118 public int recv_startBgpServer() throws org.apache.thrift.TException
120 startBgpServer_result result = new startBgpServer_result();
121 receiveBase(result, "startBgpServer");
122 if (result.isSetSuccess()) {
123 return result.success;
125 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startBgpServer failed: unknown result");
128 public int stopBgpServer() throws org.apache.thrift.TException
130 send_stopBgpServer();
131 return recv_stopBgpServer();
134 public void send_stopBgpServer() throws org.apache.thrift.TException
136 stopBgpServer_args args = new stopBgpServer_args();
137 sendBase("stopBgpServer", args);
140 public int recv_stopBgpServer() throws org.apache.thrift.TException
142 stopBgpServer_result result = new stopBgpServer_result();
143 receiveBase(result, "stopBgpServer");
144 if (result.isSetSuccess()) {
145 return result.success;
147 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stopBgpServer failed: unknown result");
150 public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
152 send_createPeer(ipAddress, asNumber);
153 return recv_createPeer();
156 public void send_createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
158 createPeer_args args = new createPeer_args();
159 args.setIpAddress(ipAddress);
160 args.setAsNumber(asNumber);
161 sendBase("createPeer", args);
164 public int recv_createPeer() throws org.apache.thrift.TException
166 createPeer_result result = new createPeer_result();
167 receiveBase(result, "createPeer");
168 if (result.isSetSuccess()) {
169 return result.success;
171 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPeer failed: unknown result");
174 public int deletePeer(String ipAddress) throws org.apache.thrift.TException
176 send_deletePeer(ipAddress);
177 return recv_deletePeer();
180 public void send_deletePeer(String ipAddress) throws org.apache.thrift.TException
182 deletePeer_args args = new deletePeer_args();
183 args.setIpAddress(ipAddress);
184 sendBase("deletePeer", args);
187 public int recv_deletePeer() throws org.apache.thrift.TException
189 deletePeer_result result = new deletePeer_result();
190 receiveBase(result, "deletePeer");
191 if (result.isSetSuccess()) {
192 return result.success;
194 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deletePeer failed: unknown result");
197 public int addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException
199 send_addVrf(rd, irts, erts);
200 return recv_addVrf();
203 public void send_addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException
205 addVrf_args args = new addVrf_args();
209 sendBase("addVrf", args);
212 public int recv_addVrf() throws org.apache.thrift.TException
214 addVrf_result result = new addVrf_result();
215 receiveBase(result, "addVrf");
216 if (result.isSetSuccess()) {
217 return result.success;
219 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addVrf failed: unknown result");
222 public int delVrf(String rd) throws org.apache.thrift.TException
225 return recv_delVrf();
228 public void send_delVrf(String rd) throws org.apache.thrift.TException
230 delVrf_args args = new delVrf_args();
232 sendBase("delVrf", args);
235 public int recv_delVrf() throws org.apache.thrift.TException
237 delVrf_result result = new delVrf_result();
238 receiveBase(result, "delVrf");
239 if (result.isSetSuccess()) {
240 return result.success;
242 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delVrf failed: unknown result");
245 public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException
247 send_pushRoute(prefix, nexthop, rd, label);
248 return recv_pushRoute();
251 public void send_pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException
253 pushRoute_args args = new pushRoute_args();
254 args.setPrefix(prefix);
255 args.setNexthop(nexthop);
257 args.setLabel(label);
258 sendBase("pushRoute", args);
261 public int recv_pushRoute() throws org.apache.thrift.TException
263 pushRoute_result result = new pushRoute_result();
264 receiveBase(result, "pushRoute");
265 if (result.isSetSuccess()) {
266 return result.success;
268 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushRoute failed: unknown result");
271 public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException
273 send_withdrawRoute(prefix, rd);
274 return recv_withdrawRoute();
277 public void send_withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException
279 withdrawRoute_args args = new withdrawRoute_args();
280 args.setPrefix(prefix);
282 sendBase("withdrawRoute", args);
285 public int recv_withdrawRoute() throws org.apache.thrift.TException
287 withdrawRoute_result result = new withdrawRoute_result();
288 receiveBase(result, "withdrawRoute");
289 if (result.isSetSuccess()) {
290 return result.success;
292 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "withdrawRoute failed: unknown result");
295 public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException
297 send_getRoutes(optype, winSize);
298 return recv_getRoutes();
301 public void send_getRoutes(int optype, int winSize) throws org.apache.thrift.TException
303 getRoutes_args args = new getRoutes_args();
304 args.setOptype(optype);
305 args.setWinSize(winSize);
306 sendBase("getRoutes", args);
309 public Routes recv_getRoutes() throws org.apache.thrift.TException
311 getRoutes_result result = new getRoutes_result();
312 receiveBase(result, "getRoutes");
313 if (result.isSetSuccess()) {
314 return result.success;
316 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRoutes failed: unknown result");
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;
328 public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
329 return new AsyncClient(protocolFactory, clientManager, transport);
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);
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 {
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);
344 public static class startBgpServer_call extends org.apache.thrift.async.TAsyncMethodCall {
345 private int asNumber;
346 private String routerId;
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;
355 this.holdTime = holdTime;
356 this.keepAliveTime = keepAliveTime;
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);
365 args.setHoldTime(holdTime);
366 args.setKeepAliveTime(keepAliveTime);
368 prot.writeMessageEnd();
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!");
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();
381 public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
383 stopBgpServer_call method_call = new stopBgpServer_call(resultHandler, this, ___protocolFactory, ___transport);
384 this.___currentMethod = method_call;
385 ___manager.call(method_call);
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);
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();
397 prot.writeMessageEnd();
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!");
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();
410 public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
412 createPeer_call method_call = new createPeer_call(ipAddress, asNumber, resultHandler, this, ___protocolFactory, ___transport);
413 this.___currentMethod = method_call;
414 ___manager.call(method_call);
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;
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);
432 prot.writeMessageEnd();
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!");
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();
445 public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
447 deletePeer_call method_call = new deletePeer_call(ipAddress, resultHandler, this, ___protocolFactory, ___transport);
448 this.___currentMethod = method_call;
449 ___manager.call(method_call);
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;
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);
464 prot.writeMessageEnd();
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!");
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();
477 public void addVrf(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
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);
484 public static class addVrf_call extends org.apache.thrift.async.TAsyncMethodCall {
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);
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();
502 prot.writeMessageEnd();
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!");
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();
515 public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
517 delVrf_call method_call = new delVrf_call(rd, resultHandler, this, ___protocolFactory, ___transport);
518 this.___currentMethod = method_call;
519 ___manager.call(method_call);
522 public static class delVrf_call extends org.apache.thrift.async.TAsyncMethodCall {
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);
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();
534 prot.writeMessageEnd();
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!");
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();
547 public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
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);
554 public static class pushRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
555 private String prefix;
556 private String nexthop;
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;
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);
573 args.setLabel(label);
575 prot.writeMessageEnd();
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!");
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();
588 public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
590 withdrawRoute_call method_call = new withdrawRoute_call(prefix, rd, resultHandler, this, ___protocolFactory, ___transport);
591 this.___currentMethod = method_call;
592 ___manager.call(method_call);
595 public static class withdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
596 private String prefix;
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;
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);
610 prot.writeMessageEnd();
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!");
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();
623 public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
625 getRoutes_call method_call = new getRoutes_call(optype, winSize, resultHandler, this, ___protocolFactory, ___transport);
626 this.___currentMethod = method_call;
627 ___manager.call(method_call);
630 public static class getRoutes_call extends org.apache.thrift.async.TAsyncMethodCall {
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;
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);
645 prot.writeMessageEnd();
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!");
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();
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>>()));
666 protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
667 super(iface, getProcessMap(processMap));
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());
683 public static class startBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startBgpServer_args> {
684 public startBgpServer() {
685 super("startBgpServer");
688 public startBgpServer_args getEmptyArgsInstance() {
689 return new startBgpServer_args();
692 protected boolean isOneway() {
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);
704 public static class stopBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stopBgpServer_args> {
705 public stopBgpServer() {
706 super("stopBgpServer");
709 public stopBgpServer_args getEmptyArgsInstance() {
710 return new stopBgpServer_args();
713 protected boolean isOneway() {
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);
725 public static class createPeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPeer_args> {
726 public createPeer() {
730 public createPeer_args getEmptyArgsInstance() {
731 return new createPeer_args();
734 protected boolean isOneway() {
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);
746 public static class deletePeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePeer_args> {
747 public deletePeer() {
751 public deletePeer_args getEmptyArgsInstance() {
752 return new deletePeer_args();
755 protected boolean isOneway() {
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);
767 public static class addVrf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVrf_args> {
772 public addVrf_args getEmptyArgsInstance() {
773 return new addVrf_args();
776 protected boolean isOneway() {
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);
788 public static class delVrf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delVrf_args> {
793 public delVrf_args getEmptyArgsInstance() {
794 return new delVrf_args();
797 protected boolean isOneway() {
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);
809 public static class pushRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushRoute_args> {
814 public pushRoute_args getEmptyArgsInstance() {
815 return new pushRoute_args();
818 protected boolean isOneway() {
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);
830 public static class withdrawRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, withdrawRoute_args> {
831 public withdrawRoute() {
832 super("withdrawRoute");
835 public withdrawRoute_args getEmptyArgsInstance() {
836 return new withdrawRoute_args();
839 protected boolean isOneway() {
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);
851 public static class getRoutes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRoutes_args> {
856 public getRoutes_args getEmptyArgsInstance() {
857 return new getRoutes_args();
860 protected boolean isOneway() {
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);
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, ?>>()));
879 protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
880 super(iface, getProcessMap(processMap));
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());
896 public static class startBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startBgpServer_args, Integer> {
897 public startBgpServer() {
898 super("startBgpServer");
901 public startBgpServer_args getEmptyArgsInstance() {
902 return new startBgpServer_args();
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();
911 result.setSuccessIsSet(true);
913 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
915 } catch (Exception e) {
916 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
929 fcall.sendResponse(fb,msg,msgType,seqid);
931 } catch (Exception ex) {
932 LOGGER.error("Exception writing to internal frame buffer", ex);
939 protected boolean isOneway() {
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);
948 public static class stopBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stopBgpServer_args, Integer> {
949 public stopBgpServer() {
950 super("stopBgpServer");
953 public stopBgpServer_args getEmptyArgsInstance() {
954 return new stopBgpServer_args();
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();
963 result.setSuccessIsSet(true);
965 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
967 } catch (Exception e) {
968 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
981 fcall.sendResponse(fb,msg,msgType,seqid);
983 } catch (Exception ex) {
984 LOGGER.error("Exception writing to internal frame buffer", ex);
991 protected boolean isOneway() {
995 public void start(I iface, stopBgpServer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
996 iface.stopBgpServer(resultHandler);
1000 public static class createPeer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createPeer_args, Integer> {
1001 public createPeer() {
1002 super("createPeer");
1005 public createPeer_args getEmptyArgsInstance() {
1006 return new createPeer_args();
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();
1015 result.setSuccessIsSet(true);
1017 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1019 } catch (Exception e) {
1020 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1033 fcall.sendResponse(fb,msg,msgType,seqid);
1035 } catch (Exception ex) {
1036 LOGGER.error("Exception writing to internal frame buffer", ex);
1043 protected boolean isOneway() {
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);
1052 public static class deletePeer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePeer_args, Integer> {
1053 public deletePeer() {
1054 super("deletePeer");
1057 public deletePeer_args getEmptyArgsInstance() {
1058 return new deletePeer_args();
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();
1067 result.setSuccessIsSet(true);
1069 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1071 } catch (Exception e) {
1072 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1085 fcall.sendResponse(fb,msg,msgType,seqid);
1087 } catch (Exception ex) {
1088 LOGGER.error("Exception writing to internal frame buffer", ex);
1095 protected boolean isOneway() {
1099 public void start(I iface, deletePeer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1100 iface.deletePeer(args.ipAddress,resultHandler);
1104 public static class addVrf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addVrf_args, Integer> {
1109 public addVrf_args getEmptyArgsInstance() {
1110 return new addVrf_args();
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();
1119 result.setSuccessIsSet(true);
1121 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1123 } catch (Exception e) {
1124 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1137 fcall.sendResponse(fb,msg,msgType,seqid);
1139 } catch (Exception ex) {
1140 LOGGER.error("Exception writing to internal frame buffer", ex);
1147 protected boolean isOneway() {
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);
1156 public static class delVrf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delVrf_args, Integer> {
1161 public delVrf_args getEmptyArgsInstance() {
1162 return new delVrf_args();
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();
1171 result.setSuccessIsSet(true);
1173 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1175 } catch (Exception e) {
1176 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1189 fcall.sendResponse(fb,msg,msgType,seqid);
1191 } catch (Exception ex) {
1192 LOGGER.error("Exception writing to internal frame buffer", ex);
1199 protected boolean isOneway() {
1203 public void start(I iface, delVrf_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
1204 iface.delVrf(args.rd,resultHandler);
1208 public static class pushRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, pushRoute_args, Integer> {
1209 public pushRoute() {
1213 public pushRoute_args getEmptyArgsInstance() {
1214 return new pushRoute_args();
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();
1223 result.setSuccessIsSet(true);
1225 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1227 } catch (Exception e) {
1228 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1241 fcall.sendResponse(fb,msg,msgType,seqid);
1243 } catch (Exception ex) {
1244 LOGGER.error("Exception writing to internal frame buffer", ex);
1251 protected boolean isOneway() {
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);
1260 public static class withdrawRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, withdrawRoute_args, Integer> {
1261 public withdrawRoute() {
1262 super("withdrawRoute");
1265 public withdrawRoute_args getEmptyArgsInstance() {
1266 return new withdrawRoute_args();
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();
1275 result.setSuccessIsSet(true);
1277 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1279 } catch (Exception e) {
1280 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1293 fcall.sendResponse(fb,msg,msgType,seqid);
1295 } catch (Exception ex) {
1296 LOGGER.error("Exception writing to internal frame buffer", ex);
1303 protected boolean isOneway() {
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);
1312 public static class getRoutes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRoutes_args, Routes> {
1313 public getRoutes() {
1317 public getRoutes_args getEmptyArgsInstance() {
1318 return new getRoutes_args();
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();
1328 fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
1330 } catch (Exception e) {
1331 LOGGER.error("Exception writing to internal frame buffer", e);
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();
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());
1344 fcall.sendResponse(fb,msg,msgType,seqid);
1346 } catch (Exception ex) {
1347 LOGGER.error("Exception writing to internal frame buffer", ex);
1354 protected boolean isOneway() {
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);
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");
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);
1374 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
1376 schemes.put(StandardScheme.class, new startBgpServer_argsStandardSchemeFactory());
1377 schemes.put(TupleScheme.class, new startBgpServer_argsTupleSchemeFactory());
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
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");
1394 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1397 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1398 byName.put(field.getFieldName(), field);
1403 * Find the _Fields constant that matches fieldId, or null if its not found.
1405 public static _Fields findByThriftId(int fieldId) {
1407 case 1: // AS_NUMBER
1409 case 2: // ROUTER_ID
1413 case 4: // HOLD_TIME
1415 case 5: // KEEP_ALIVE_TIME
1416 return KEEP_ALIVE_TIME;
1423 * Find the _Fields constant that matches fieldId, throwing an exception
1424 * if it is not found.
1426 public static _Fields findByThriftIdOrThrow(int fieldId) {
1427 _Fields fields = findByThriftId(fieldId);
1428 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1433 * Find the _Fields constant that matches name, or null if its not found.
1435 public static _Fields findByName(String name) {
1436 return byName.get(name);
1439 private final short _thriftId;
1440 private final String _fieldName;
1442 _Fields(short thriftId, String fieldName) {
1443 _thriftId = thriftId;
1444 _fieldName = fieldName;
1447 public short getThriftFieldId() {
1451 public String getFieldName() {
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;
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);
1479 public startBgpServer_args() {
1482 public startBgpServer_args(
1490 this.asNumber = asNumber;
1491 setAsNumberIsSet(true);
1492 this.routerId = routerId;
1495 this.holdTime = holdTime;
1496 setHoldTimeIsSet(true);
1497 this.keepAliveTime = keepAliveTime;
1498 setKeepAliveTimeIsSet(true);
1502 * Performs a deep copy on <i>other</i>.
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;
1510 this.port = other.port;
1511 this.holdTime = other.holdTime;
1512 this.keepAliveTime = other.keepAliveTime;
1515 public startBgpServer_args deepCopy() {
1516 return new startBgpServer_args(this);
1520 public void clear() {
1521 setAsNumberIsSet(false);
1523 this.routerId = null;
1524 setPortIsSet(false);
1526 setHoldTimeIsSet(false);
1528 setKeepAliveTimeIsSet(false);
1529 this.keepAliveTime = 0;
1532 public int getAsNumber() {
1533 return this.asNumber;
1536 public startBgpServer_args setAsNumber(int asNumber) {
1537 this.asNumber = asNumber;
1538 setAsNumberIsSet(true);
1542 public void unsetAsNumber() {
1543 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
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);
1551 public void setAsNumberIsSet(boolean value) {
1552 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
1555 public String getRouterId() {
1556 return this.routerId;
1559 public startBgpServer_args setRouterId(String routerId) {
1560 this.routerId = routerId;
1564 public void unsetRouterId() {
1565 this.routerId = null;
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;
1573 public void setRouterIdIsSet(boolean value) {
1575 this.routerId = null;
1579 public int getPort() {
1583 public startBgpServer_args setPort(int port) {
1589 public void unsetPort() {
1590 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
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);
1598 public void setPortIsSet(boolean value) {
1599 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
1602 public int getHoldTime() {
1603 return this.holdTime;
1606 public startBgpServer_args setHoldTime(int holdTime) {
1607 this.holdTime = holdTime;
1608 setHoldTimeIsSet(true);
1612 public void unsetHoldTime() {
1613 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
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);
1621 public void setHoldTimeIsSet(boolean value) {
1622 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
1625 public int getKeepAliveTime() {
1626 return this.keepAliveTime;
1629 public startBgpServer_args setKeepAliveTime(int keepAliveTime) {
1630 this.keepAliveTime = keepAliveTime;
1631 setKeepAliveTimeIsSet(true);
1635 public void unsetKeepAliveTime() {
1636 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
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);
1644 public void setKeepAliveTimeIsSet(boolean value) {
1645 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID, value);
1648 public void setFieldValue(_Fields field, Object value) {
1651 if (value == null) {
1654 setAsNumber((Integer)value);
1659 if (value == null) {
1662 setRouterId((String)value);
1667 if (value == null) {
1670 setPort((Integer)value);
1675 if (value == null) {
1678 setHoldTime((Integer)value);
1682 case KEEP_ALIVE_TIME:
1683 if (value == null) {
1684 unsetKeepAliveTime();
1686 setKeepAliveTime((Integer)value);
1693 public Object getFieldValue(_Fields field) {
1696 return Integer.valueOf(getAsNumber());
1699 return getRouterId();
1702 return Integer.valueOf(getPort());
1705 return Integer.valueOf(getHoldTime());
1707 case KEEP_ALIVE_TIME:
1708 return Integer.valueOf(getKeepAliveTime());
1711 throw new IllegalStateException();
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();
1722 return isSetAsNumber();
1724 return isSetRouterId();
1728 return isSetHoldTime();
1729 case KEEP_ALIVE_TIME:
1730 return isSetKeepAliveTime();
1732 throw new IllegalStateException();
1736 public boolean equals(Object that) {
1739 if (that instanceof startBgpServer_args)
1740 return this.equals((startBgpServer_args)that);
1744 public boolean equals(startBgpServer_args that) {
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))
1753 if (this.asNumber != that.asNumber)
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))
1762 if (!this.routerId.equals(that.routerId))
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))
1771 if (this.port != that.port)
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))
1780 if (this.holdTime != that.holdTime)
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))
1789 if (this.keepAliveTime != that.keepAliveTime)
1797 public int hashCode() {
1802 public int compareTo(startBgpServer_args other) {
1803 if (!getClass().equals(other.getClass())) {
1804 return getClass().getName().compareTo(other.getClass().getName());
1807 int lastComparison = 0;
1809 lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
1810 if (lastComparison != 0) {
1811 return lastComparison;
1813 if (isSetAsNumber()) {
1814 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
1815 if (lastComparison != 0) {
1816 return lastComparison;
1819 lastComparison = Boolean.valueOf(isSetRouterId()).compareTo(other.isSetRouterId());
1820 if (lastComparison != 0) {
1821 return lastComparison;
1823 if (isSetRouterId()) {
1824 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routerId, other.routerId);
1825 if (lastComparison != 0) {
1826 return lastComparison;
1829 lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
1830 if (lastComparison != 0) {
1831 return lastComparison;
1834 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
1835 if (lastComparison != 0) {
1836 return lastComparison;
1839 lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
1840 if (lastComparison != 0) {
1841 return lastComparison;
1843 if (isSetHoldTime()) {
1844 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdTime, other.holdTime);
1845 if (lastComparison != 0) {
1846 return lastComparison;
1849 lastComparison = Boolean.valueOf(isSetKeepAliveTime()).compareTo(other.isSetKeepAliveTime());
1850 if (lastComparison != 0) {
1851 return lastComparison;
1853 if (isSetKeepAliveTime()) {
1854 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepAliveTime, other.keepAliveTime);
1855 if (lastComparison != 0) {
1856 return lastComparison;
1862 public _Fields fieldForId(int fieldId) {
1863 return _Fields.findByThriftId(fieldId);
1866 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1867 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
1870 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1871 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
1875 public String toString() {
1876 StringBuilder sb = new StringBuilder("startBgpServer_args(");
1877 boolean first = true;
1879 sb.append("asNumber:");
1880 sb.append(this.asNumber);
1882 if (!first) sb.append(", ");
1883 sb.append("routerId:");
1884 if (this.routerId == null) {
1887 sb.append(this.routerId);
1890 if (!first) sb.append(", ");
1892 sb.append(this.port);
1894 if (!first) sb.append(", ");
1895 sb.append("holdTime:");
1896 sb.append(this.holdTime);
1898 if (!first) sb.append(", ");
1899 sb.append("keepAliveTime:");
1900 sb.append(this.keepAliveTime);
1903 return sb.toString();
1906 public void validate() throws org.apache.thrift.TException {
1907 // check for required fields
1908 // check for sub-struct validity
1911 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
1919 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
1929 private static class startBgpServer_argsStandardSchemeFactory implements SchemeFactory {
1930 public startBgpServer_argsStandardScheme getScheme() {
1931 return new startBgpServer_argsStandardScheme();
1935 private static class startBgpServer_argsStandardScheme extends StandardScheme<startBgpServer_args> {
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();
1942 schemeField = iprot.readFieldBegin();
1943 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
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);
1952 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1955 case 2: // ROUTER_ID
1956 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1957 struct.routerId = iprot.readString();
1958 struct.setRouterIdIsSet(true);
1960 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1964 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1965 struct.port = iprot.readI32();
1966 struct.setPortIsSet(true);
1968 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1971 case 4: // HOLD_TIME
1972 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1973 struct.holdTime = iprot.readI32();
1974 struct.setHoldTimeIsSet(true);
1976 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
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);
1984 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1988 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1990 iprot.readFieldEnd();
1992 iprot.readStructEnd();
1994 // check for required fields of primitive type, which can't be checked in the validate method
1998 public void write(org.apache.thrift.protocol.TProtocol oprot, startBgpServer_args struct) throws org.apache.thrift.TException {
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();
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();
2025 private static class startBgpServer_argsTupleSchemeFactory implements SchemeFactory {
2026 public startBgpServer_argsTupleScheme getScheme() {
2027 return new startBgpServer_argsTupleScheme();
2031 private static class startBgpServer_argsTupleScheme extends TupleScheme<startBgpServer_args> {
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()) {
2040 if (struct.isSetRouterId()) {
2043 if (struct.isSetPort()) {
2046 if (struct.isSetHoldTime()) {
2049 if (struct.isSetKeepAliveTime()) {
2052 oprot.writeBitSet(optionals, 5);
2053 if (struct.isSetAsNumber()) {
2054 oprot.writeI32(struct.asNumber);
2056 if (struct.isSetRouterId()) {
2057 oprot.writeString(struct.routerId);
2059 if (struct.isSetPort()) {
2060 oprot.writeI32(struct.port);
2062 if (struct.isSetHoldTime()) {
2063 oprot.writeI32(struct.holdTime);
2065 if (struct.isSetKeepAliveTime()) {
2066 oprot.writeI32(struct.keepAliveTime);
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);
2078 if (incoming.get(1)) {
2079 struct.routerId = iprot.readString();
2080 struct.setRouterIdIsSet(true);
2082 if (incoming.get(2)) {
2083 struct.port = iprot.readI32();
2084 struct.setPortIsSet(true);
2086 if (incoming.get(3)) {
2087 struct.holdTime = iprot.readI32();
2088 struct.setHoldTimeIsSet(true);
2090 if (incoming.get(4)) {
2091 struct.keepAliveTime = iprot.readI32();
2092 struct.setKeepAliveTimeIsSet(true);
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");
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);
2104 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
2106 schemes.put(StandardScheme.class, new startBgpServer_resultStandardSchemeFactory());
2107 schemes.put(TupleScheme.class, new startBgpServer_resultTupleSchemeFactory());
2110 public int success; // required
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");
2116 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2119 for (_Fields field : EnumSet.allOf(_Fields.class)) {
2120 byName.put(field.getFieldName(), field);
2125 * Find the _Fields constant that matches fieldId, or null if its not found.
2127 public static _Fields findByThriftId(int fieldId) {
2137 * Find the _Fields constant that matches fieldId, throwing an exception
2138 * if it is not found.
2140 public static _Fields findByThriftIdOrThrow(int fieldId) {
2141 _Fields fields = findByThriftId(fieldId);
2142 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2147 * Find the _Fields constant that matches name, or null if its not found.
2149 public static _Fields findByName(String name) {
2150 return byName.get(name);
2153 private final short _thriftId;
2154 private final String _fieldName;
2156 _Fields(short thriftId, String fieldName) {
2157 _thriftId = thriftId;
2158 _fieldName = fieldName;
2161 public short getThriftFieldId() {
2165 public String getFieldName() {
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;
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);
2182 public startBgpServer_result() {
2185 public startBgpServer_result(
2189 this.success = success;
2190 setSuccessIsSet(true);
2194 * Performs a deep copy on <i>other</i>.
2196 public startBgpServer_result(startBgpServer_result other) {
2197 __isset_bitfield = other.__isset_bitfield;
2198 this.success = other.success;
2201 public startBgpServer_result deepCopy() {
2202 return new startBgpServer_result(this);
2206 public void clear() {
2207 setSuccessIsSet(false);
2211 public int getSuccess() {
2212 return this.success;
2215 public startBgpServer_result setSuccess(int success) {
2216 this.success = success;
2217 setSuccessIsSet(true);
2221 public void unsetSuccess() {
2222 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
2230 public void setSuccessIsSet(boolean value) {
2231 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
2234 public void setFieldValue(_Fields field, Object value) {
2237 if (value == null) {
2240 setSuccess((Integer)value);
2247 public Object getFieldValue(_Fields field) {
2250 return Integer.valueOf(getSuccess());
2253 throw new IllegalStateException();
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();
2264 return isSetSuccess();
2266 throw new IllegalStateException();
2270 public boolean equals(Object that) {
2273 if (that instanceof startBgpServer_result)
2274 return this.equals((startBgpServer_result)that);
2278 public boolean equals(startBgpServer_result that) {
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))
2287 if (this.success != that.success)
2295 public int hashCode() {
2300 public int compareTo(startBgpServer_result other) {
2301 if (!getClass().equals(other.getClass())) {
2302 return getClass().getName().compareTo(other.getClass().getName());
2305 int lastComparison = 0;
2307 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
2308 if (lastComparison != 0) {
2309 return lastComparison;
2311 if (isSetSuccess()) {
2312 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
2313 if (lastComparison != 0) {
2314 return lastComparison;
2320 public _Fields fieldForId(int fieldId) {
2321 return _Fields.findByThriftId(fieldId);
2324 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2325 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
2328 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2329 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
2333 public String toString() {
2334 StringBuilder sb = new StringBuilder("startBgpServer_result(");
2335 boolean first = true;
2337 sb.append("success:");
2338 sb.append(this.success);
2341 return sb.toString();
2344 public void validate() throws org.apache.thrift.TException {
2345 // check for required fields
2346 // check for sub-struct validity
2349 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
2357 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
2367 private static class startBgpServer_resultStandardSchemeFactory implements SchemeFactory {
2368 public startBgpServer_resultStandardScheme getScheme() {
2369 return new startBgpServer_resultStandardScheme();
2373 private static class startBgpServer_resultStandardScheme extends StandardScheme<startBgpServer_result> {
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();
2380 schemeField = iprot.readFieldBegin();
2381 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
2384 switch (schemeField.id) {
2386 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
2387 struct.success = iprot.readI32();
2388 struct.setSuccessIsSet(true);
2390 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2394 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2396 iprot.readFieldEnd();
2398 iprot.readStructEnd();
2400 // check for required fields of primitive type, which can't be checked in the validate method
2404 public void write(org.apache.thrift.protocol.TProtocol oprot, startBgpServer_result struct) throws org.apache.thrift.TException {
2407 oprot.writeStructBegin(STRUCT_DESC);
2408 if (struct.isSetSuccess()) {
2409 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2410 oprot.writeI32(struct.success);
2411 oprot.writeFieldEnd();
2413 oprot.writeFieldStop();
2414 oprot.writeStructEnd();
2419 private static class startBgpServer_resultTupleSchemeFactory implements SchemeFactory {
2420 public startBgpServer_resultTupleScheme getScheme() {
2421 return new startBgpServer_resultTupleScheme();
2425 private static class startBgpServer_resultTupleScheme extends TupleScheme<startBgpServer_result> {
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()) {
2434 oprot.writeBitSet(optionals, 1);
2435 if (struct.isSetSuccess()) {
2436 oprot.writeI32(struct.success);
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);
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");
2457 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
2459 schemes.put(StandardScheme.class, new stopBgpServer_argsStandardSchemeFactory());
2460 schemes.put(TupleScheme.class, new stopBgpServer_argsTupleSchemeFactory());
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 {
2468 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2471 for (_Fields field : EnumSet.allOf(_Fields.class)) {
2472 byName.put(field.getFieldName(), field);
2477 * Find the _Fields constant that matches fieldId, or null if its not found.
2479 public static _Fields findByThriftId(int fieldId) {
2487 * Find the _Fields constant that matches fieldId, throwing an exception
2488 * if it is not found.
2490 public static _Fields findByThriftIdOrThrow(int fieldId) {
2491 _Fields fields = findByThriftId(fieldId);
2492 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2497 * Find the _Fields constant that matches name, or null if its not found.
2499 public static _Fields findByName(String name) {
2500 return byName.get(name);
2503 private final short _thriftId;
2504 private final String _fieldName;
2506 _Fields(short thriftId, String fieldName) {
2507 _thriftId = thriftId;
2508 _fieldName = fieldName;
2511 public short getThriftFieldId() {
2515 public String getFieldName() {
2519 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
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);
2526 public stopBgpServer_args() {
2530 * Performs a deep copy on <i>other</i>.
2532 public stopBgpServer_args(stopBgpServer_args other) {
2535 public stopBgpServer_args deepCopy() {
2536 return new stopBgpServer_args(this);
2540 public void clear() {
2543 public void setFieldValue(_Fields field, Object value) {
2548 public Object getFieldValue(_Fields field) {
2551 throw new IllegalStateException();
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();
2562 throw new IllegalStateException();
2566 public boolean equals(Object that) {
2569 if (that instanceof stopBgpServer_args)
2570 return this.equals((stopBgpServer_args)that);
2574 public boolean equals(stopBgpServer_args that) {
2582 public int hashCode() {
2587 public int compareTo(stopBgpServer_args other) {
2588 if (!getClass().equals(other.getClass())) {
2589 return getClass().getName().compareTo(other.getClass().getName());
2592 int lastComparison = 0;
2597 public _Fields fieldForId(int fieldId) {
2598 return _Fields.findByThriftId(fieldId);
2601 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2602 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
2605 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2606 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
2610 public String toString() {
2611 StringBuilder sb = new StringBuilder("stopBgpServer_args(");
2612 boolean first = true;
2615 return sb.toString();
2618 public void validate() throws org.apache.thrift.TException {
2619 // check for required fields
2620 // check for sub-struct validity
2623 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
2631 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
2639 private static class stopBgpServer_argsStandardSchemeFactory implements SchemeFactory {
2640 public stopBgpServer_argsStandardScheme getScheme() {
2641 return new stopBgpServer_argsStandardScheme();
2645 private static class stopBgpServer_argsStandardScheme extends StandardScheme<stopBgpServer_args> {
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();
2652 schemeField = iprot.readFieldBegin();
2653 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
2656 switch (schemeField.id) {
2658 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2660 iprot.readFieldEnd();
2662 iprot.readStructEnd();
2664 // check for required fields of primitive type, which can't be checked in the validate method
2668 public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2671 oprot.writeStructBegin(STRUCT_DESC);
2672 oprot.writeFieldStop();
2673 oprot.writeStructEnd();
2678 private static class stopBgpServer_argsTupleSchemeFactory implements SchemeFactory {
2679 public stopBgpServer_argsTupleScheme getScheme() {
2680 return new stopBgpServer_argsTupleScheme();
2684 private static class stopBgpServer_argsTupleScheme extends TupleScheme<stopBgpServer_args> {
2687 public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2688 TTupleProtocol oprot = (TTupleProtocol) prot;
2692 public void read(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
2693 TTupleProtocol iprot = (TTupleProtocol) prot;
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");
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);
2704 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
2706 schemes.put(StandardScheme.class, new stopBgpServer_resultStandardSchemeFactory());
2707 schemes.put(TupleScheme.class, new stopBgpServer_resultTupleSchemeFactory());
2710 public int success; // required
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");
2716 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2719 for (_Fields field : EnumSet.allOf(_Fields.class)) {
2720 byName.put(field.getFieldName(), field);
2725 * Find the _Fields constant that matches fieldId, or null if its not found.
2727 public static _Fields findByThriftId(int fieldId) {
2737 * Find the _Fields constant that matches fieldId, throwing an exception
2738 * if it is not found.
2740 public static _Fields findByThriftIdOrThrow(int fieldId) {
2741 _Fields fields = findByThriftId(fieldId);
2742 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2747 * Find the _Fields constant that matches name, or null if its not found.
2749 public static _Fields findByName(String name) {
2750 return byName.get(name);
2753 private final short _thriftId;
2754 private final String _fieldName;
2756 _Fields(short thriftId, String fieldName) {
2757 _thriftId = thriftId;
2758 _fieldName = fieldName;
2761 public short getThriftFieldId() {
2765 public String getFieldName() {
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;
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);
2782 public stopBgpServer_result() {
2785 public stopBgpServer_result(
2789 this.success = success;
2790 setSuccessIsSet(true);
2794 * Performs a deep copy on <i>other</i>.
2796 public stopBgpServer_result(stopBgpServer_result other) {
2797 __isset_bitfield = other.__isset_bitfield;
2798 this.success = other.success;
2801 public stopBgpServer_result deepCopy() {
2802 return new stopBgpServer_result(this);
2806 public void clear() {
2807 setSuccessIsSet(false);
2811 public int getSuccess() {
2812 return this.success;
2815 public stopBgpServer_result setSuccess(int success) {
2816 this.success = success;
2817 setSuccessIsSet(true);
2821 public void unsetSuccess() {
2822 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
2830 public void setSuccessIsSet(boolean value) {
2831 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
2834 public void setFieldValue(_Fields field, Object value) {
2837 if (value == null) {
2840 setSuccess((Integer)value);
2847 public Object getFieldValue(_Fields field) {
2850 return Integer.valueOf(getSuccess());
2853 throw new IllegalStateException();
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();
2864 return isSetSuccess();
2866 throw new IllegalStateException();
2870 public boolean equals(Object that) {
2873 if (that instanceof stopBgpServer_result)
2874 return this.equals((stopBgpServer_result)that);
2878 public boolean equals(stopBgpServer_result that) {
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))
2887 if (this.success != that.success)
2895 public int hashCode() {
2900 public int compareTo(stopBgpServer_result other) {
2901 if (!getClass().equals(other.getClass())) {
2902 return getClass().getName().compareTo(other.getClass().getName());
2905 int lastComparison = 0;
2907 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
2908 if (lastComparison != 0) {
2909 return lastComparison;
2911 if (isSetSuccess()) {
2912 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
2913 if (lastComparison != 0) {
2914 return lastComparison;
2920 public _Fields fieldForId(int fieldId) {
2921 return _Fields.findByThriftId(fieldId);
2924 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2925 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
2928 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2929 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
2933 public String toString() {
2934 StringBuilder sb = new StringBuilder("stopBgpServer_result(");
2935 boolean first = true;
2937 sb.append("success:");
2938 sb.append(this.success);
2941 return sb.toString();
2944 public void validate() throws org.apache.thrift.TException {
2945 // check for required fields
2946 // check for sub-struct validity
2949 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
2957 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
2967 private static class stopBgpServer_resultStandardSchemeFactory implements SchemeFactory {
2968 public stopBgpServer_resultStandardScheme getScheme() {
2969 return new stopBgpServer_resultStandardScheme();
2973 private static class stopBgpServer_resultStandardScheme extends StandardScheme<stopBgpServer_result> {
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();
2980 schemeField = iprot.readFieldBegin();
2981 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
2984 switch (schemeField.id) {
2986 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
2987 struct.success = iprot.readI32();
2988 struct.setSuccessIsSet(true);
2990 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2994 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
2996 iprot.readFieldEnd();
2998 iprot.readStructEnd();
3000 // check for required fields of primitive type, which can't be checked in the validate method
3004 public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgpServer_result struct) throws org.apache.thrift.TException {
3007 oprot.writeStructBegin(STRUCT_DESC);
3008 if (struct.isSetSuccess()) {
3009 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 oprot.writeI32(struct.success);
3011 oprot.writeFieldEnd();
3013 oprot.writeFieldStop();
3014 oprot.writeStructEnd();
3019 private static class stopBgpServer_resultTupleSchemeFactory implements SchemeFactory {
3020 public stopBgpServer_resultTupleScheme getScheme() {
3021 return new stopBgpServer_resultTupleScheme();
3025 private static class stopBgpServer_resultTupleScheme extends TupleScheme<stopBgpServer_result> {
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()) {
3034 oprot.writeBitSet(optionals, 1);
3035 if (struct.isSetSuccess()) {
3036 oprot.writeI32(struct.success);
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);
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");
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);
3059 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
3061 schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory());
3062 schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory());
3065 public String ipAddress; // required
3066 public int asNumber; // required
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");
3073 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3076 for (_Fields field : EnumSet.allOf(_Fields.class)) {
3077 byName.put(field.getFieldName(), field);
3082 * Find the _Fields constant that matches fieldId, or null if its not found.
3084 public static _Fields findByThriftId(int fieldId) {
3086 case 1: // IP_ADDRESS
3088 case 2: // AS_NUMBER
3096 * Find the _Fields constant that matches fieldId, throwing an exception
3097 * if it is not found.
3099 public static _Fields findByThriftIdOrThrow(int fieldId) {
3100 _Fields fields = findByThriftId(fieldId);
3101 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3106 * Find the _Fields constant that matches name, or null if its not found.
3108 public static _Fields findByName(String name) {
3109 return byName.get(name);
3112 private final short _thriftId;
3113 private final String _fieldName;
3115 _Fields(short thriftId, String fieldName) {
3116 _thriftId = thriftId;
3117 _fieldName = fieldName;
3120 public short getThriftFieldId() {
3124 public String getFieldName() {
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;
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);
3143 public createPeer_args() {
3146 public createPeer_args(
3151 this.ipAddress = ipAddress;
3152 this.asNumber = asNumber;
3153 setAsNumberIsSet(true);
3157 * Performs a deep copy on <i>other</i>.
3159 public createPeer_args(createPeer_args other) {
3160 __isset_bitfield = other.__isset_bitfield;
3161 if (other.isSetIpAddress()) {
3162 this.ipAddress = other.ipAddress;
3164 this.asNumber = other.asNumber;
3167 public createPeer_args deepCopy() {
3168 return new createPeer_args(this);
3172 public void clear() {
3173 this.ipAddress = null;
3174 setAsNumberIsSet(false);
3178 public String getIpAddress() {
3179 return this.ipAddress;
3182 public createPeer_args setIpAddress(String ipAddress) {
3183 this.ipAddress = ipAddress;
3187 public void unsetIpAddress() {
3188 this.ipAddress = null;
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;
3196 public void setIpAddressIsSet(boolean value) {
3198 this.ipAddress = null;
3202 public int getAsNumber() {
3203 return this.asNumber;
3206 public createPeer_args setAsNumber(int asNumber) {
3207 this.asNumber = asNumber;
3208 setAsNumberIsSet(true);
3212 public void unsetAsNumber() {
3213 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
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);
3221 public void setAsNumberIsSet(boolean value) {
3222 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
3225 public void setFieldValue(_Fields field, Object value) {
3228 if (value == null) {
3231 setIpAddress((String)value);
3236 if (value == null) {
3239 setAsNumber((Integer)value);
3246 public Object getFieldValue(_Fields field) {
3249 return getIpAddress();
3252 return Integer.valueOf(getAsNumber());
3255 throw new IllegalStateException();
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();
3266 return isSetIpAddress();
3268 return isSetAsNumber();
3270 throw new IllegalStateException();
3274 public boolean equals(Object that) {
3277 if (that instanceof createPeer_args)
3278 return this.equals((createPeer_args)that);
3282 public boolean equals(createPeer_args that) {
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))
3291 if (!this.ipAddress.equals(that.ipAddress))
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))
3300 if (this.asNumber != that.asNumber)
3308 public int hashCode() {
3313 public int compareTo(createPeer_args other) {
3314 if (!getClass().equals(other.getClass())) {
3315 return getClass().getName().compareTo(other.getClass().getName());
3318 int lastComparison = 0;
3320 lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
3321 if (lastComparison != 0) {
3322 return lastComparison;
3324 if (isSetIpAddress()) {
3325 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
3326 if (lastComparison != 0) {
3327 return lastComparison;
3330 lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
3331 if (lastComparison != 0) {
3332 return lastComparison;
3334 if (isSetAsNumber()) {
3335 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
3336 if (lastComparison != 0) {
3337 return lastComparison;
3343 public _Fields fieldForId(int fieldId) {
3344 return _Fields.findByThriftId(fieldId);
3347 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3348 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
3351 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3352 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
3356 public String toString() {
3357 StringBuilder sb = new StringBuilder("createPeer_args(");
3358 boolean first = true;
3360 sb.append("ipAddress:");
3361 if (this.ipAddress == null) {
3364 sb.append(this.ipAddress);
3367 if (!first) sb.append(", ");
3368 sb.append("asNumber:");
3369 sb.append(this.asNumber);
3372 return sb.toString();
3375 public void validate() throws org.apache.thrift.TException {
3376 // check for required fields
3377 // check for sub-struct validity
3380 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
3388 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
3398 private static class createPeer_argsStandardSchemeFactory implements SchemeFactory {
3399 public createPeer_argsStandardScheme getScheme() {
3400 return new createPeer_argsStandardScheme();
3404 private static class createPeer_argsStandardScheme extends StandardScheme<createPeer_args> {
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();
3411 schemeField = iprot.readFieldBegin();
3412 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
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);
3421 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3424 case 2: // AS_NUMBER
3425 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
3426 struct.asNumber = iprot.readI32();
3427 struct.setAsNumberIsSet(true);
3429 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3433 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3435 iprot.readFieldEnd();
3437 iprot.readStructEnd();
3439 // check for required fields of primitive type, which can't be checked in the validate method
3443 public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_args struct) throws org.apache.thrift.TException {
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();
3452 oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
3453 oprot.writeI32(struct.asNumber);
3454 oprot.writeFieldEnd();
3455 oprot.writeFieldStop();
3456 oprot.writeStructEnd();
3461 private static class createPeer_argsTupleSchemeFactory implements SchemeFactory {
3462 public createPeer_argsTupleScheme getScheme() {
3463 return new createPeer_argsTupleScheme();
3467 private static class createPeer_argsTupleScheme extends TupleScheme<createPeer_args> {
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()) {
3476 if (struct.isSetAsNumber()) {
3479 oprot.writeBitSet(optionals, 2);
3480 if (struct.isSetIpAddress()) {
3481 oprot.writeString(struct.ipAddress);
3483 if (struct.isSetAsNumber()) {
3484 oprot.writeI32(struct.asNumber);
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);
3496 if (incoming.get(1)) {
3497 struct.asNumber = iprot.readI32();
3498 struct.setAsNumberIsSet(true);
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");
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);
3510 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
3512 schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory());
3513 schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory());
3516 public int success; // required
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");
3522 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3525 for (_Fields field : EnumSet.allOf(_Fields.class)) {
3526 byName.put(field.getFieldName(), field);
3531 * Find the _Fields constant that matches fieldId, or null if its not found.
3533 public static _Fields findByThriftId(int fieldId) {
3543 * Find the _Fields constant that matches fieldId, throwing an exception
3544 * if it is not found.
3546 public static _Fields findByThriftIdOrThrow(int fieldId) {
3547 _Fields fields = findByThriftId(fieldId);
3548 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3553 * Find the _Fields constant that matches name, or null if its not found.
3555 public static _Fields findByName(String name) {
3556 return byName.get(name);
3559 private final short _thriftId;
3560 private final String _fieldName;
3562 _Fields(short thriftId, String fieldName) {
3563 _thriftId = thriftId;
3564 _fieldName = fieldName;
3567 public short getThriftFieldId() {
3571 public String getFieldName() {
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;
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);
3588 public createPeer_result() {
3591 public createPeer_result(
3595 this.success = success;
3596 setSuccessIsSet(true);
3600 * Performs a deep copy on <i>other</i>.
3602 public createPeer_result(createPeer_result other) {
3603 __isset_bitfield = other.__isset_bitfield;
3604 this.success = other.success;
3607 public createPeer_result deepCopy() {
3608 return new createPeer_result(this);
3612 public void clear() {
3613 setSuccessIsSet(false);
3617 public int getSuccess() {
3618 return this.success;
3621 public createPeer_result setSuccess(int success) {
3622 this.success = success;
3623 setSuccessIsSet(true);
3627 public void unsetSuccess() {
3628 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
3636 public void setSuccessIsSet(boolean value) {
3637 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
3640 public void setFieldValue(_Fields field, Object value) {
3643 if (value == null) {
3646 setSuccess((Integer)value);
3653 public Object getFieldValue(_Fields field) {
3656 return Integer.valueOf(getSuccess());
3659 throw new IllegalStateException();
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();
3670 return isSetSuccess();
3672 throw new IllegalStateException();
3676 public boolean equals(Object that) {
3679 if (that instanceof createPeer_result)
3680 return this.equals((createPeer_result)that);
3684 public boolean equals(createPeer_result that) {
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))
3693 if (this.success != that.success)
3701 public int hashCode() {
3706 public int compareTo(createPeer_result other) {
3707 if (!getClass().equals(other.getClass())) {
3708 return getClass().getName().compareTo(other.getClass().getName());
3711 int lastComparison = 0;
3713 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
3714 if (lastComparison != 0) {
3715 return lastComparison;
3717 if (isSetSuccess()) {
3718 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
3719 if (lastComparison != 0) {
3720 return lastComparison;
3726 public _Fields fieldForId(int fieldId) {
3727 return _Fields.findByThriftId(fieldId);
3730 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3731 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
3734 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3735 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
3739 public String toString() {
3740 StringBuilder sb = new StringBuilder("createPeer_result(");
3741 boolean first = true;
3743 sb.append("success:");
3744 sb.append(this.success);
3747 return sb.toString();
3750 public void validate() throws org.apache.thrift.TException {
3751 // check for required fields
3752 // check for sub-struct validity
3755 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
3763 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
3773 private static class createPeer_resultStandardSchemeFactory implements SchemeFactory {
3774 public createPeer_resultStandardScheme getScheme() {
3775 return new createPeer_resultStandardScheme();
3779 private static class createPeer_resultStandardScheme extends StandardScheme<createPeer_result> {
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();
3786 schemeField = iprot.readFieldBegin();
3787 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
3790 switch (schemeField.id) {
3792 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
3793 struct.success = iprot.readI32();
3794 struct.setSuccessIsSet(true);
3796 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3800 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
3802 iprot.readFieldEnd();
3804 iprot.readStructEnd();
3806 // check for required fields of primitive type, which can't be checked in the validate method
3810 public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_result struct) throws org.apache.thrift.TException {
3813 oprot.writeStructBegin(STRUCT_DESC);
3814 if (struct.isSetSuccess()) {
3815 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3816 oprot.writeI32(struct.success);
3817 oprot.writeFieldEnd();
3819 oprot.writeFieldStop();
3820 oprot.writeStructEnd();
3825 private static class createPeer_resultTupleSchemeFactory implements SchemeFactory {
3826 public createPeer_resultTupleScheme getScheme() {
3827 return new createPeer_resultTupleScheme();
3831 private static class createPeer_resultTupleScheme extends TupleScheme<createPeer_result> {
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()) {
3840 oprot.writeBitSet(optionals, 1);
3841 if (struct.isSetSuccess()) {
3842 oprot.writeI32(struct.success);
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);
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");
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);
3864 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
3866 schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory());
3867 schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory());
3870 public String ipAddress; // required
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");
3876 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3879 for (_Fields field : EnumSet.allOf(_Fields.class)) {
3880 byName.put(field.getFieldName(), field);
3885 * Find the _Fields constant that matches fieldId, or null if its not found.
3887 public static _Fields findByThriftId(int fieldId) {
3889 case 1: // IP_ADDRESS
3897 * Find the _Fields constant that matches fieldId, throwing an exception
3898 * if it is not found.
3900 public static _Fields findByThriftIdOrThrow(int fieldId) {
3901 _Fields fields = findByThriftId(fieldId);
3902 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3907 * Find the _Fields constant that matches name, or null if its not found.
3909 public static _Fields findByName(String name) {
3910 return byName.get(name);
3913 private final short _thriftId;
3914 private final String _fieldName;
3916 _Fields(short thriftId, String fieldName) {
3917 _thriftId = thriftId;
3918 _fieldName = fieldName;
3921 public short getThriftFieldId() {
3925 public String getFieldName() {
3930 // isset id assignments
3931 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
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);
3940 public deletePeer_args() {
3943 public deletePeer_args(
3947 this.ipAddress = ipAddress;
3951 * Performs a deep copy on <i>other</i>.
3953 public deletePeer_args(deletePeer_args other) {
3954 if (other.isSetIpAddress()) {
3955 this.ipAddress = other.ipAddress;
3959 public deletePeer_args deepCopy() {
3960 return new deletePeer_args(this);
3964 public void clear() {
3965 this.ipAddress = null;
3968 public String getIpAddress() {
3969 return this.ipAddress;
3972 public deletePeer_args setIpAddress(String ipAddress) {
3973 this.ipAddress = ipAddress;
3977 public void unsetIpAddress() {
3978 this.ipAddress = null;
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;
3986 public void setIpAddressIsSet(boolean value) {
3988 this.ipAddress = null;
3992 public void setFieldValue(_Fields field, Object value) {
3995 if (value == null) {
3998 setIpAddress((String)value);
4005 public Object getFieldValue(_Fields field) {
4008 return getIpAddress();
4011 throw new IllegalStateException();
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();
4022 return isSetIpAddress();
4024 throw new IllegalStateException();
4028 public boolean equals(Object that) {
4031 if (that instanceof deletePeer_args)
4032 return this.equals((deletePeer_args)that);
4036 public boolean equals(deletePeer_args that) {
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))
4045 if (!this.ipAddress.equals(that.ipAddress))
4053 public int hashCode() {
4058 public int compareTo(deletePeer_args other) {
4059 if (!getClass().equals(other.getClass())) {
4060 return getClass().getName().compareTo(other.getClass().getName());
4063 int lastComparison = 0;
4065 lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
4066 if (lastComparison != 0) {
4067 return lastComparison;
4069 if (isSetIpAddress()) {
4070 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
4071 if (lastComparison != 0) {
4072 return lastComparison;
4078 public _Fields fieldForId(int fieldId) {
4079 return _Fields.findByThriftId(fieldId);
4082 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4083 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
4086 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4087 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
4091 public String toString() {
4092 StringBuilder sb = new StringBuilder("deletePeer_args(");
4093 boolean first = true;
4095 sb.append("ipAddress:");
4096 if (this.ipAddress == null) {
4099 sb.append(this.ipAddress);
4103 return sb.toString();
4106 public void validate() throws org.apache.thrift.TException {
4107 // check for required fields
4108 // check for sub-struct validity
4111 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
4119 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
4127 private static class deletePeer_argsStandardSchemeFactory implements SchemeFactory {
4128 public deletePeer_argsStandardScheme getScheme() {
4129 return new deletePeer_argsStandardScheme();
4133 private static class deletePeer_argsStandardScheme extends StandardScheme<deletePeer_args> {
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();
4140 schemeField = iprot.readFieldBegin();
4141 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
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);
4150 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4154 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4156 iprot.readFieldEnd();
4158 iprot.readStructEnd();
4160 // check for required fields of primitive type, which can't be checked in the validate method
4164 public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_args struct) throws org.apache.thrift.TException {
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();
4173 oprot.writeFieldStop();
4174 oprot.writeStructEnd();
4179 private static class deletePeer_argsTupleSchemeFactory implements SchemeFactory {
4180 public deletePeer_argsTupleScheme getScheme() {
4181 return new deletePeer_argsTupleScheme();
4185 private static class deletePeer_argsTupleScheme extends TupleScheme<deletePeer_args> {
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()) {
4194 oprot.writeBitSet(optionals, 1);
4195 if (struct.isSetIpAddress()) {
4196 oprot.writeString(struct.ipAddress);
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);
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");
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);
4218 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
4220 schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory());
4221 schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory());
4224 public int success; // required
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");
4230 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4233 for (_Fields field : EnumSet.allOf(_Fields.class)) {
4234 byName.put(field.getFieldName(), field);
4239 * Find the _Fields constant that matches fieldId, or null if its not found.
4241 public static _Fields findByThriftId(int fieldId) {
4251 * Find the _Fields constant that matches fieldId, throwing an exception
4252 * if it is not found.
4254 public static _Fields findByThriftIdOrThrow(int fieldId) {
4255 _Fields fields = findByThriftId(fieldId);
4256 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4261 * Find the _Fields constant that matches name, or null if its not found.
4263 public static _Fields findByName(String name) {
4264 return byName.get(name);
4267 private final short _thriftId;
4268 private final String _fieldName;
4270 _Fields(short thriftId, String fieldName) {
4271 _thriftId = thriftId;
4272 _fieldName = fieldName;
4275 public short getThriftFieldId() {
4279 public String getFieldName() {
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;
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);
4296 public deletePeer_result() {
4299 public deletePeer_result(
4303 this.success = success;
4304 setSuccessIsSet(true);
4308 * Performs a deep copy on <i>other</i>.
4310 public deletePeer_result(deletePeer_result other) {
4311 __isset_bitfield = other.__isset_bitfield;
4312 this.success = other.success;
4315 public deletePeer_result deepCopy() {
4316 return new deletePeer_result(this);
4320 public void clear() {
4321 setSuccessIsSet(false);
4325 public int getSuccess() {
4326 return this.success;
4329 public deletePeer_result setSuccess(int success) {
4330 this.success = success;
4331 setSuccessIsSet(true);
4335 public void unsetSuccess() {
4336 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
4344 public void setSuccessIsSet(boolean value) {
4345 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
4348 public void setFieldValue(_Fields field, Object value) {
4351 if (value == null) {
4354 setSuccess((Integer)value);
4361 public Object getFieldValue(_Fields field) {
4364 return Integer.valueOf(getSuccess());
4367 throw new IllegalStateException();
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();
4378 return isSetSuccess();
4380 throw new IllegalStateException();
4384 public boolean equals(Object that) {
4387 if (that instanceof deletePeer_result)
4388 return this.equals((deletePeer_result)that);
4392 public boolean equals(deletePeer_result that) {
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))
4401 if (this.success != that.success)
4409 public int hashCode() {
4414 public int compareTo(deletePeer_result other) {
4415 if (!getClass().equals(other.getClass())) {
4416 return getClass().getName().compareTo(other.getClass().getName());
4419 int lastComparison = 0;
4421 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
4422 if (lastComparison != 0) {
4423 return lastComparison;
4425 if (isSetSuccess()) {
4426 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
4427 if (lastComparison != 0) {
4428 return lastComparison;
4434 public _Fields fieldForId(int fieldId) {
4435 return _Fields.findByThriftId(fieldId);
4438 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4439 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
4442 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4443 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
4447 public String toString() {
4448 StringBuilder sb = new StringBuilder("deletePeer_result(");
4449 boolean first = true;
4451 sb.append("success:");
4452 sb.append(this.success);
4455 return sb.toString();
4458 public void validate() throws org.apache.thrift.TException {
4459 // check for required fields
4460 // check for sub-struct validity
4463 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
4471 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
4481 private static class deletePeer_resultStandardSchemeFactory implements SchemeFactory {
4482 public deletePeer_resultStandardScheme getScheme() {
4483 return new deletePeer_resultStandardScheme();
4487 private static class deletePeer_resultStandardScheme extends StandardScheme<deletePeer_result> {
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();
4494 schemeField = iprot.readFieldBegin();
4495 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
4498 switch (schemeField.id) {
4500 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
4501 struct.success = iprot.readI32();
4502 struct.setSuccessIsSet(true);
4504 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4508 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
4510 iprot.readFieldEnd();
4512 iprot.readStructEnd();
4514 // check for required fields of primitive type, which can't be checked in the validate method
4518 public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_result struct) throws org.apache.thrift.TException {
4521 oprot.writeStructBegin(STRUCT_DESC);
4522 if (struct.isSetSuccess()) {
4523 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4524 oprot.writeI32(struct.success);
4525 oprot.writeFieldEnd();
4527 oprot.writeFieldStop();
4528 oprot.writeStructEnd();
4533 private static class deletePeer_resultTupleSchemeFactory implements SchemeFactory {
4534 public deletePeer_resultTupleScheme getScheme() {
4535 return new deletePeer_resultTupleScheme();
4539 private static class deletePeer_resultTupleScheme extends TupleScheme<deletePeer_result> {
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()) {
4548 oprot.writeBitSet(optionals, 1);
4549 if (struct.isSetSuccess()) {
4550 oprot.writeI32(struct.success);
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);
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");
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);
4574 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
4576 schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory());
4577 schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory());
4580 public String rd; // required
4581 public List<String> irts; // required
4582 public List<String> erts; // required
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 {
4587 IRTS((short)2, "irts"),
4588 ERTS((short)3, "erts");
4590 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4593 for (_Fields field : EnumSet.allOf(_Fields.class)) {
4594 byName.put(field.getFieldName(), field);
4599 * Find the _Fields constant that matches fieldId, or null if its not found.
4601 public static _Fields findByThriftId(int fieldId) {
4615 * Find the _Fields constant that matches fieldId, throwing an exception
4616 * if it is not found.
4618 public static _Fields findByThriftIdOrThrow(int fieldId) {
4619 _Fields fields = findByThriftId(fieldId);
4620 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4625 * Find the _Fields constant that matches name, or null if its not found.
4627 public static _Fields findByName(String name) {
4628 return byName.get(name);
4631 private final short _thriftId;
4632 private final String _fieldName;
4634 _Fields(short thriftId, String fieldName) {
4635 _thriftId = thriftId;
4636 _fieldName = fieldName;
4639 public short getThriftFieldId() {
4643 public String getFieldName() {
4648 // isset id assignments
4649 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
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);
4664 public addVrf_args() {
4679 * Performs a deep copy on <i>other</i>.
4681 public addVrf_args(addVrf_args other) {
4682 if (other.isSetRd()) {
4685 if (other.isSetIrts()) {
4686 List<String> __this__irts = new ArrayList<String>(other.irts);
4687 this.irts = __this__irts;
4689 if (other.isSetErts()) {
4690 List<String> __this__erts = new ArrayList<String>(other.erts);
4691 this.erts = __this__erts;
4695 public addVrf_args deepCopy() {
4696 return new addVrf_args(this);
4700 public void clear() {
4706 public String getRd() {
4710 public addVrf_args setRd(String rd) {
4715 public void unsetRd() {
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;
4724 public void setRdIsSet(boolean value) {
4730 public int getIrtsSize() {
4731 return (this.irts == null) ? 0 : this.irts.size();
4734 public java.util.Iterator<String> getIrtsIterator() {
4735 return (this.irts == null) ? null : this.irts.iterator();
4738 public void addToIrts(String elem) {
4739 if (this.irts == null) {
4740 this.irts = new ArrayList<String>();
4742 this.irts.add(elem);
4745 public List<String> getIrts() {
4749 public addVrf_args setIrts(List<String> irts) {
4754 public void unsetIrts() {
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;
4763 public void setIrtsIsSet(boolean value) {
4769 public int getErtsSize() {
4770 return (this.erts == null) ? 0 : this.erts.size();
4773 public java.util.Iterator<String> getErtsIterator() {
4774 return (this.erts == null) ? null : this.erts.iterator();
4777 public void addToErts(String elem) {
4778 if (this.erts == null) {
4779 this.erts = new ArrayList<String>();
4781 this.erts.add(elem);
4784 public List<String> getErts() {
4788 public addVrf_args setErts(List<String> erts) {
4793 public void unsetErts() {
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;
4802 public void setErtsIsSet(boolean value) {
4808 public void setFieldValue(_Fields field, Object value) {
4811 if (value == null) {
4814 setRd((String)value);
4819 if (value == null) {
4822 setIrts((List<String>)value);
4827 if (value == null) {
4830 setErts((List<String>)value);
4837 public Object getFieldValue(_Fields field) {
4849 throw new IllegalStateException();
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();
4866 throw new IllegalStateException();
4870 public boolean equals(Object that) {
4873 if (that instanceof addVrf_args)
4874 return this.equals((addVrf_args)that);
4878 public boolean equals(addVrf_args that) {
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))
4887 if (!this.rd.equals(that.rd))
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))
4896 if (!this.irts.equals(that.irts))
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))
4905 if (!this.erts.equals(that.erts))
4913 public int hashCode() {
4918 public int compareTo(addVrf_args other) {
4919 if (!getClass().equals(other.getClass())) {
4920 return getClass().getName().compareTo(other.getClass().getName());
4923 int lastComparison = 0;
4925 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
4926 if (lastComparison != 0) {
4927 return lastComparison;
4930 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
4931 if (lastComparison != 0) {
4932 return lastComparison;
4935 lastComparison = Boolean.valueOf(isSetIrts()).compareTo(other.isSetIrts());
4936 if (lastComparison != 0) {
4937 return lastComparison;
4940 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.irts, other.irts);
4941 if (lastComparison != 0) {
4942 return lastComparison;
4945 lastComparison = Boolean.valueOf(isSetErts()).compareTo(other.isSetErts());
4946 if (lastComparison != 0) {
4947 return lastComparison;
4950 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.erts, other.erts);
4951 if (lastComparison != 0) {
4952 return lastComparison;
4958 public _Fields fieldForId(int fieldId) {
4959 return _Fields.findByThriftId(fieldId);
4962 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4963 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
4966 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4967 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
4971 public String toString() {
4972 StringBuilder sb = new StringBuilder("addVrf_args(");
4973 boolean first = true;
4976 if (this.rd == null) {
4982 if (!first) sb.append(", ");
4984 if (this.irts == null) {
4987 sb.append(this.irts);
4990 if (!first) sb.append(", ");
4992 if (this.erts == null) {
4995 sb.append(this.erts);
4999 return sb.toString();
5002 public void validate() throws org.apache.thrift.TException {
5003 // check for required fields
5004 // check for sub-struct validity
5007 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
5015 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
5023 private static class addVrf_argsStandardSchemeFactory implements SchemeFactory {
5024 public addVrf_argsStandardScheme getScheme() {
5025 return new addVrf_argsStandardScheme();
5029 private static class addVrf_argsStandardScheme extends StandardScheme<addVrf_args> {
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();
5036 schemeField = iprot.readFieldBegin();
5037 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
5040 switch (schemeField.id) {
5042 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
5043 struct.rd = iprot.readString();
5044 struct.setRdIsSet(true);
5046 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5050 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
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)
5057 _elem10 = iprot.readString();
5058 struct.irts.add(_elem10);
5060 iprot.readListEnd();
5062 struct.setIrtsIsSet(true);
5064 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5068 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
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)
5075 _elem13 = iprot.readString();
5076 struct.erts.add(_elem13);
5078 iprot.readListEnd();
5080 struct.setErtsIsSet(true);
5082 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5086 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5088 iprot.readFieldEnd();
5090 iprot.readStructEnd();
5092 // check for required fields of primitive type, which can't be checked in the validate method
5096 public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_args struct) throws org.apache.thrift.TException {
5099 oprot.writeStructBegin(STRUCT_DESC);
5100 if (struct.rd != null) {
5101 oprot.writeFieldBegin(RD_FIELD_DESC);
5102 oprot.writeString(struct.rd);
5103 oprot.writeFieldEnd();
5105 if (struct.irts != null) {
5106 oprot.writeFieldBegin(IRTS_FIELD_DESC);
5108 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.irts.size()));
5109 for (String _iter14 : struct.irts)
5111 oprot.writeString(_iter14);
5113 oprot.writeListEnd();
5115 oprot.writeFieldEnd();
5117 if (struct.erts != null) {
5118 oprot.writeFieldBegin(ERTS_FIELD_DESC);
5120 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.erts.size()));
5121 for (String _iter15 : struct.erts)
5123 oprot.writeString(_iter15);
5125 oprot.writeListEnd();
5127 oprot.writeFieldEnd();
5129 oprot.writeFieldStop();
5130 oprot.writeStructEnd();
5135 private static class addVrf_argsTupleSchemeFactory implements SchemeFactory {
5136 public addVrf_argsTupleScheme getScheme() {
5137 return new addVrf_argsTupleScheme();
5141 private static class addVrf_argsTupleScheme extends TupleScheme<addVrf_args> {
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()) {
5150 if (struct.isSetIrts()) {
5153 if (struct.isSetErts()) {
5156 oprot.writeBitSet(optionals, 3);
5157 if (struct.isSetRd()) {
5158 oprot.writeString(struct.rd);
5160 if (struct.isSetIrts()) {
5162 oprot.writeI32(struct.irts.size());
5163 for (String _iter16 : struct.irts)
5165 oprot.writeString(_iter16);
5169 if (struct.isSetErts()) {
5171 oprot.writeI32(struct.erts.size());
5172 for (String _iter17 : struct.erts)
5174 oprot.writeString(_iter17);
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);
5188 if (incoming.get(1)) {
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)
5195 _elem20 = iprot.readString();
5196 struct.irts.add(_elem20);
5199 struct.setIrtsIsSet(true);
5201 if (incoming.get(2)) {
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)
5208 _elem23 = iprot.readString();
5209 struct.erts.add(_elem23);
5212 struct.setErtsIsSet(true);
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");
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);
5224 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
5226 schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory());
5227 schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory());
5230 public int success; // required
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");
5236 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5239 for (_Fields field : EnumSet.allOf(_Fields.class)) {
5240 byName.put(field.getFieldName(), field);
5245 * Find the _Fields constant that matches fieldId, or null if its not found.
5247 public static _Fields findByThriftId(int fieldId) {
5257 * Find the _Fields constant that matches fieldId, throwing an exception
5258 * if it is not found.
5260 public static _Fields findByThriftIdOrThrow(int fieldId) {
5261 _Fields fields = findByThriftId(fieldId);
5262 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5267 * Find the _Fields constant that matches name, or null if its not found.
5269 public static _Fields findByName(String name) {
5270 return byName.get(name);
5273 private final short _thriftId;
5274 private final String _fieldName;
5276 _Fields(short thriftId, String fieldName) {
5277 _thriftId = thriftId;
5278 _fieldName = fieldName;
5281 public short getThriftFieldId() {
5285 public String getFieldName() {
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;
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);
5302 public addVrf_result() {
5305 public addVrf_result(
5309 this.success = success;
5310 setSuccessIsSet(true);
5314 * Performs a deep copy on <i>other</i>.
5316 public addVrf_result(addVrf_result other) {
5317 __isset_bitfield = other.__isset_bitfield;
5318 this.success = other.success;
5321 public addVrf_result deepCopy() {
5322 return new addVrf_result(this);
5326 public void clear() {
5327 setSuccessIsSet(false);
5331 public int getSuccess() {
5332 return this.success;
5335 public addVrf_result setSuccess(int success) {
5336 this.success = success;
5337 setSuccessIsSet(true);
5341 public void unsetSuccess() {
5342 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
5350 public void setSuccessIsSet(boolean value) {
5351 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
5354 public void setFieldValue(_Fields field, Object value) {
5357 if (value == null) {
5360 setSuccess((Integer)value);
5367 public Object getFieldValue(_Fields field) {
5370 return Integer.valueOf(getSuccess());
5373 throw new IllegalStateException();
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();
5384 return isSetSuccess();
5386 throw new IllegalStateException();
5390 public boolean equals(Object that) {
5393 if (that instanceof addVrf_result)
5394 return this.equals((addVrf_result)that);
5398 public boolean equals(addVrf_result that) {
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))
5407 if (this.success != that.success)
5415 public int hashCode() {
5420 public int compareTo(addVrf_result other) {
5421 if (!getClass().equals(other.getClass())) {
5422 return getClass().getName().compareTo(other.getClass().getName());
5425 int lastComparison = 0;
5427 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
5428 if (lastComparison != 0) {
5429 return lastComparison;
5431 if (isSetSuccess()) {
5432 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
5433 if (lastComparison != 0) {
5434 return lastComparison;
5440 public _Fields fieldForId(int fieldId) {
5441 return _Fields.findByThriftId(fieldId);
5444 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5445 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
5448 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5449 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
5453 public String toString() {
5454 StringBuilder sb = new StringBuilder("addVrf_result(");
5455 boolean first = true;
5457 sb.append("success:");
5458 sb.append(this.success);
5461 return sb.toString();
5464 public void validate() throws org.apache.thrift.TException {
5465 // check for required fields
5466 // check for sub-struct validity
5469 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
5477 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
5487 private static class addVrf_resultStandardSchemeFactory implements SchemeFactory {
5488 public addVrf_resultStandardScheme getScheme() {
5489 return new addVrf_resultStandardScheme();
5493 private static class addVrf_resultStandardScheme extends StandardScheme<addVrf_result> {
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();
5500 schemeField = iprot.readFieldBegin();
5501 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
5504 switch (schemeField.id) {
5506 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
5507 struct.success = iprot.readI32();
5508 struct.setSuccessIsSet(true);
5510 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5514 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5516 iprot.readFieldEnd();
5518 iprot.readStructEnd();
5520 // check for required fields of primitive type, which can't be checked in the validate method
5524 public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_result struct) throws org.apache.thrift.TException {
5527 oprot.writeStructBegin(STRUCT_DESC);
5528 if (struct.isSetSuccess()) {
5529 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5530 oprot.writeI32(struct.success);
5531 oprot.writeFieldEnd();
5533 oprot.writeFieldStop();
5534 oprot.writeStructEnd();
5539 private static class addVrf_resultTupleSchemeFactory implements SchemeFactory {
5540 public addVrf_resultTupleScheme getScheme() {
5541 return new addVrf_resultTupleScheme();
5545 private static class addVrf_resultTupleScheme extends TupleScheme<addVrf_result> {
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()) {
5554 oprot.writeBitSet(optionals, 1);
5555 if (struct.isSetSuccess()) {
5556 oprot.writeI32(struct.success);
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);
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");
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);
5578 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
5580 schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory());
5581 schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory());
5584 public String rd; // required
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 {
5590 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5593 for (_Fields field : EnumSet.allOf(_Fields.class)) {
5594 byName.put(field.getFieldName(), field);
5599 * Find the _Fields constant that matches fieldId, or null if its not found.
5601 public static _Fields findByThriftId(int fieldId) {
5611 * Find the _Fields constant that matches fieldId, throwing an exception
5612 * if it is not found.
5614 public static _Fields findByThriftIdOrThrow(int fieldId) {
5615 _Fields fields = findByThriftId(fieldId);
5616 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5621 * Find the _Fields constant that matches name, or null if its not found.
5623 public static _Fields findByName(String name) {
5624 return byName.get(name);
5627 private final short _thriftId;
5628 private final String _fieldName;
5630 _Fields(short thriftId, String fieldName) {
5631 _thriftId = thriftId;
5632 _fieldName = fieldName;
5635 public short getThriftFieldId() {
5639 public String getFieldName() {
5644 // isset id assignments
5645 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
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);
5654 public delVrf_args() {
5665 * Performs a deep copy on <i>other</i>.
5667 public delVrf_args(delVrf_args other) {
5668 if (other.isSetRd()) {
5673 public delVrf_args deepCopy() {
5674 return new delVrf_args(this);
5678 public void clear() {
5682 public String getRd() {
5686 public delVrf_args setRd(String rd) {
5691 public void unsetRd() {
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;
5700 public void setRdIsSet(boolean value) {
5706 public void setFieldValue(_Fields field, Object value) {
5709 if (value == null) {
5712 setRd((String)value);
5719 public Object getFieldValue(_Fields field) {
5725 throw new IllegalStateException();
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();
5738 throw new IllegalStateException();
5742 public boolean equals(Object that) {
5745 if (that instanceof delVrf_args)
5746 return this.equals((delVrf_args)that);
5750 public boolean equals(delVrf_args that) {
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))
5759 if (!this.rd.equals(that.rd))
5767 public int hashCode() {
5772 public int compareTo(delVrf_args other) {
5773 if (!getClass().equals(other.getClass())) {
5774 return getClass().getName().compareTo(other.getClass().getName());
5777 int lastComparison = 0;
5779 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
5780 if (lastComparison != 0) {
5781 return lastComparison;
5784 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
5785 if (lastComparison != 0) {
5786 return lastComparison;
5792 public _Fields fieldForId(int fieldId) {
5793 return _Fields.findByThriftId(fieldId);
5796 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5797 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
5800 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5801 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
5805 public String toString() {
5806 StringBuilder sb = new StringBuilder("delVrf_args(");
5807 boolean first = true;
5810 if (this.rd == null) {
5817 return sb.toString();
5820 public void validate() throws org.apache.thrift.TException {
5821 // check for required fields
5822 // check for sub-struct validity
5825 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
5833 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
5841 private static class delVrf_argsStandardSchemeFactory implements SchemeFactory {
5842 public delVrf_argsStandardScheme getScheme() {
5843 return new delVrf_argsStandardScheme();
5847 private static class delVrf_argsStandardScheme extends StandardScheme<delVrf_args> {
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();
5854 schemeField = iprot.readFieldBegin();
5855 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
5858 switch (schemeField.id) {
5860 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
5861 struct.rd = iprot.readString();
5862 struct.setRdIsSet(true);
5864 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5868 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
5870 iprot.readFieldEnd();
5872 iprot.readStructEnd();
5874 // check for required fields of primitive type, which can't be checked in the validate method
5878 public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_args struct) throws org.apache.thrift.TException {
5881 oprot.writeStructBegin(STRUCT_DESC);
5882 if (struct.rd != null) {
5883 oprot.writeFieldBegin(RD_FIELD_DESC);
5884 oprot.writeString(struct.rd);
5885 oprot.writeFieldEnd();
5887 oprot.writeFieldStop();
5888 oprot.writeStructEnd();
5893 private static class delVrf_argsTupleSchemeFactory implements SchemeFactory {
5894 public delVrf_argsTupleScheme getScheme() {
5895 return new delVrf_argsTupleScheme();
5899 private static class delVrf_argsTupleScheme extends TupleScheme<delVrf_args> {
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()) {
5908 oprot.writeBitSet(optionals, 1);
5909 if (struct.isSetRd()) {
5910 oprot.writeString(struct.rd);
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);
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");
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);
5932 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
5934 schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory());
5935 schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory());
5938 public int success; // required
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");
5944 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5947 for (_Fields field : EnumSet.allOf(_Fields.class)) {
5948 byName.put(field.getFieldName(), field);
5953 * Find the _Fields constant that matches fieldId, or null if its not found.
5955 public static _Fields findByThriftId(int fieldId) {
5965 * Find the _Fields constant that matches fieldId, throwing an exception
5966 * if it is not found.
5968 public static _Fields findByThriftIdOrThrow(int fieldId) {
5969 _Fields fields = findByThriftId(fieldId);
5970 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5975 * Find the _Fields constant that matches name, or null if its not found.
5977 public static _Fields findByName(String name) {
5978 return byName.get(name);
5981 private final short _thriftId;
5982 private final String _fieldName;
5984 _Fields(short thriftId, String fieldName) {
5985 _thriftId = thriftId;
5986 _fieldName = fieldName;
5989 public short getThriftFieldId() {
5993 public String getFieldName() {
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;
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);
6010 public delVrf_result() {
6013 public delVrf_result(
6017 this.success = success;
6018 setSuccessIsSet(true);
6022 * Performs a deep copy on <i>other</i>.
6024 public delVrf_result(delVrf_result other) {
6025 __isset_bitfield = other.__isset_bitfield;
6026 this.success = other.success;
6029 public delVrf_result deepCopy() {
6030 return new delVrf_result(this);
6034 public void clear() {
6035 setSuccessIsSet(false);
6039 public int getSuccess() {
6040 return this.success;
6043 public delVrf_result setSuccess(int success) {
6044 this.success = success;
6045 setSuccessIsSet(true);
6049 public void unsetSuccess() {
6050 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
6058 public void setSuccessIsSet(boolean value) {
6059 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
6062 public void setFieldValue(_Fields field, Object value) {
6065 if (value == null) {
6068 setSuccess((Integer)value);
6075 public Object getFieldValue(_Fields field) {
6078 return Integer.valueOf(getSuccess());
6081 throw new IllegalStateException();
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();
6092 return isSetSuccess();
6094 throw new IllegalStateException();
6098 public boolean equals(Object that) {
6101 if (that instanceof delVrf_result)
6102 return this.equals((delVrf_result)that);
6106 public boolean equals(delVrf_result that) {
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))
6115 if (this.success != that.success)
6123 public int hashCode() {
6128 public int compareTo(delVrf_result other) {
6129 if (!getClass().equals(other.getClass())) {
6130 return getClass().getName().compareTo(other.getClass().getName());
6133 int lastComparison = 0;
6135 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
6136 if (lastComparison != 0) {
6137 return lastComparison;
6139 if (isSetSuccess()) {
6140 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
6141 if (lastComparison != 0) {
6142 return lastComparison;
6148 public _Fields fieldForId(int fieldId) {
6149 return _Fields.findByThriftId(fieldId);
6152 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6153 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
6156 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6157 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
6161 public String toString() {
6162 StringBuilder sb = new StringBuilder("delVrf_result(");
6163 boolean first = true;
6165 sb.append("success:");
6166 sb.append(this.success);
6169 return sb.toString();
6172 public void validate() throws org.apache.thrift.TException {
6173 // check for required fields
6174 // check for sub-struct validity
6177 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
6185 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
6195 private static class delVrf_resultStandardSchemeFactory implements SchemeFactory {
6196 public delVrf_resultStandardScheme getScheme() {
6197 return new delVrf_resultStandardScheme();
6201 private static class delVrf_resultStandardScheme extends StandardScheme<delVrf_result> {
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();
6208 schemeField = iprot.readFieldBegin();
6209 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
6212 switch (schemeField.id) {
6214 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
6215 struct.success = iprot.readI32();
6216 struct.setSuccessIsSet(true);
6218 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6222 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6224 iprot.readFieldEnd();
6226 iprot.readStructEnd();
6228 // check for required fields of primitive type, which can't be checked in the validate method
6232 public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_result struct) throws org.apache.thrift.TException {
6235 oprot.writeStructBegin(STRUCT_DESC);
6236 if (struct.isSetSuccess()) {
6237 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6238 oprot.writeI32(struct.success);
6239 oprot.writeFieldEnd();
6241 oprot.writeFieldStop();
6242 oprot.writeStructEnd();
6247 private static class delVrf_resultTupleSchemeFactory implements SchemeFactory {
6248 public delVrf_resultTupleScheme getScheme() {
6249 return new delVrf_resultTupleScheme();
6253 private static class delVrf_resultTupleScheme extends TupleScheme<delVrf_result> {
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()) {
6262 oprot.writeBitSet(optionals, 1);
6263 if (struct.isSetSuccess()) {
6264 oprot.writeI32(struct.success);
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);
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");
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);
6289 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
6291 schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory());
6292 schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory());
6295 public String prefix; // required
6296 public String nexthop; // required
6297 public String rd; // required
6298 public int label; // required
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"),
6305 LABEL((short)4, "label");
6307 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6310 for (_Fields field : EnumSet.allOf(_Fields.class)) {
6311 byName.put(field.getFieldName(), field);
6316 * Find the _Fields constant that matches fieldId, or null if its not found.
6318 public static _Fields findByThriftId(int fieldId) {
6334 * Find the _Fields constant that matches fieldId, throwing an exception
6335 * if it is not found.
6337 public static _Fields findByThriftIdOrThrow(int fieldId) {
6338 _Fields fields = findByThriftId(fieldId);
6339 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6344 * Find the _Fields constant that matches name, or null if its not found.
6346 public static _Fields findByName(String name) {
6347 return byName.get(name);
6350 private final short _thriftId;
6351 private final String _fieldName;
6353 _Fields(short thriftId, String fieldName) {
6354 _thriftId = thriftId;
6355 _fieldName = fieldName;
6358 public short getThriftFieldId() {
6362 public String getFieldName() {
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;
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);
6385 public pushRoute_args() {
6388 public pushRoute_args(
6395 this.prefix = prefix;
6396 this.nexthop = nexthop;
6399 setLabelIsSet(true);
6403 * Performs a deep copy on <i>other</i>.
6405 public pushRoute_args(pushRoute_args other) {
6406 __isset_bitfield = other.__isset_bitfield;
6407 if (other.isSetPrefix()) {
6408 this.prefix = other.prefix;
6410 if (other.isSetNexthop()) {
6411 this.nexthop = other.nexthop;
6413 if (other.isSetRd()) {
6416 this.label = other.label;
6419 public pushRoute_args deepCopy() {
6420 return new pushRoute_args(this);
6424 public void clear() {
6426 this.nexthop = null;
6428 setLabelIsSet(false);
6432 public String getPrefix() {
6436 public pushRoute_args setPrefix(String prefix) {
6437 this.prefix = prefix;
6441 public void unsetPrefix() {
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;
6450 public void setPrefixIsSet(boolean value) {
6456 public String getNexthop() {
6457 return this.nexthop;
6460 public pushRoute_args setNexthop(String nexthop) {
6461 this.nexthop = nexthop;
6465 public void unsetNexthop() {
6466 this.nexthop = null;
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;
6474 public void setNexthopIsSet(boolean value) {
6476 this.nexthop = null;
6480 public String getRd() {
6484 public pushRoute_args setRd(String rd) {
6489 public void unsetRd() {
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;
6498 public void setRdIsSet(boolean value) {
6504 public int getLabel() {
6508 public pushRoute_args setLabel(int label) {
6510 setLabelIsSet(true);
6514 public void unsetLabel() {
6515 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
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);
6523 public void setLabelIsSet(boolean value) {
6524 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
6527 public void setFieldValue(_Fields field, Object value) {
6530 if (value == null) {
6533 setPrefix((String)value);
6538 if (value == null) {
6541 setNexthop((String)value);
6546 if (value == null) {
6549 setRd((String)value);
6554 if (value == null) {
6557 setLabel((Integer)value);
6564 public Object getFieldValue(_Fields field) {
6570 return getNexthop();
6576 return Integer.valueOf(getLabel());
6579 throw new IllegalStateException();
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();
6590 return isSetPrefix();
6592 return isSetNexthop();
6596 return isSetLabel();
6598 throw new IllegalStateException();
6602 public boolean equals(Object that) {
6605 if (that instanceof pushRoute_args)
6606 return this.equals((pushRoute_args)that);
6610 public boolean equals(pushRoute_args that) {
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))
6619 if (!this.prefix.equals(that.prefix))
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))
6628 if (!this.nexthop.equals(that.nexthop))
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))
6637 if (!this.rd.equals(that.rd))
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))
6646 if (this.label != that.label)
6654 public int hashCode() {
6659 public int compareTo(pushRoute_args other) {
6660 if (!getClass().equals(other.getClass())) {
6661 return getClass().getName().compareTo(other.getClass().getName());
6664 int lastComparison = 0;
6666 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
6667 if (lastComparison != 0) {
6668 return lastComparison;
6670 if (isSetPrefix()) {
6671 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
6672 if (lastComparison != 0) {
6673 return lastComparison;
6676 lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
6677 if (lastComparison != 0) {
6678 return lastComparison;
6680 if (isSetNexthop()) {
6681 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
6682 if (lastComparison != 0) {
6683 return lastComparison;
6686 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
6687 if (lastComparison != 0) {
6688 return lastComparison;
6691 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
6692 if (lastComparison != 0) {
6693 return lastComparison;
6696 lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
6697 if (lastComparison != 0) {
6698 return lastComparison;
6701 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
6702 if (lastComparison != 0) {
6703 return lastComparison;
6709 public _Fields fieldForId(int fieldId) {
6710 return _Fields.findByThriftId(fieldId);
6713 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6714 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
6717 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6718 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
6722 public String toString() {
6723 StringBuilder sb = new StringBuilder("pushRoute_args(");
6724 boolean first = true;
6726 sb.append("prefix:");
6727 if (this.prefix == null) {
6730 sb.append(this.prefix);
6733 if (!first) sb.append(", ");
6734 sb.append("nexthop:");
6735 if (this.nexthop == null) {
6738 sb.append(this.nexthop);
6741 if (!first) sb.append(", ");
6743 if (this.rd == null) {
6749 if (!first) sb.append(", ");
6750 sb.append("label:");
6751 sb.append(this.label);
6754 return sb.toString();
6757 public void validate() throws org.apache.thrift.TException {
6758 // check for required fields
6759 // check for sub-struct validity
6762 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
6770 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
6780 private static class pushRoute_argsStandardSchemeFactory implements SchemeFactory {
6781 public pushRoute_argsStandardScheme getScheme() {
6782 return new pushRoute_argsStandardScheme();
6786 private static class pushRoute_argsStandardScheme extends StandardScheme<pushRoute_args> {
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();
6793 schemeField = iprot.readFieldBegin();
6794 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
6797 switch (schemeField.id) {
6799 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
6800 struct.prefix = iprot.readString();
6801 struct.setPrefixIsSet(true);
6803 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6807 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
6808 struct.nexthop = iprot.readString();
6809 struct.setNexthopIsSet(true);
6811 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6815 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
6816 struct.rd = iprot.readString();
6817 struct.setRdIsSet(true);
6819 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6823 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
6824 struct.label = iprot.readI32();
6825 struct.setLabelIsSet(true);
6827 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6831 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
6833 iprot.readFieldEnd();
6835 iprot.readStructEnd();
6837 // check for required fields of primitive type, which can't be checked in the validate method
6841 public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_args struct) throws org.apache.thrift.TException {
6844 oprot.writeStructBegin(STRUCT_DESC);
6845 if (struct.prefix != null) {
6846 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
6847 oprot.writeString(struct.prefix);
6848 oprot.writeFieldEnd();
6850 if (struct.nexthop != null) {
6851 oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
6852 oprot.writeString(struct.nexthop);
6853 oprot.writeFieldEnd();
6855 if (struct.rd != null) {
6856 oprot.writeFieldBegin(RD_FIELD_DESC);
6857 oprot.writeString(struct.rd);
6858 oprot.writeFieldEnd();
6860 oprot.writeFieldBegin(LABEL_FIELD_DESC);
6861 oprot.writeI32(struct.label);
6862 oprot.writeFieldEnd();
6863 oprot.writeFieldStop();
6864 oprot.writeStructEnd();
6869 private static class pushRoute_argsTupleSchemeFactory implements SchemeFactory {
6870 public pushRoute_argsTupleScheme getScheme() {
6871 return new pushRoute_argsTupleScheme();
6875 private static class pushRoute_argsTupleScheme extends TupleScheme<pushRoute_args> {
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()) {
6884 if (struct.isSetNexthop()) {
6887 if (struct.isSetRd()) {
6890 if (struct.isSetLabel()) {
6893 oprot.writeBitSet(optionals, 4);
6894 if (struct.isSetPrefix()) {
6895 oprot.writeString(struct.prefix);
6897 if (struct.isSetNexthop()) {
6898 oprot.writeString(struct.nexthop);
6900 if (struct.isSetRd()) {
6901 oprot.writeString(struct.rd);
6903 if (struct.isSetLabel()) {
6904 oprot.writeI32(struct.label);
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);
6916 if (incoming.get(1)) {
6917 struct.nexthop = iprot.readString();
6918 struct.setNexthopIsSet(true);
6920 if (incoming.get(2)) {
6921 struct.rd = iprot.readString();
6922 struct.setRdIsSet(true);
6924 if (incoming.get(3)) {
6925 struct.label = iprot.readI32();
6926 struct.setLabelIsSet(true);
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");
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);
6938 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
6940 schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory());
6941 schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory());
6944 public int success; // required
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");
6950 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6953 for (_Fields field : EnumSet.allOf(_Fields.class)) {
6954 byName.put(field.getFieldName(), field);
6959 * Find the _Fields constant that matches fieldId, or null if its not found.
6961 public static _Fields findByThriftId(int fieldId) {
6971 * Find the _Fields constant that matches fieldId, throwing an exception
6972 * if it is not found.
6974 public static _Fields findByThriftIdOrThrow(int fieldId) {
6975 _Fields fields = findByThriftId(fieldId);
6976 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6981 * Find the _Fields constant that matches name, or null if its not found.
6983 public static _Fields findByName(String name) {
6984 return byName.get(name);
6987 private final short _thriftId;
6988 private final String _fieldName;
6990 _Fields(short thriftId, String fieldName) {
6991 _thriftId = thriftId;
6992 _fieldName = fieldName;
6995 public short getThriftFieldId() {
6999 public String getFieldName() {
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;
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);
7016 public pushRoute_result() {
7019 public pushRoute_result(
7023 this.success = success;
7024 setSuccessIsSet(true);
7028 * Performs a deep copy on <i>other</i>.
7030 public pushRoute_result(pushRoute_result other) {
7031 __isset_bitfield = other.__isset_bitfield;
7032 this.success = other.success;
7035 public pushRoute_result deepCopy() {
7036 return new pushRoute_result(this);
7040 public void clear() {
7041 setSuccessIsSet(false);
7045 public int getSuccess() {
7046 return this.success;
7049 public pushRoute_result setSuccess(int success) {
7050 this.success = success;
7051 setSuccessIsSet(true);
7055 public void unsetSuccess() {
7056 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
7064 public void setSuccessIsSet(boolean value) {
7065 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
7068 public void setFieldValue(_Fields field, Object value) {
7071 if (value == null) {
7074 setSuccess((Integer)value);
7081 public Object getFieldValue(_Fields field) {
7084 return Integer.valueOf(getSuccess());
7087 throw new IllegalStateException();
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();
7098 return isSetSuccess();
7100 throw new IllegalStateException();
7104 public boolean equals(Object that) {
7107 if (that instanceof pushRoute_result)
7108 return this.equals((pushRoute_result)that);
7112 public boolean equals(pushRoute_result that) {
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))
7121 if (this.success != that.success)
7129 public int hashCode() {
7134 public int compareTo(pushRoute_result other) {
7135 if (!getClass().equals(other.getClass())) {
7136 return getClass().getName().compareTo(other.getClass().getName());
7139 int lastComparison = 0;
7141 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
7142 if (lastComparison != 0) {
7143 return lastComparison;
7145 if (isSetSuccess()) {
7146 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
7147 if (lastComparison != 0) {
7148 return lastComparison;
7154 public _Fields fieldForId(int fieldId) {
7155 return _Fields.findByThriftId(fieldId);
7158 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7159 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
7162 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7163 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
7167 public String toString() {
7168 StringBuilder sb = new StringBuilder("pushRoute_result(");
7169 boolean first = true;
7171 sb.append("success:");
7172 sb.append(this.success);
7175 return sb.toString();
7178 public void validate() throws org.apache.thrift.TException {
7179 // check for required fields
7180 // check for sub-struct validity
7183 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
7191 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
7201 private static class pushRoute_resultStandardSchemeFactory implements SchemeFactory {
7202 public pushRoute_resultStandardScheme getScheme() {
7203 return new pushRoute_resultStandardScheme();
7207 private static class pushRoute_resultStandardScheme extends StandardScheme<pushRoute_result> {
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();
7214 schemeField = iprot.readFieldBegin();
7215 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
7218 switch (schemeField.id) {
7220 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
7221 struct.success = iprot.readI32();
7222 struct.setSuccessIsSet(true);
7224 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7228 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7230 iprot.readFieldEnd();
7232 iprot.readStructEnd();
7234 // check for required fields of primitive type, which can't be checked in the validate method
7238 public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_result struct) throws org.apache.thrift.TException {
7241 oprot.writeStructBegin(STRUCT_DESC);
7242 if (struct.isSetSuccess()) {
7243 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7244 oprot.writeI32(struct.success);
7245 oprot.writeFieldEnd();
7247 oprot.writeFieldStop();
7248 oprot.writeStructEnd();
7253 private static class pushRoute_resultTupleSchemeFactory implements SchemeFactory {
7254 public pushRoute_resultTupleScheme getScheme() {
7255 return new pushRoute_resultTupleScheme();
7259 private static class pushRoute_resultTupleScheme extends TupleScheme<pushRoute_result> {
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()) {
7268 oprot.writeBitSet(optionals, 1);
7269 if (struct.isSetSuccess()) {
7270 oprot.writeI32(struct.success);
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);
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");
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);
7293 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
7295 schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory());
7296 schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory());
7299 public String prefix; // required
7300 public String rd; // required
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"),
7307 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7310 for (_Fields field : EnumSet.allOf(_Fields.class)) {
7311 byName.put(field.getFieldName(), field);
7316 * Find the _Fields constant that matches fieldId, or null if its not found.
7318 public static _Fields findByThriftId(int fieldId) {
7330 * Find the _Fields constant that matches fieldId, throwing an exception
7331 * if it is not found.
7333 public static _Fields findByThriftIdOrThrow(int fieldId) {
7334 _Fields fields = findByThriftId(fieldId);
7335 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7340 * Find the _Fields constant that matches name, or null if its not found.
7342 public static _Fields findByName(String name) {
7343 return byName.get(name);
7346 private final short _thriftId;
7347 private final String _fieldName;
7349 _Fields(short thriftId, String fieldName) {
7350 _thriftId = thriftId;
7351 _fieldName = fieldName;
7354 public short getThriftFieldId() {
7358 public String getFieldName() {
7363 // isset id assignments
7364 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
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);
7375 public withdrawRoute_args() {
7378 public withdrawRoute_args(
7383 this.prefix = prefix;
7388 * Performs a deep copy on <i>other</i>.
7390 public withdrawRoute_args(withdrawRoute_args other) {
7391 if (other.isSetPrefix()) {
7392 this.prefix = other.prefix;
7394 if (other.isSetRd()) {
7399 public withdrawRoute_args deepCopy() {
7400 return new withdrawRoute_args(this);
7404 public void clear() {
7409 public String getPrefix() {
7413 public withdrawRoute_args setPrefix(String prefix) {
7414 this.prefix = prefix;
7418 public void unsetPrefix() {
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;
7427 public void setPrefixIsSet(boolean value) {
7433 public String getRd() {
7437 public withdrawRoute_args setRd(String rd) {
7442 public void unsetRd() {
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;
7451 public void setRdIsSet(boolean value) {
7457 public void setFieldValue(_Fields field, Object value) {
7460 if (value == null) {
7463 setPrefix((String)value);
7468 if (value == null) {
7471 setRd((String)value);
7478 public Object getFieldValue(_Fields field) {
7487 throw new IllegalStateException();
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();
7498 return isSetPrefix();
7502 throw new IllegalStateException();
7506 public boolean equals(Object that) {
7509 if (that instanceof withdrawRoute_args)
7510 return this.equals((withdrawRoute_args)that);
7514 public boolean equals(withdrawRoute_args that) {
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))
7523 if (!this.prefix.equals(that.prefix))
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))
7532 if (!this.rd.equals(that.rd))
7540 public int hashCode() {
7545 public int compareTo(withdrawRoute_args other) {
7546 if (!getClass().equals(other.getClass())) {
7547 return getClass().getName().compareTo(other.getClass().getName());
7550 int lastComparison = 0;
7552 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
7553 if (lastComparison != 0) {
7554 return lastComparison;
7556 if (isSetPrefix()) {
7557 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
7558 if (lastComparison != 0) {
7559 return lastComparison;
7562 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
7563 if (lastComparison != 0) {
7564 return lastComparison;
7567 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
7568 if (lastComparison != 0) {
7569 return lastComparison;
7575 public _Fields fieldForId(int fieldId) {
7576 return _Fields.findByThriftId(fieldId);
7579 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7580 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
7583 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7584 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
7588 public String toString() {
7589 StringBuilder sb = new StringBuilder("withdrawRoute_args(");
7590 boolean first = true;
7592 sb.append("prefix:");
7593 if (this.prefix == null) {
7596 sb.append(this.prefix);
7599 if (!first) sb.append(", ");
7601 if (this.rd == null) {
7608 return sb.toString();
7611 public void validate() throws org.apache.thrift.TException {
7612 // check for required fields
7613 // check for sub-struct validity
7616 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
7624 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
7632 private static class withdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
7633 public withdrawRoute_argsStandardScheme getScheme() {
7634 return new withdrawRoute_argsStandardScheme();
7638 private static class withdrawRoute_argsStandardScheme extends StandardScheme<withdrawRoute_args> {
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();
7645 schemeField = iprot.readFieldBegin();
7646 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
7649 switch (schemeField.id) {
7651 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
7652 struct.prefix = iprot.readString();
7653 struct.setPrefixIsSet(true);
7655 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7659 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
7660 struct.rd = iprot.readString();
7661 struct.setRdIsSet(true);
7663 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7667 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
7669 iprot.readFieldEnd();
7671 iprot.readStructEnd();
7673 // check for required fields of primitive type, which can't be checked in the validate method
7677 public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
7680 oprot.writeStructBegin(STRUCT_DESC);
7681 if (struct.prefix != null) {
7682 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
7683 oprot.writeString(struct.prefix);
7684 oprot.writeFieldEnd();
7686 if (struct.rd != null) {
7687 oprot.writeFieldBegin(RD_FIELD_DESC);
7688 oprot.writeString(struct.rd);
7689 oprot.writeFieldEnd();
7691 oprot.writeFieldStop();
7692 oprot.writeStructEnd();
7697 private static class withdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
7698 public withdrawRoute_argsTupleScheme getScheme() {
7699 return new withdrawRoute_argsTupleScheme();
7703 private static class withdrawRoute_argsTupleScheme extends TupleScheme<withdrawRoute_args> {
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()) {
7712 if (struct.isSetRd()) {
7715 oprot.writeBitSet(optionals, 2);
7716 if (struct.isSetPrefix()) {
7717 oprot.writeString(struct.prefix);
7719 if (struct.isSetRd()) {
7720 oprot.writeString(struct.rd);
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);
7732 if (incoming.get(1)) {
7733 struct.rd = iprot.readString();
7734 struct.setRdIsSet(true);
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");
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);
7746 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
7748 schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory());
7749 schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory());
7752 public int success; // required
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");
7758 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7761 for (_Fields field : EnumSet.allOf(_Fields.class)) {
7762 byName.put(field.getFieldName(), field);
7767 * Find the _Fields constant that matches fieldId, or null if its not found.
7769 public static _Fields findByThriftId(int fieldId) {
7779 * Find the _Fields constant that matches fieldId, throwing an exception
7780 * if it is not found.
7782 public static _Fields findByThriftIdOrThrow(int fieldId) {
7783 _Fields fields = findByThriftId(fieldId);
7784 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7789 * Find the _Fields constant that matches name, or null if its not found.
7791 public static _Fields findByName(String name) {
7792 return byName.get(name);
7795 private final short _thriftId;
7796 private final String _fieldName;
7798 _Fields(short thriftId, String fieldName) {
7799 _thriftId = thriftId;
7800 _fieldName = fieldName;
7803 public short getThriftFieldId() {
7807 public String getFieldName() {
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;
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);
7824 public withdrawRoute_result() {
7827 public withdrawRoute_result(
7831 this.success = success;
7832 setSuccessIsSet(true);
7836 * Performs a deep copy on <i>other</i>.
7838 public withdrawRoute_result(withdrawRoute_result other) {
7839 __isset_bitfield = other.__isset_bitfield;
7840 this.success = other.success;
7843 public withdrawRoute_result deepCopy() {
7844 return new withdrawRoute_result(this);
7848 public void clear() {
7849 setSuccessIsSet(false);
7853 public int getSuccess() {
7854 return this.success;
7857 public withdrawRoute_result setSuccess(int success) {
7858 this.success = success;
7859 setSuccessIsSet(true);
7863 public void unsetSuccess() {
7864 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
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);
7872 public void setSuccessIsSet(boolean value) {
7873 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
7876 public void setFieldValue(_Fields field, Object value) {
7879 if (value == null) {
7882 setSuccess((Integer)value);
7889 public Object getFieldValue(_Fields field) {
7892 return Integer.valueOf(getSuccess());
7895 throw new IllegalStateException();
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();
7906 return isSetSuccess();
7908 throw new IllegalStateException();
7912 public boolean equals(Object that) {
7915 if (that instanceof withdrawRoute_result)
7916 return this.equals((withdrawRoute_result)that);
7920 public boolean equals(withdrawRoute_result that) {
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))
7929 if (this.success != that.success)
7937 public int hashCode() {
7942 public int compareTo(withdrawRoute_result other) {
7943 if (!getClass().equals(other.getClass())) {
7944 return getClass().getName().compareTo(other.getClass().getName());
7947 int lastComparison = 0;
7949 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
7950 if (lastComparison != 0) {
7951 return lastComparison;
7953 if (isSetSuccess()) {
7954 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
7955 if (lastComparison != 0) {
7956 return lastComparison;
7962 public _Fields fieldForId(int fieldId) {
7963 return _Fields.findByThriftId(fieldId);
7966 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7967 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
7970 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7971 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
7975 public String toString() {
7976 StringBuilder sb = new StringBuilder("withdrawRoute_result(");
7977 boolean first = true;
7979 sb.append("success:");
7980 sb.append(this.success);
7983 return sb.toString();
7986 public void validate() throws org.apache.thrift.TException {
7987 // check for required fields
7988 // check for sub-struct validity
7991 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
7999 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
8009 private static class withdrawRoute_resultStandardSchemeFactory implements SchemeFactory {
8010 public withdrawRoute_resultStandardScheme getScheme() {
8011 return new withdrawRoute_resultStandardScheme();
8015 private static class withdrawRoute_resultStandardScheme extends StandardScheme<withdrawRoute_result> {
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();
8022 schemeField = iprot.readFieldBegin();
8023 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
8026 switch (schemeField.id) {
8028 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
8029 struct.success = iprot.readI32();
8030 struct.setSuccessIsSet(true);
8032 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8036 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8038 iprot.readFieldEnd();
8040 iprot.readStructEnd();
8042 // check for required fields of primitive type, which can't be checked in the validate method
8046 public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
8049 oprot.writeStructBegin(STRUCT_DESC);
8050 if (struct.isSetSuccess()) {
8051 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8052 oprot.writeI32(struct.success);
8053 oprot.writeFieldEnd();
8055 oprot.writeFieldStop();
8056 oprot.writeStructEnd();
8061 private static class withdrawRoute_resultTupleSchemeFactory implements SchemeFactory {
8062 public withdrawRoute_resultTupleScheme getScheme() {
8063 return new withdrawRoute_resultTupleScheme();
8067 private static class withdrawRoute_resultTupleScheme extends TupleScheme<withdrawRoute_result> {
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()) {
8076 oprot.writeBitSet(optionals, 1);
8077 if (struct.isSetSuccess()) {
8078 oprot.writeI32(struct.success);
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);
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");
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);
8101 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
8103 schemes.put(StandardScheme.class, new getRoutes_argsStandardSchemeFactory());
8104 schemes.put(TupleScheme.class, new getRoutes_argsTupleSchemeFactory());
8107 public int optype; // required
8108 public int winSize; // required
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");
8115 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8118 for (_Fields field : EnumSet.allOf(_Fields.class)) {
8119 byName.put(field.getFieldName(), field);
8124 * Find the _Fields constant that matches fieldId, or null if its not found.
8126 public static _Fields findByThriftId(int fieldId) {
8138 * Find the _Fields constant that matches fieldId, throwing an exception
8139 * if it is not found.
8141 public static _Fields findByThriftIdOrThrow(int fieldId) {
8142 _Fields fields = findByThriftId(fieldId);
8143 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8148 * Find the _Fields constant that matches name, or null if its not found.
8150 public static _Fields findByName(String name) {
8151 return byName.get(name);
8154 private final short _thriftId;
8155 private final String _fieldName;
8157 _Fields(short thriftId, String fieldName) {
8158 _thriftId = thriftId;
8159 _fieldName = fieldName;
8162 public short getThriftFieldId() {
8166 public String getFieldName() {
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;
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);
8186 public getRoutes_args() {
8189 public getRoutes_args(
8194 this.optype = optype;
8195 setOptypeIsSet(true);
8196 this.winSize = winSize;
8197 setWinSizeIsSet(true);
8201 * Performs a deep copy on <i>other</i>.
8203 public getRoutes_args(getRoutes_args other) {
8204 __isset_bitfield = other.__isset_bitfield;
8205 this.optype = other.optype;
8206 this.winSize = other.winSize;
8209 public getRoutes_args deepCopy() {
8210 return new getRoutes_args(this);
8214 public void clear() {
8215 setOptypeIsSet(false);
8217 setWinSizeIsSet(false);
8221 public int getOptype() {
8225 public getRoutes_args setOptype(int optype) {
8226 this.optype = optype;
8227 setOptypeIsSet(true);
8231 public void unsetOptype() {
8232 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPTYPE_ISSET_ID);
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);
8240 public void setOptypeIsSet(boolean value) {
8241 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPTYPE_ISSET_ID, value);
8244 public int getWinSize() {
8245 return this.winSize;
8248 public getRoutes_args setWinSize(int winSize) {
8249 this.winSize = winSize;
8250 setWinSizeIsSet(true);
8254 public void unsetWinSize() {
8255 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WINSIZE_ISSET_ID);
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);
8263 public void setWinSizeIsSet(boolean value) {
8264 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WINSIZE_ISSET_ID, value);
8267 public void setFieldValue(_Fields field, Object value) {
8270 if (value == null) {
8273 setOptype((Integer)value);
8278 if (value == null) {
8281 setWinSize((Integer)value);
8288 public Object getFieldValue(_Fields field) {
8291 return Integer.valueOf(getOptype());
8294 return Integer.valueOf(getWinSize());
8297 throw new IllegalStateException();
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();
8308 return isSetOptype();
8310 return isSetWinSize();
8312 throw new IllegalStateException();
8316 public boolean equals(Object that) {
8319 if (that instanceof getRoutes_args)
8320 return this.equals((getRoutes_args)that);
8324 public boolean equals(getRoutes_args that) {
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))
8333 if (this.optype != that.optype)
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))
8342 if (this.winSize != that.winSize)
8350 public int hashCode() {
8355 public int compareTo(getRoutes_args other) {
8356 if (!getClass().equals(other.getClass())) {
8357 return getClass().getName().compareTo(other.getClass().getName());
8360 int lastComparison = 0;
8362 lastComparison = Boolean.valueOf(isSetOptype()).compareTo(other.isSetOptype());
8363 if (lastComparison != 0) {
8364 return lastComparison;
8366 if (isSetOptype()) {
8367 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.optype, other.optype);
8368 if (lastComparison != 0) {
8369 return lastComparison;
8372 lastComparison = Boolean.valueOf(isSetWinSize()).compareTo(other.isSetWinSize());
8373 if (lastComparison != 0) {
8374 return lastComparison;
8376 if (isSetWinSize()) {
8377 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.winSize, other.winSize);
8378 if (lastComparison != 0) {
8379 return lastComparison;
8385 public _Fields fieldForId(int fieldId) {
8386 return _Fields.findByThriftId(fieldId);
8389 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8390 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
8393 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8394 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
8398 public String toString() {
8399 StringBuilder sb = new StringBuilder("getRoutes_args(");
8400 boolean first = true;
8402 sb.append("optype:");
8403 sb.append(this.optype);
8405 if (!first) sb.append(", ");
8406 sb.append("winSize:");
8407 sb.append(this.winSize);
8410 return sb.toString();
8413 public void validate() throws org.apache.thrift.TException {
8414 // check for required fields
8415 // check for sub-struct validity
8418 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
8426 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
8436 private static class getRoutes_argsStandardSchemeFactory implements SchemeFactory {
8437 public getRoutes_argsStandardScheme getScheme() {
8438 return new getRoutes_argsStandardScheme();
8442 private static class getRoutes_argsStandardScheme extends StandardScheme<getRoutes_args> {
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();
8449 schemeField = iprot.readFieldBegin();
8450 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
8453 switch (schemeField.id) {
8455 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
8456 struct.optype = iprot.readI32();
8457 struct.setOptypeIsSet(true);
8459 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8463 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
8464 struct.winSize = iprot.readI32();
8465 struct.setWinSizeIsSet(true);
8467 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8471 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8473 iprot.readFieldEnd();
8475 iprot.readStructEnd();
8477 // check for required fields of primitive type, which can't be checked in the validate method
8481 public void write(org.apache.thrift.protocol.TProtocol oprot, getRoutes_args struct) throws org.apache.thrift.TException {
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();
8497 private static class getRoutes_argsTupleSchemeFactory implements SchemeFactory {
8498 public getRoutes_argsTupleScheme getScheme() {
8499 return new getRoutes_argsTupleScheme();
8503 private static class getRoutes_argsTupleScheme extends TupleScheme<getRoutes_args> {
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()) {
8512 if (struct.isSetWinSize()) {
8515 oprot.writeBitSet(optionals, 2);
8516 if (struct.isSetOptype()) {
8517 oprot.writeI32(struct.optype);
8519 if (struct.isSetWinSize()) {
8520 oprot.writeI32(struct.winSize);
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);
8532 if (incoming.get(1)) {
8533 struct.winSize = iprot.readI32();
8534 struct.setWinSizeIsSet(true);
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");
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);
8546 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
8548 schemes.put(StandardScheme.class, new getRoutes_resultStandardSchemeFactory());
8549 schemes.put(TupleScheme.class, new getRoutes_resultTupleSchemeFactory());
8552 public Routes success; // required
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");
8558 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8561 for (_Fields field : EnumSet.allOf(_Fields.class)) {
8562 byName.put(field.getFieldName(), field);
8567 * Find the _Fields constant that matches fieldId, or null if its not found.
8569 public static _Fields findByThriftId(int fieldId) {
8579 * Find the _Fields constant that matches fieldId, throwing an exception
8580 * if it is not found.
8582 public static _Fields findByThriftIdOrThrow(int fieldId) {
8583 _Fields fields = findByThriftId(fieldId);
8584 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8589 * Find the _Fields constant that matches name, or null if its not found.
8591 public static _Fields findByName(String name) {
8592 return byName.get(name);
8595 private final short _thriftId;
8596 private final String _fieldName;
8598 _Fields(short thriftId, String fieldName) {
8599 _thriftId = thriftId;
8600 _fieldName = fieldName;
8603 public short getThriftFieldId() {
8607 public String getFieldName() {
8612 // isset id assignments
8613 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
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);
8622 public getRoutes_result() {
8625 public getRoutes_result(
8629 this.success = success;
8633 * Performs a deep copy on <i>other</i>.
8635 public getRoutes_result(getRoutes_result other) {
8636 if (other.isSetSuccess()) {
8637 this.success = new Routes(other.success);
8641 public getRoutes_result deepCopy() {
8642 return new getRoutes_result(this);
8646 public void clear() {
8647 this.success = null;
8650 public Routes getSuccess() {
8651 return this.success;
8654 public getRoutes_result setSuccess(Routes success) {
8655 this.success = success;
8659 public void unsetSuccess() {
8660 this.success = null;
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;
8668 public void setSuccessIsSet(boolean value) {
8670 this.success = null;
8674 public void setFieldValue(_Fields field, Object value) {
8677 if (value == null) {
8680 setSuccess((Routes)value);
8687 public Object getFieldValue(_Fields field) {
8690 return getSuccess();
8693 throw new IllegalStateException();
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();
8704 return isSetSuccess();
8706 throw new IllegalStateException();
8710 public boolean equals(Object that) {
8713 if (that instanceof getRoutes_result)
8714 return this.equals((getRoutes_result)that);
8718 public boolean equals(getRoutes_result that) {
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))
8727 if (!this.success.equals(that.success))
8735 public int hashCode() {
8740 public int compareTo(getRoutes_result other) {
8741 if (!getClass().equals(other.getClass())) {
8742 return getClass().getName().compareTo(other.getClass().getName());
8745 int lastComparison = 0;
8747 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
8748 if (lastComparison != 0) {
8749 return lastComparison;
8751 if (isSetSuccess()) {
8752 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
8753 if (lastComparison != 0) {
8754 return lastComparison;
8760 public _Fields fieldForId(int fieldId) {
8761 return _Fields.findByThriftId(fieldId);
8764 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8765 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
8768 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8769 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
8773 public String toString() {
8774 StringBuilder sb = new StringBuilder("getRoutes_result(");
8775 boolean first = true;
8777 sb.append("success:");
8778 if (this.success == null) {
8781 sb.append(this.success);
8785 return sb.toString();
8788 public void validate() throws org.apache.thrift.TException {
8789 // check for required fields
8790 // check for sub-struct validity
8791 if (success != null) {
8796 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
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);
8804 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
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);
8812 private static class getRoutes_resultStandardSchemeFactory implements SchemeFactory {
8813 public getRoutes_resultStandardScheme getScheme() {
8814 return new getRoutes_resultStandardScheme();
8818 private static class getRoutes_resultStandardScheme extends StandardScheme<getRoutes_result> {
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();
8825 schemeField = iprot.readFieldBegin();
8826 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
8829 switch (schemeField.id) {
8831 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
8832 struct.success = new Routes();
8833 struct.success.read(iprot);
8834 struct.setSuccessIsSet(true);
8836 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8840 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
8842 iprot.readFieldEnd();
8844 iprot.readStructEnd();
8846 // check for required fields of primitive type, which can't be checked in the validate method
8850 public void write(org.apache.thrift.protocol.TProtocol oprot, getRoutes_result struct) throws org.apache.thrift.TException {
8853 oprot.writeStructBegin(STRUCT_DESC);
8854 if (struct.success != null) {
8855 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8856 struct.success.write(oprot);
8857 oprot.writeFieldEnd();
8859 oprot.writeFieldStop();
8860 oprot.writeStructEnd();
8865 private static class getRoutes_resultTupleSchemeFactory implements SchemeFactory {
8866 public getRoutes_resultTupleScheme getScheme() {
8867 return new getRoutes_resultTupleScheme();
8871 private static class getRoutes_resultTupleScheme extends TupleScheme<getRoutes_result> {
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()) {
8880 oprot.writeBitSet(optionals, 1);
8881 if (struct.isSetSuccess()) {
8882 struct.success.write(oprot);
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);