SENTRY-2192: supress date value in @Generated annotation generated by thrift.(Kalyan...
[sentry.git] / sentry-provider / sentry-provider-db / src / gen / thrift / gen-javabean / org / apache / sentry / provider / db / generic / service / thrift / TRenamePrivilegesRequest.java
1 /**
2 * Autogenerated by Thrift Compiler (0.9.3)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7 package org.apache.sentry.provider.db.generic.service.thrift;
8
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
12
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import org.apache.thrift.protocol.TProtocolException;
16 import org.apache.thrift.EncodingUtils;
17 import org.apache.thrift.TException;
18 import org.apache.thrift.async.AsyncMethodCallback;
19 import org.apache.thrift.server.AbstractNonblockingServer.*;
20 import java.util.List;
21 import java.util.ArrayList;
22 import java.util.Map;
23 import java.util.HashMap;
24 import java.util.EnumMap;
25 import java.util.Set;
26 import java.util.HashSet;
27 import java.util.EnumSet;
28 import java.util.Collections;
29 import java.util.BitSet;
30 import java.nio.ByteBuffer;
31 import java.util.Arrays;
32 import javax.annotation.Generated;
33 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory;
35
36 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
37 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
38 public class TRenamePrivilegesRequest implements org.apache.thrift.TBase<TRenamePrivilegesRequest, TRenamePrivilegesRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TRenamePrivilegesRequest> {
39 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRenamePrivilegesRequest");
40
41 private static final org.apache.thrift.protocol.TField PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_version", org.apache.thrift.protocol.TType.I32, (short)1);
42 private static final org.apache.thrift.protocol.TField REQUESTOR_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorUserName", org.apache.thrift.protocol.TType.STRING, (short)2);
43 private static final org.apache.thrift.protocol.TField COMPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("component", org.apache.thrift.protocol.TType.STRING, (short)3);
44 private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceName", org.apache.thrift.protocol.TType.STRING, (short)4);
45 private static final org.apache.thrift.protocol.TField OLD_AUTHORIZABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("oldAuthorizables", org.apache.thrift.protocol.TType.LIST, (short)5);
46 private static final org.apache.thrift.protocol.TField NEW_AUTHORIZABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("newAuthorizables", org.apache.thrift.protocol.TType.LIST, (short)6);
47
48 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
49 static {
50 schemes.put(StandardScheme.class, new TRenamePrivilegesRequestStandardSchemeFactory());
51 schemes.put(TupleScheme.class, new TRenamePrivilegesRequestTupleSchemeFactory());
52 }
53
54 private int protocol_version; // required
55 private String requestorUserName; // required
56 private String component; // required
57 private String serviceName; // required
58 private List<TAuthorizable> oldAuthorizables; // required
59 private List<TAuthorizable> newAuthorizables; // required
60
61 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63 PROTOCOL_VERSION((short)1, "protocol_version"),
64 REQUESTOR_USER_NAME((short)2, "requestorUserName"),
65 COMPONENT((short)3, "component"),
66 SERVICE_NAME((short)4, "serviceName"),
67 OLD_AUTHORIZABLES((short)5, "oldAuthorizables"),
68 NEW_AUTHORIZABLES((short)6, "newAuthorizables");
69
70 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
71
72 static {
73 for (_Fields field : EnumSet.allOf(_Fields.class)) {
74 byName.put(field.getFieldName(), field);
75 }
76 }
77
78 /**
79 * Find the _Fields constant that matches fieldId, or null if its not found.
80 */
81 public static _Fields findByThriftId(int fieldId) {
82 switch(fieldId) {
83 case 1: // PROTOCOL_VERSION
84 return PROTOCOL_VERSION;
85 case 2: // REQUESTOR_USER_NAME
86 return REQUESTOR_USER_NAME;
87 case 3: // COMPONENT
88 return COMPONENT;
89 case 4: // SERVICE_NAME
90 return SERVICE_NAME;
91 case 5: // OLD_AUTHORIZABLES
92 return OLD_AUTHORIZABLES;
93 case 6: // NEW_AUTHORIZABLES
94 return NEW_AUTHORIZABLES;
95 default:
96 return null;
97 }
98 }
99
100 /**
101 * Find the _Fields constant that matches fieldId, throwing an exception
102 * if it is not found.
103 */
104 public static _Fields findByThriftIdOrThrow(int fieldId) {
105 _Fields fields = findByThriftId(fieldId);
106 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
107 return fields;
108 }
109
110 /**
111 * Find the _Fields constant that matches name, or null if its not found.
112 */
113 public static _Fields findByName(String name) {
114 return byName.get(name);
115 }
116
117 private final short _thriftId;
118 private final String _fieldName;
119
120 _Fields(short thriftId, String fieldName) {
121 _thriftId = thriftId;
122 _fieldName = fieldName;
123 }
124
125 public short getThriftFieldId() {
126 return _thriftId;
127 }
128
129 public String getFieldName() {
130 return _fieldName;
131 }
132 }
133
134 // isset id assignments
135 private static final int __PROTOCOL_VERSION_ISSET_ID = 0;
136 private byte __isset_bitfield = 0;
137 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
138 static {
139 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
140 tmpMap.put(_Fields.PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("protocol_version", org.apache.thrift.TFieldRequirementType.REQUIRED,
141 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
142 tmpMap.put(_Fields.REQUESTOR_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorUserName", org.apache.thrift.TFieldRequirementType.REQUIRED,
143 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
144 tmpMap.put(_Fields.COMPONENT, new org.apache.thrift.meta_data.FieldMetaData("component", org.apache.thrift.TFieldRequirementType.REQUIRED,
145 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
146 tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("serviceName", org.apache.thrift.TFieldRequirementType.REQUIRED,
147 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
148 tmpMap.put(_Fields.OLD_AUTHORIZABLES, new org.apache.thrift.meta_data.FieldMetaData("oldAuthorizables", org.apache.thrift.TFieldRequirementType.REQUIRED,
149 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
150 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizable.class))));
151 tmpMap.put(_Fields.NEW_AUTHORIZABLES, new org.apache.thrift.meta_data.FieldMetaData("newAuthorizables", org.apache.thrift.TFieldRequirementType.REQUIRED,
152 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
153 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizable.class))));
154 metaDataMap = Collections.unmodifiableMap(tmpMap);
155 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRenamePrivilegesRequest.class, metaDataMap);
156 }
157
158 public TRenamePrivilegesRequest() {
159 this.protocol_version = 2;
160
161 }
162
163 public TRenamePrivilegesRequest(
164 int protocol_version,
165 String requestorUserName,
166 String component,
167 String serviceName,
168 List<TAuthorizable> oldAuthorizables,
169 List<TAuthorizable> newAuthorizables)
170 {
171 this();
172 this.protocol_version = protocol_version;
173 setProtocol_versionIsSet(true);
174 this.requestorUserName = requestorUserName;
175 this.component = component;
176 this.serviceName = serviceName;
177 this.oldAuthorizables = oldAuthorizables;
178 this.newAuthorizables = newAuthorizables;
179 }
180
181 /**
182 * Performs a deep copy on <i>other</i>.
183 */
184 public TRenamePrivilegesRequest(TRenamePrivilegesRequest other) {
185 __isset_bitfield = other.__isset_bitfield;
186 this.protocol_version = other.protocol_version;
187 if (other.isSetRequestorUserName()) {
188 this.requestorUserName = other.requestorUserName;
189 }
190 if (other.isSetComponent()) {
191 this.component = other.component;
192 }
193 if (other.isSetServiceName()) {
194 this.serviceName = other.serviceName;
195 }
196 if (other.isSetOldAuthorizables()) {
197 List<TAuthorizable> __this__oldAuthorizables = new ArrayList<TAuthorizable>(other.oldAuthorizables.size());
198 for (TAuthorizable other_element : other.oldAuthorizables) {
199 __this__oldAuthorizables.add(new TAuthorizable(other_element));
200 }
201 this.oldAuthorizables = __this__oldAuthorizables;
202 }
203 if (other.isSetNewAuthorizables()) {
204 List<TAuthorizable> __this__newAuthorizables = new ArrayList<TAuthorizable>(other.newAuthorizables.size());
205 for (TAuthorizable other_element : other.newAuthorizables) {
206 __this__newAuthorizables.add(new TAuthorizable(other_element));
207 }
208 this.newAuthorizables = __this__newAuthorizables;
209 }
210 }
211
212 public TRenamePrivilegesRequest deepCopy() {
213 return new TRenamePrivilegesRequest(this);
214 }
215
216 @Override
217 public void clear() {
218 this.protocol_version = 2;
219
220 this.requestorUserName = null;
221 this.component = null;
222 this.serviceName = null;
223 this.oldAuthorizables = null;
224 this.newAuthorizables = null;
225 }
226
227 public int getProtocol_version() {
228 return this.protocol_version;
229 }
230
231 public void setProtocol_version(int protocol_version) {
232 this.protocol_version = protocol_version;
233 setProtocol_versionIsSet(true);
234 }
235
236 public void unsetProtocol_version() {
237 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID);
238 }
239
240 /** Returns true if field protocol_version is set (has been assigned a value) and false otherwise */
241 public boolean isSetProtocol_version() {
242 return EncodingUtils.testBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID);
243 }
244
245 public void setProtocol_versionIsSet(boolean value) {
246 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID, value);
247 }
248
249 public String getRequestorUserName() {
250 return this.requestorUserName;
251 }
252
253 public void setRequestorUserName(String requestorUserName) {
254 this.requestorUserName = requestorUserName;
255 }
256
257 public void unsetRequestorUserName() {
258 this.requestorUserName = null;
259 }
260
261 /** Returns true if field requestorUserName is set (has been assigned a value) and false otherwise */
262 public boolean isSetRequestorUserName() {
263 return this.requestorUserName != null;
264 }
265
266 public void setRequestorUserNameIsSet(boolean value) {
267 if (!value) {
268 this.requestorUserName = null;
269 }
270 }
271
272 public String getComponent() {
273 return this.component;
274 }
275
276 public void setComponent(String component) {
277 this.component = component;
278 }
279
280 public void unsetComponent() {
281 this.component = null;
282 }
283
284 /** Returns true if field component is set (has been assigned a value) and false otherwise */
285 public boolean isSetComponent() {
286 return this.component != null;
287 }
288
289 public void setComponentIsSet(boolean value) {
290 if (!value) {
291 this.component = null;
292 }
293 }
294
295 public String getServiceName() {
296 return this.serviceName;
297 }
298
299 public void setServiceName(String serviceName) {
300 this.serviceName = serviceName;
301 }
302
303 public void unsetServiceName() {
304 this.serviceName = null;
305 }
306
307 /** Returns true if field serviceName is set (has been assigned a value) and false otherwise */
308 public boolean isSetServiceName() {
309 return this.serviceName != null;
310 }
311
312 public void setServiceNameIsSet(boolean value) {
313 if (!value) {
314 this.serviceName = null;
315 }
316 }
317
318 public int getOldAuthorizablesSize() {
319 return (this.oldAuthorizables == null) ? 0 : this.oldAuthorizables.size();
320 }
321
322 public java.util.Iterator<TAuthorizable> getOldAuthorizablesIterator() {
323 return (this.oldAuthorizables == null) ? null : this.oldAuthorizables.iterator();
324 }
325
326 public void addToOldAuthorizables(TAuthorizable elem) {
327 if (this.oldAuthorizables == null) {
328 this.oldAuthorizables = new ArrayList<TAuthorizable>();
329 }
330 this.oldAuthorizables.add(elem);
331 }
332
333 public List<TAuthorizable> getOldAuthorizables() {
334 return this.oldAuthorizables;
335 }
336
337 public void setOldAuthorizables(List<TAuthorizable> oldAuthorizables) {
338 this.oldAuthorizables = oldAuthorizables;
339 }
340
341 public void unsetOldAuthorizables() {
342 this.oldAuthorizables = null;
343 }
344
345 /** Returns true if field oldAuthorizables is set (has been assigned a value) and false otherwise */
346 public boolean isSetOldAuthorizables() {
347 return this.oldAuthorizables != null;
348 }
349
350 public void setOldAuthorizablesIsSet(boolean value) {
351 if (!value) {
352 this.oldAuthorizables = null;
353 }
354 }
355
356 public int getNewAuthorizablesSize() {
357 return (this.newAuthorizables == null) ? 0 : this.newAuthorizables.size();
358 }
359
360 public java.util.Iterator<TAuthorizable> getNewAuthorizablesIterator() {
361 return (this.newAuthorizables == null) ? null : this.newAuthorizables.iterator();
362 }
363
364 public void addToNewAuthorizables(TAuthorizable elem) {
365 if (this.newAuthorizables == null) {
366 this.newAuthorizables = new ArrayList<TAuthorizable>();
367 }
368 this.newAuthorizables.add(elem);
369 }
370
371 public List<TAuthorizable> getNewAuthorizables() {
372 return this.newAuthorizables;
373 }
374
375 public void setNewAuthorizables(List<TAuthorizable> newAuthorizables) {
376 this.newAuthorizables = newAuthorizables;
377 }
378
379 public void unsetNewAuthorizables() {
380 this.newAuthorizables = null;
381 }
382
383 /** Returns true if field newAuthorizables is set (has been assigned a value) and false otherwise */
384 public boolean isSetNewAuthorizables() {
385 return this.newAuthorizables != null;
386 }
387
388 public void setNewAuthorizablesIsSet(boolean value) {
389 if (!value) {
390 this.newAuthorizables = null;
391 }
392 }
393
394 public void setFieldValue(_Fields field, Object value) {
395 switch (field) {
396 case PROTOCOL_VERSION:
397 if (value == null) {
398 unsetProtocol_version();
399 } else {
400 setProtocol_version((Integer)value);
401 }
402 break;
403
404 case REQUESTOR_USER_NAME:
405 if (value == null) {
406 unsetRequestorUserName();
407 } else {
408 setRequestorUserName((String)value);
409 }
410 break;
411
412 case COMPONENT:
413 if (value == null) {
414 unsetComponent();
415 } else {
416 setComponent((String)value);
417 }
418 break;
419
420 case SERVICE_NAME:
421 if (value == null) {
422 unsetServiceName();
423 } else {
424 setServiceName((String)value);
425 }
426 break;
427
428 case OLD_AUTHORIZABLES:
429 if (value == null) {
430 unsetOldAuthorizables();
431 } else {
432 setOldAuthorizables((List<TAuthorizable>)value);
433 }
434 break;
435
436 case NEW_AUTHORIZABLES:
437 if (value == null) {
438 unsetNewAuthorizables();
439 } else {
440 setNewAuthorizables((List<TAuthorizable>)value);
441 }
442 break;
443
444 }
445 }
446
447 public Object getFieldValue(_Fields field) {
448 switch (field) {
449 case PROTOCOL_VERSION:
450 return getProtocol_version();
451
452 case REQUESTOR_USER_NAME:
453 return getRequestorUserName();
454
455 case COMPONENT:
456 return getComponent();
457
458 case SERVICE_NAME:
459 return getServiceName();
460
461 case OLD_AUTHORIZABLES:
462 return getOldAuthorizables();
463
464 case NEW_AUTHORIZABLES:
465 return getNewAuthorizables();
466
467 }
468 throw new IllegalStateException();
469 }
470
471 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
472 public boolean isSet(_Fields field) {
473 if (field == null) {
474 throw new IllegalArgumentException();
475 }
476
477 switch (field) {
478 case PROTOCOL_VERSION:
479 return isSetProtocol_version();
480 case REQUESTOR_USER_NAME:
481 return isSetRequestorUserName();
482 case COMPONENT:
483 return isSetComponent();
484 case SERVICE_NAME:
485 return isSetServiceName();
486 case OLD_AUTHORIZABLES:
487 return isSetOldAuthorizables();
488 case NEW_AUTHORIZABLES:
489 return isSetNewAuthorizables();
490 }
491 throw new IllegalStateException();
492 }
493
494 @Override
495 public boolean equals(Object that) {
496 if (that == null)
497 return false;
498 if (that instanceof TRenamePrivilegesRequest)
499 return this.equals((TRenamePrivilegesRequest)that);
500 return false;
501 }
502
503 public boolean equals(TRenamePrivilegesRequest that) {
504 if (that == null)
505 return false;
506
507 boolean this_present_protocol_version = true;
508 boolean that_present_protocol_version = true;
509 if (this_present_protocol_version || that_present_protocol_version) {
510 if (!(this_present_protocol_version && that_present_protocol_version))
511 return false;
512 if (this.protocol_version != that.protocol_version)
513 return false;
514 }
515
516 boolean this_present_requestorUserName = true && this.isSetRequestorUserName();
517 boolean that_present_requestorUserName = true && that.isSetRequestorUserName();
518 if (this_present_requestorUserName || that_present_requestorUserName) {
519 if (!(this_present_requestorUserName && that_present_requestorUserName))
520 return false;
521 if (!this.requestorUserName.equals(that.requestorUserName))
522 return false;
523 }
524
525 boolean this_present_component = true && this.isSetComponent();
526 boolean that_present_component = true && that.isSetComponent();
527 if (this_present_component || that_present_component) {
528 if (!(this_present_component && that_present_component))
529 return false;
530 if (!this.component.equals(that.component))
531 return false;
532 }
533
534 boolean this_present_serviceName = true && this.isSetServiceName();
535 boolean that_present_serviceName = true && that.isSetServiceName();
536 if (this_present_serviceName || that_present_serviceName) {
537 if (!(this_present_serviceName && that_present_serviceName))
538 return false;
539 if (!this.serviceName.equals(that.serviceName))
540 return false;
541 }
542
543 boolean this_present_oldAuthorizables = true && this.isSetOldAuthorizables();
544 boolean that_present_oldAuthorizables = true && that.isSetOldAuthorizables();
545 if (this_present_oldAuthorizables || that_present_oldAuthorizables) {
546 if (!(this_present_oldAuthorizables && that_present_oldAuthorizables))
547 return false;
548 if (!this.oldAuthorizables.equals(that.oldAuthorizables))
549 return false;
550 }
551
552 boolean this_present_newAuthorizables = true && this.isSetNewAuthorizables();
553 boolean that_present_newAuthorizables = true && that.isSetNewAuthorizables();
554 if (this_present_newAuthorizables || that_present_newAuthorizables) {
555 if (!(this_present_newAuthorizables && that_present_newAuthorizables))
556 return false;
557 if (!this.newAuthorizables.equals(that.newAuthorizables))
558 return false;
559 }
560
561 return true;
562 }
563
564 @Override
565 public int hashCode() {
566 List<Object> list = new ArrayList<Object>();
567
568 boolean present_protocol_version = true;
569 list.add(present_protocol_version);
570 if (present_protocol_version)
571 list.add(protocol_version);
572
573 boolean present_requestorUserName = true && (isSetRequestorUserName());
574 list.add(present_requestorUserName);
575 if (present_requestorUserName)
576 list.add(requestorUserName);
577
578 boolean present_component = true && (isSetComponent());
579 list.add(present_component);
580 if (present_component)
581 list.add(component);
582
583 boolean present_serviceName = true && (isSetServiceName());
584 list.add(present_serviceName);
585 if (present_serviceName)
586 list.add(serviceName);
587
588 boolean present_oldAuthorizables = true && (isSetOldAuthorizables());
589 list.add(present_oldAuthorizables);
590 if (present_oldAuthorizables)
591 list.add(oldAuthorizables);
592
593 boolean present_newAuthorizables = true && (isSetNewAuthorizables());
594 list.add(present_newAuthorizables);
595 if (present_newAuthorizables)
596 list.add(newAuthorizables);
597
598 return list.hashCode();
599 }
600
601 @Override
602 public int compareTo(TRenamePrivilegesRequest other) {
603 if (!getClass().equals(other.getClass())) {
604 return getClass().getName().compareTo(other.getClass().getName());
605 }
606
607 int lastComparison = 0;
608
609 lastComparison = Boolean.valueOf(isSetProtocol_version()).compareTo(other.isSetProtocol_version());
610 if (lastComparison != 0) {
611 return lastComparison;
612 }
613 if (isSetProtocol_version()) {
614 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.protocol_version, other.protocol_version);
615 if (lastComparison != 0) {
616 return lastComparison;
617 }
618 }
619 lastComparison = Boolean.valueOf(isSetRequestorUserName()).compareTo(other.isSetRequestorUserName());
620 if (lastComparison != 0) {
621 return lastComparison;
622 }
623 if (isSetRequestorUserName()) {
624 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorUserName, other.requestorUserName);
625 if (lastComparison != 0) {
626 return lastComparison;
627 }
628 }
629 lastComparison = Boolean.valueOf(isSetComponent()).compareTo(other.isSetComponent());
630 if (lastComparison != 0) {
631 return lastComparison;
632 }
633 if (isSetComponent()) {
634 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.component, other.component);
635 if (lastComparison != 0) {
636 return lastComparison;
637 }
638 }
639 lastComparison = Boolean.valueOf(isSetServiceName()).compareTo(other.isSetServiceName());
640 if (lastComparison != 0) {
641 return lastComparison;
642 }
643 if (isSetServiceName()) {
644 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceName, other.serviceName);
645 if (lastComparison != 0) {
646 return lastComparison;
647 }
648 }
649 lastComparison = Boolean.valueOf(isSetOldAuthorizables()).compareTo(other.isSetOldAuthorizables());
650 if (lastComparison != 0) {
651 return lastComparison;
652 }
653 if (isSetOldAuthorizables()) {
654 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldAuthorizables, other.oldAuthorizables);
655 if (lastComparison != 0) {
656 return lastComparison;
657 }
658 }
659 lastComparison = Boolean.valueOf(isSetNewAuthorizables()).compareTo(other.isSetNewAuthorizables());
660 if (lastComparison != 0) {
661 return lastComparison;
662 }
663 if (isSetNewAuthorizables()) {
664 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newAuthorizables, other.newAuthorizables);
665 if (lastComparison != 0) {
666 return lastComparison;
667 }
668 }
669 return 0;
670 }
671
672 public _Fields fieldForId(int fieldId) {
673 return _Fields.findByThriftId(fieldId);
674 }
675
676 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
677 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
678 }
679
680 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
681 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
682 }
683
684 @Override
685 public String toString() {
686 StringBuilder sb = new StringBuilder("TRenamePrivilegesRequest(");
687 boolean first = true;
688
689 sb.append("protocol_version:");
690 sb.append(this.protocol_version);
691 first = false;
692 if (!first) sb.append(", ");
693 sb.append("requestorUserName:");
694 if (this.requestorUserName == null) {
695 sb.append("null");
696 } else {
697 sb.append(this.requestorUserName);
698 }
699 first = false;
700 if (!first) sb.append(", ");
701 sb.append("component:");
702 if (this.component == null) {
703 sb.append("null");
704 } else {
705 sb.append(this.component);
706 }
707 first = false;
708 if (!first) sb.append(", ");
709 sb.append("serviceName:");
710 if (this.serviceName == null) {
711 sb.append("null");
712 } else {
713 sb.append(this.serviceName);
714 }
715 first = false;
716 if (!first) sb.append(", ");
717 sb.append("oldAuthorizables:");
718 if (this.oldAuthorizables == null) {
719 sb.append("null");
720 } else {
721 sb.append(this.oldAuthorizables);
722 }
723 first = false;
724 if (!first) sb.append(", ");
725 sb.append("newAuthorizables:");
726 if (this.newAuthorizables == null) {
727 sb.append("null");
728 } else {
729 sb.append(this.newAuthorizables);
730 }
731 first = false;
732 sb.append(")");
733 return sb.toString();
734 }
735
736 public void validate() throws org.apache.thrift.TException {
737 // check for required fields
738 if (!isSetProtocol_version()) {
739 throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_version' is unset! Struct:" + toString());
740 }
741
742 if (!isSetRequestorUserName()) {
743 throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString());
744 }
745
746 if (!isSetComponent()) {
747 throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString());
748 }
749
750 if (!isSetServiceName()) {
751 throw new org.apache.thrift.protocol.TProtocolException("Required field 'serviceName' is unset! Struct:" + toString());
752 }
753
754 if (!isSetOldAuthorizables()) {
755 throw new org.apache.thrift.protocol.TProtocolException("Required field 'oldAuthorizables' is unset! Struct:" + toString());
756 }
757
758 if (!isSetNewAuthorizables()) {
759 throw new org.apache.thrift.protocol.TProtocolException("Required field 'newAuthorizables' is unset! Struct:" + toString());
760 }
761
762 // check for sub-struct validity
763 }
764
765 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
766 try {
767 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
768 } catch (org.apache.thrift.TException te) {
769 throw new java.io.IOException(te);
770 }
771 }
772
773 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
774 try {
775 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
776 __isset_bitfield = 0;
777 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
778 } catch (org.apache.thrift.TException te) {
779 throw new java.io.IOException(te);
780 }
781 }
782
783 private static class TRenamePrivilegesRequestStandardSchemeFactory implements SchemeFactory {
784 public TRenamePrivilegesRequestStandardScheme getScheme() {
785 return new TRenamePrivilegesRequestStandardScheme();
786 }
787 }
788
789 private static class TRenamePrivilegesRequestStandardScheme extends StandardScheme<TRenamePrivilegesRequest> {
790
791 public void read(org.apache.thrift.protocol.TProtocol iprot, TRenamePrivilegesRequest struct) throws org.apache.thrift.TException {
792 org.apache.thrift.protocol.TField schemeField;
793 iprot.readStructBegin();
794 while (true)
795 {
796 schemeField = iprot.readFieldBegin();
797 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
798 break;
799 }
800 switch (schemeField.id) {
801 case 1: // PROTOCOL_VERSION
802 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
803 struct.protocol_version = iprot.readI32();
804 struct.setProtocol_versionIsSet(true);
805 } else {
806 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
807 }
808 break;
809 case 2: // REQUESTOR_USER_NAME
810 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
811 struct.requestorUserName = iprot.readString();
812 struct.setRequestorUserNameIsSet(true);
813 } else {
814 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
815 }
816 break;
817 case 3: // COMPONENT
818 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
819 struct.component = iprot.readString();
820 struct.setComponentIsSet(true);
821 } else {
822 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
823 }
824 break;
825 case 4: // SERVICE_NAME
826 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
827 struct.serviceName = iprot.readString();
828 struct.setServiceNameIsSet(true);
829 } else {
830 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
831 }
832 break;
833 case 5: // OLD_AUTHORIZABLES
834 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
835 {
836 org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
837 struct.oldAuthorizables = new ArrayList<TAuthorizable>(_list56.size);
838 TAuthorizable _elem57;
839 for (int _i58 = 0; _i58 < _list56.size; ++_i58)
840 {
841 _elem57 = new TAuthorizable();
842 _elem57.read(iprot);
843 struct.oldAuthorizables.add(_elem57);
844 }
845 iprot.readListEnd();
846 }
847 struct.setOldAuthorizablesIsSet(true);
848 } else {
849 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
850 }
851 break;
852 case 6: // NEW_AUTHORIZABLES
853 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
854 {
855 org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
856 struct.newAuthorizables = new ArrayList<TAuthorizable>(_list59.size);
857 TAuthorizable _elem60;
858 for (int _i61 = 0; _i61 < _list59.size; ++_i61)
859 {
860 _elem60 = new TAuthorizable();
861 _elem60.read(iprot);
862 struct.newAuthorizables.add(_elem60);
863 }
864 iprot.readListEnd();
865 }
866 struct.setNewAuthorizablesIsSet(true);
867 } else {
868 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
869 }
870 break;
871 default:
872 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
873 }
874 iprot.readFieldEnd();
875 }
876 iprot.readStructEnd();
877 struct.validate();
878 }
879
880 public void write(org.apache.thrift.protocol.TProtocol oprot, TRenamePrivilegesRequest struct) throws org.apache.thrift.TException {
881 struct.validate();
882
883 oprot.writeStructBegin(STRUCT_DESC);
884 oprot.writeFieldBegin(PROTOCOL_VERSION_FIELD_DESC);
885 oprot.writeI32(struct.protocol_version);
886 oprot.writeFieldEnd();
887 if (struct.requestorUserName != null) {
888 oprot.writeFieldBegin(REQUESTOR_USER_NAME_FIELD_DESC);
889 oprot.writeString(struct.requestorUserName);
890 oprot.writeFieldEnd();
891 }
892 if (struct.component != null) {
893 oprot.writeFieldBegin(COMPONENT_FIELD_DESC);
894 oprot.writeString(struct.component);
895 oprot.writeFieldEnd();
896 }
897 if (struct.serviceName != null) {
898 oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
899 oprot.writeString(struct.serviceName);
900 oprot.writeFieldEnd();
901 }
902 if (struct.oldAuthorizables != null) {
903 oprot.writeFieldBegin(OLD_AUTHORIZABLES_FIELD_DESC);
904 {
905 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.oldAuthorizables.size()));
906 for (TAuthorizable _iter62 : struct.oldAuthorizables)
907 {
908 _iter62.write(oprot);
909 }
910 oprot.writeListEnd();
911 }
912 oprot.writeFieldEnd();
913 }
914 if (struct.newAuthorizables != null) {
915 oprot.writeFieldBegin(NEW_AUTHORIZABLES_FIELD_DESC);
916 {
917 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.newAuthorizables.size()));
918 for (TAuthorizable _iter63 : struct.newAuthorizables)
919 {
920 _iter63.write(oprot);
921 }
922 oprot.writeListEnd();
923 }
924 oprot.writeFieldEnd();
925 }
926 oprot.writeFieldStop();
927 oprot.writeStructEnd();
928 }
929
930 }
931
932 private static class TRenamePrivilegesRequestTupleSchemeFactory implements SchemeFactory {
933 public TRenamePrivilegesRequestTupleScheme getScheme() {
934 return new TRenamePrivilegesRequestTupleScheme();
935 }
936 }
937
938 private static class TRenamePrivilegesRequestTupleScheme extends TupleScheme<TRenamePrivilegesRequest> {
939
940 @Override
941 public void write(org.apache.thrift.protocol.TProtocol prot, TRenamePrivilegesRequest struct) throws org.apache.thrift.TException {
942 TTupleProtocol oprot = (TTupleProtocol) prot;
943 oprot.writeI32(struct.protocol_version);
944 oprot.writeString(struct.requestorUserName);
945 oprot.writeString(struct.component);
946 oprot.writeString(struct.serviceName);
947 {
948 oprot.writeI32(struct.oldAuthorizables.size());
949 for (TAuthorizable _iter64 : struct.oldAuthorizables)
950 {
951 _iter64.write(oprot);
952 }
953 }
954 {
955 oprot.writeI32(struct.newAuthorizables.size());
956 for (TAuthorizable _iter65 : struct.newAuthorizables)
957 {
958 _iter65.write(oprot);
959 }
960 }
961 }
962
963 @Override
964 public void read(org.apache.thrift.protocol.TProtocol prot, TRenamePrivilegesRequest struct) throws org.apache.thrift.TException {
965 TTupleProtocol iprot = (TTupleProtocol) prot;
966 struct.protocol_version = iprot.readI32();
967 struct.setProtocol_versionIsSet(true);
968 struct.requestorUserName = iprot.readString();
969 struct.setRequestorUserNameIsSet(true);
970 struct.component = iprot.readString();
971 struct.setComponentIsSet(true);
972 struct.serviceName = iprot.readString();
973 struct.setServiceNameIsSet(true);
974 {
975 org.apache.thrift.protocol.TList _list66 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
976 struct.oldAuthorizables = new ArrayList<TAuthorizable>(_list66.size);
977 TAuthorizable _elem67;
978 for (int _i68 = 0; _i68 < _list66.size; ++_i68)
979 {
980 _elem67 = new TAuthorizable();
981 _elem67.read(iprot);
982 struct.oldAuthorizables.add(_elem67);
983 }
984 }
985 struct.setOldAuthorizablesIsSet(true);
986 {
987 org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
988 struct.newAuthorizables = new ArrayList<TAuthorizable>(_list69.size);
989 TAuthorizable _elem70;
990 for (int _i71 = 0; _i71 < _list69.size; ++_i71)
991 {
992 _elem70 = new TAuthorizable();
993 _elem70.read(iprot);
994 struct.newAuthorizables.add(_elem70);
995 }
996 }
997 struct.setNewAuthorizablesIsSet(true);
998 }
999 }
1000
1001 }
1002