From 746af5d07d2b7745618eb75ef3757d150ab02042 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 17 Dec 2021 17:03:51 +0100 Subject: Update generated Thrift API to version 0.15.0 --- .../openslx/bwlp/thrift/iface/SatelliteConfig.java | 309 +++++++++------------ 1 file changed, 136 insertions(+), 173 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java index 0dc1800..b412de9 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.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 = "2021-04-21") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") public class SatelliteConfig implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteConfig"); @@ -50,15 +23,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SatelliteConfigStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SatelliteConfigTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteConfigStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteConfigTupleSchemeFactory(); public int pageSize; // required - public ImagePermissions defaultImagePermissions; // required - public LecturePermissions defaultLecturePermissions; // required + public @org.apache.thrift.annotation.Nullable ImagePermissions defaultImagePermissions; // required + public @org.apache.thrift.annotation.Nullable LecturePermissions defaultLecturePermissions; // required public int maxImageValidityDays; // required public int maxLectureValidityDays; // required public int maxTransfers; // optional @@ -69,7 +39,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -101,6 +71,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase 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.PAGE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("pageSize", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.DEFAULT_IMAGE_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultImagePermissions", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -200,7 +172,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase list = new ArrayList(); - - boolean present_pageSize = true; - list.add(present_pageSize); - if (present_pageSize) - list.add(pageSize); - - boolean present_defaultImagePermissions = true && (isSetDefaultImagePermissions()); - list.add(present_defaultImagePermissions); - if (present_defaultImagePermissions) - list.add(defaultImagePermissions); - - boolean present_defaultLecturePermissions = true && (isSetDefaultLecturePermissions()); - list.add(present_defaultLecturePermissions); - if (present_defaultLecturePermissions) - list.add(defaultLecturePermissions); - - boolean present_maxImageValidityDays = true; - list.add(present_maxImageValidityDays); - if (present_maxImageValidityDays) - list.add(maxImageValidityDays); - - boolean present_maxLectureValidityDays = true; - list.add(present_maxLectureValidityDays); - if (present_maxLectureValidityDays) - list.add(maxLectureValidityDays); - - boolean present_maxTransfers = true && (isSetMaxTransfers()); - list.add(present_maxTransfers); - if (present_maxTransfers) - list.add(maxTransfers); - - boolean present_maxConnectionsPerTransfer = true && (isSetMaxConnectionsPerTransfer()); - list.add(present_maxConnectionsPerTransfer); - if (present_maxConnectionsPerTransfer) - list.add(maxConnectionsPerTransfer); - - boolean present_maxLocationsPerLecture = true && (isSetMaxLocationsPerLecture()); - list.add(present_maxLocationsPerLecture); - if (present_maxLocationsPerLecture) - list.add(maxLocationsPerLecture); - - boolean present_allowLoginByDefault = true && (isSetAllowLoginByDefault()); - list.add(present_allowLoginByDefault); - if (present_allowLoginByDefault) - list.add(allowLoginByDefault); - - boolean present_serverSideCopy = true && (isSetServerSideCopy()); - list.add(present_serverSideCopy); - if (present_serverSideCopy) - list.add(serverSideCopy.getValue()); - - boolean present_allowStudentDownload = true && (isSetAllowStudentDownload()); - list.add(present_allowStudentDownload); - if (present_allowStudentDownload) - list.add(allowStudentDownload); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + pageSize; + + hashCode = hashCode * 8191 + ((isSetDefaultImagePermissions()) ? 131071 : 524287); + if (isSetDefaultImagePermissions()) + hashCode = hashCode * 8191 + defaultImagePermissions.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDefaultLecturePermissions()) ? 131071 : 524287); + if (isSetDefaultLecturePermissions()) + hashCode = hashCode * 8191 + defaultLecturePermissions.hashCode(); + + hashCode = hashCode * 8191 + maxImageValidityDays; + + hashCode = hashCode * 8191 + maxLectureValidityDays; + + hashCode = hashCode * 8191 + ((isSetMaxTransfers()) ? 131071 : 524287); + if (isSetMaxTransfers()) + hashCode = hashCode * 8191 + maxTransfers; + + hashCode = hashCode * 8191 + ((isSetMaxConnectionsPerTransfer()) ? 131071 : 524287); + if (isSetMaxConnectionsPerTransfer()) + hashCode = hashCode * 8191 + maxConnectionsPerTransfer; + + hashCode = hashCode * 8191 + ((isSetMaxLocationsPerLecture()) ? 131071 : 524287); + if (isSetMaxLocationsPerLecture()) + hashCode = hashCode * 8191 + maxLocationsPerLecture; + + hashCode = hashCode * 8191 + ((isSetAllowLoginByDefault()) ? 131071 : 524287); + if (isSetAllowLoginByDefault()) + hashCode = hashCode * 8191 + ((allowLoginByDefault) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetServerSideCopy()) ? 131071 : 524287); + if (isSetServerSideCopy()) + hashCode = hashCode * 8191 + serverSideCopy.getValue(); + + hashCode = hashCode * 8191 + ((isSetAllowStudentDownload()) ? 131071 : 524287); + if (isSetAllowStudentDownload()) + hashCode = hashCode * 8191 + ((allowStudentDownload) ? 131071 : 524287); + + return hashCode; } @Override @@ -890,7 +849,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase { + private static class SatelliteConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, SatelliteConfig struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1300,18 +1260,18 @@ public class SatelliteConfig implements org.apache.thrift.TBase { + private static class SatelliteConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig 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.isSetPageSize()) { optionals.set(0); } @@ -1383,8 +1343,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase 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(); + } } -- cgit v1.2.3-55-g7522