diff options
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java | 163 |
1 files changed, 67 insertions, 96 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java index 8eb8c49..87824cd 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.openslx.bwlp.thrift.iface; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, MasterSoftware._Fields>, java.io.Serializable, Cloneable, Comparable<MasterSoftware> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MasterSoftware"); @@ -42,13 +15,10 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new MasterSoftwareStandardSchemeFactory()); - schemes.put(TupleScheme.class, new MasterSoftwareTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MasterSoftwareStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MasterSoftwareTupleSchemeFactory(); - public String software; // required + public @org.apache.thrift.annotation.Nullable java.lang.String software; // required public boolean isRestricted; // required public long createTime; // required @@ -58,10 +28,10 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M IS_RESTRICTED((short)2, "isRestricted"), CREATE_TIME((short)3, "createTime"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -69,6 +39,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SOFTWARE @@ -88,21 +59,22 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -111,7 +83,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -120,16 +92,16 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M private static final int __ISRESTRICTED_ISSET_ID = 0; private static final int __CREATETIME_ISSET_ID = 1; private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterSoftware.class, metaDataMap); } @@ -137,7 +109,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } public MasterSoftware( - String software, + java.lang.String software, boolean isRestricted, long createTime) { @@ -174,11 +146,12 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M this.createTime = 0; } - public String getSoftware() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getSoftware() { return this.software; } - public MasterSoftware setSoftware(String software) { + public MasterSoftware setSoftware(@org.apache.thrift.annotation.Nullable java.lang.String software) { this.software = software; return this; } @@ -209,16 +182,16 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } public void unsetIsRestricted() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID); } /** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */ public boolean isSetIsRestricted() { - return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID); } public void setIsRestrictedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value); } public long getCreateTime() { @@ -232,25 +205,25 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } public void unsetCreateTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SOFTWARE: if (value == null) { unsetSoftware(); } else { - setSoftware((String)value); + setSoftware((java.lang.String)value); } break; @@ -258,7 +231,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M if (value == null) { unsetIsRestricted(); } else { - setIsRestricted((Boolean)value); + setIsRestricted((java.lang.Boolean)value); } break; @@ -266,14 +239,15 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M if (value == null) { unsetCreateTime(); } else { - setCreateTime((Long)value); + setCreateTime((java.lang.Long)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SOFTWARE: return getSoftware(); @@ -285,13 +259,13 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M return getCreateTime(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -302,13 +276,11 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M case CREATE_TIME: return isSetCreateTime(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof MasterSoftware) return this.equals((MasterSoftware)that); return false; @@ -317,6 +289,8 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M public boolean equals(MasterSoftware that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_software = true && this.isSetSoftware(); boolean that_present_software = true && that.isSetSoftware(); @@ -350,24 +324,17 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_software = true && (isSetSoftware()); - list.add(present_software); - if (present_software) - list.add(software); + hashCode = hashCode * 8191 + ((isSetSoftware()) ? 131071 : 524287); + if (isSetSoftware()) + hashCode = hashCode * 8191 + software.hashCode(); - boolean present_isRestricted = true; - list.add(present_isRestricted); - if (present_isRestricted) - list.add(isRestricted); + hashCode = hashCode * 8191 + ((isRestricted) ? 131071 : 524287); - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime); - return list.hashCode(); + return hashCode; } @Override @@ -378,7 +345,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware()); + lastComparison = java.lang.Boolean.compare(isSetSoftware(), other.isSetSoftware()); if (lastComparison != 0) { return lastComparison; } @@ -388,7 +355,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted()); + lastComparison = java.lang.Boolean.compare(isSetIsRestricted(), other.isSetIsRestricted()); if (lastComparison != 0) { return lastComparison; } @@ -398,7 +365,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime()); if (lastComparison != 0) { return lastComparison; } @@ -411,21 +378,22 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M return 0; } + @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("MasterSoftware("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("MasterSoftware("); boolean first = true; sb.append("software:"); @@ -460,7 +428,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -470,13 +438,13 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } } - private static class MasterSoftwareStandardSchemeFactory implements SchemeFactory { + private static class MasterSoftwareStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public MasterSoftwareStandardScheme getScheme() { return new MasterSoftwareStandardScheme(); } } - private static class MasterSoftwareStandardScheme extends StandardScheme<MasterSoftware> { + private static class MasterSoftwareStandardScheme extends org.apache.thrift.scheme.StandardScheme<MasterSoftware> { public void read(org.apache.thrift.protocol.TProtocol iprot, MasterSoftware struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -544,18 +512,18 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } - private static class MasterSoftwareTupleSchemeFactory implements SchemeFactory { + private static class MasterSoftwareTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public MasterSoftwareTupleScheme getScheme() { return new MasterSoftwareTupleScheme(); } } - private static class MasterSoftwareTupleScheme extends TupleScheme<MasterSoftware> { + private static class MasterSoftwareTupleScheme extends org.apache.thrift.scheme.TupleScheme<MasterSoftware> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, MasterSoftware struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSoftware()) { optionals.set(0); } @@ -579,8 +547,8 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M @Override public void read(org.apache.thrift.protocol.TProtocol prot, MasterSoftware struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.software = iprot.readString(); struct.setSoftwareIsSet(true); @@ -596,5 +564,8 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } |