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 / TAlterSentryRoleDeleteGroupsResponse.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 TAlterSentryRoleDeleteGroupsResponse implements org.apache.thrift.TBase<TAlterSentryRoleDeleteGroupsResponse, TAlterSentryRoleDeleteGroupsResponse._Fields>, java.io.Serializable, Cloneable, Comparable<TAlterSentryRoleDeleteGroupsResponse> {
39 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAlterSentryRoleDeleteGroupsResponse");
40
41 private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
42
43 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
44 static {
45 schemes.put(StandardScheme.class, new TAlterSentryRoleDeleteGroupsResponseStandardSchemeFactory());
46 schemes.put(TupleScheme.class, new TAlterSentryRoleDeleteGroupsResponseTupleSchemeFactory());
47 }
48
49 private org.apache.sentry.service.thrift.TSentryResponseStatus status; // required
50
51 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
52 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
53 STATUS((short)1, "status");
54
55 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
57 static {
58 for (_Fields field : EnumSet.allOf(_Fields.class)) {
59 byName.put(field.getFieldName(), field);
60 }
61 }
62
63 /**
64 * Find the _Fields constant that matches fieldId, or null if its not found.
65 */
66 public static _Fields findByThriftId(int fieldId) {
67 switch(fieldId) {
68 case 1: // STATUS
69 return STATUS;
70 default:
71 return null;
72 }
73 }
74
75 /**
76 * Find the _Fields constant that matches fieldId, throwing an exception
77 * if it is not found.
78 */
79 public static _Fields findByThriftIdOrThrow(int fieldId) {
80 _Fields fields = findByThriftId(fieldId);
81 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
82 return fields;
83 }
84
85 /**
86 * Find the _Fields constant that matches name, or null if its not found.
87 */
88 public static _Fields findByName(String name) {
89 return byName.get(name);
90 }
91
92 private final short _thriftId;
93 private final String _fieldName;
94
95 _Fields(short thriftId, String fieldName) {
96 _thriftId = thriftId;
97 _fieldName = fieldName;
98 }
99
100 public short getThriftFieldId() {
101 return _thriftId;
102 }
103
104 public String getFieldName() {
105 return _fieldName;
106 }
107 }
108
109 // isset id assignments
110 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
111 static {
112 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
113 tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
114 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TSentryResponseStatus")));
115 metaDataMap = Collections.unmodifiableMap(tmpMap);
116 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAlterSentryRoleDeleteGroupsResponse.class, metaDataMap);
117 }
118
119 public TAlterSentryRoleDeleteGroupsResponse() {
120 }
121
122 public TAlterSentryRoleDeleteGroupsResponse(
123 org.apache.sentry.service.thrift.TSentryResponseStatus status)
124 {
125 this();
126 this.status = status;
127 }
128
129 /**
130 * Performs a deep copy on <i>other</i>.
131 */
132 public TAlterSentryRoleDeleteGroupsResponse(TAlterSentryRoleDeleteGroupsResponse other) {
133 if (other.isSetStatus()) {
134 this.status = other.status;
135 }
136 }
137
138 public TAlterSentryRoleDeleteGroupsResponse deepCopy() {
139 return new TAlterSentryRoleDeleteGroupsResponse(this);
140 }
141
142 @Override
143 public void clear() {
144 this.status = null;
145 }
146
147 public org.apache.sentry.service.thrift.TSentryResponseStatus getStatus() {
148 return this.status;
149 }
150
151 public void setStatus(org.apache.sentry.service.thrift.TSentryResponseStatus status) {
152 this.status = status;
153 }
154
155 public void unsetStatus() {
156 this.status = null;
157 }
158
159 /** Returns true if field status is set (has been assigned a value) and false otherwise */
160 public boolean isSetStatus() {
161 return this.status != null;
162 }
163
164 public void setStatusIsSet(boolean value) {
165 if (!value) {
166 this.status = null;
167 }
168 }
169
170 public void setFieldValue(_Fields field, Object value) {
171 switch (field) {
172 case STATUS:
173 if (value == null) {
174 unsetStatus();
175 } else {
176 setStatus((org.apache.sentry.service.thrift.TSentryResponseStatus)value);
177 }
178 break;
179
180 }
181 }
182
183 public Object getFieldValue(_Fields field) {
184 switch (field) {
185 case STATUS:
186 return getStatus();
187
188 }
189 throw new IllegalStateException();
190 }
191
192 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
193 public boolean isSet(_Fields field) {
194 if (field == null) {
195 throw new IllegalArgumentException();
196 }
197
198 switch (field) {
199 case STATUS:
200 return isSetStatus();
201 }
202 throw new IllegalStateException();
203 }
204
205 @Override
206 public boolean equals(Object that) {
207 if (that == null)
208 return false;
209 if (that instanceof TAlterSentryRoleDeleteGroupsResponse)
210 return this.equals((TAlterSentryRoleDeleteGroupsResponse)that);
211 return false;
212 }
213
214 public boolean equals(TAlterSentryRoleDeleteGroupsResponse that) {
215 if (that == null)
216 return false;
217
218 boolean this_present_status = true && this.isSetStatus();
219 boolean that_present_status = true && that.isSetStatus();
220 if (this_present_status || that_present_status) {
221 if (!(this_present_status && that_present_status))
222 return false;
223 if (!this.status.equals(that.status))
224 return false;
225 }
226
227 return true;
228 }
229
230 @Override
231 public int hashCode() {
232 List<Object> list = new ArrayList<Object>();
233
234 boolean present_status = true && (isSetStatus());
235 list.add(present_status);
236 if (present_status)
237 list.add(status);
238
239 return list.hashCode();
240 }
241
242 @Override
243 public int compareTo(TAlterSentryRoleDeleteGroupsResponse other) {
244 if (!getClass().equals(other.getClass())) {
245 return getClass().getName().compareTo(other.getClass().getName());
246 }
247
248 int lastComparison = 0;
249
250 lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
251 if (lastComparison != 0) {
252 return lastComparison;
253 }
254 if (isSetStatus()) {
255 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
256 if (lastComparison != 0) {
257 return lastComparison;
258 }
259 }
260 return 0;
261 }
262
263 public _Fields fieldForId(int fieldId) {
264 return _Fields.findByThriftId(fieldId);
265 }
266
267 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
268 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
269 }
270
271 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
272 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
273 }
274
275 @Override
276 public String toString() {
277 StringBuilder sb = new StringBuilder("TAlterSentryRoleDeleteGroupsResponse(");
278 boolean first = true;
279
280 sb.append("status:");
281 if (this.status == null) {
282 sb.append("null");
283 } else {
284 sb.append(this.status);
285 }
286 first = false;
287 sb.append(")");
288 return sb.toString();
289 }
290
291 public void validate() throws org.apache.thrift.TException {
292 // check for required fields
293 if (!isSetStatus()) {
294 throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
295 }
296
297 // check for sub-struct validity
298 }
299
300 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
301 try {
302 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
303 } catch (org.apache.thrift.TException te) {
304 throw new java.io.IOException(te);
305 }
306 }
307
308 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
309 try {
310 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
311 } catch (org.apache.thrift.TException te) {
312 throw new java.io.IOException(te);
313 }
314 }
315
316 private static class TAlterSentryRoleDeleteGroupsResponseStandardSchemeFactory implements SchemeFactory {
317 public TAlterSentryRoleDeleteGroupsResponseStandardScheme getScheme() {
318 return new TAlterSentryRoleDeleteGroupsResponseStandardScheme();
319 }
320 }
321
322 private static class TAlterSentryRoleDeleteGroupsResponseStandardScheme extends StandardScheme<TAlterSentryRoleDeleteGroupsResponse> {
323
324 public void read(org.apache.thrift.protocol.TProtocol iprot, TAlterSentryRoleDeleteGroupsResponse struct) throws org.apache.thrift.TException {
325 org.apache.thrift.protocol.TField schemeField;
326 iprot.readStructBegin();
327 while (true)
328 {
329 schemeField = iprot.readFieldBegin();
330 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
331 break;
332 }
333 switch (schemeField.id) {
334 case 1: // STATUS
335 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
336 struct.status = new org.apache.sentry.service.thrift.TSentryResponseStatus();
337 struct.status.read(iprot);
338 struct.setStatusIsSet(true);
339 } else {
340 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
341 }
342 break;
343 default:
344 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
345 }
346 iprot.readFieldEnd();
347 }
348 iprot.readStructEnd();
349 struct.validate();
350 }
351
352 public void write(org.apache.thrift.protocol.TProtocol oprot, TAlterSentryRoleDeleteGroupsResponse struct) throws org.apache.thrift.TException {
353 struct.validate();
354
355 oprot.writeStructBegin(STRUCT_DESC);
356 if (struct.status != null) {
357 oprot.writeFieldBegin(STATUS_FIELD_DESC);
358 struct.status.write(oprot);
359 oprot.writeFieldEnd();
360 }
361 oprot.writeFieldStop();
362 oprot.writeStructEnd();
363 }
364
365 }
366
367 private static class TAlterSentryRoleDeleteGroupsResponseTupleSchemeFactory implements SchemeFactory {
368 public TAlterSentryRoleDeleteGroupsResponseTupleScheme getScheme() {
369 return new TAlterSentryRoleDeleteGroupsResponseTupleScheme();
370 }
371 }
372
373 private static class TAlterSentryRoleDeleteGroupsResponseTupleScheme extends TupleScheme<TAlterSentryRoleDeleteGroupsResponse> {
374
375 @Override
376 public void write(org.apache.thrift.protocol.TProtocol prot, TAlterSentryRoleDeleteGroupsResponse struct) throws org.apache.thrift.TException {
377 TTupleProtocol oprot = (TTupleProtocol) prot;
378 struct.status.write(oprot);
379 }
380
381 @Override
382 public void read(org.apache.thrift.protocol.TProtocol prot, TAlterSentryRoleDeleteGroupsResponse struct) throws org.apache.thrift.TException {
383 TTupleProtocol iprot = (TTupleProtocol) prot;
384 struct.status = new org.apache.sentry.service.thrift.TSentryResponseStatus();
385 struct.status.read(iprot);
386 struct.setStatusIsSet(true);
387 }
388 }
389
390 }
391