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 --- .../bwlp/thrift/iface/ClientSessionData.java | 202 +++++++++------------ 1 file changed, 90 insertions(+), 112 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java index 715ff3a..5b40cd0 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.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 ClientSessionData 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("ClientSessionData"); @@ -43,16 +16,13 @@ public class ClientSessionData implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ClientSessionDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ClientSessionDataTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ClientSessionDataStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ClientSessionDataTupleSchemeFactory(); - public String sessionId; // required - public String authToken; // required - public List satellites; // required - public UserInfo userInfo; // required + public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String authToken; // required + public @org.apache.thrift.annotation.Nullable java.util.List satellites; // required + public @org.apache.thrift.annotation.Nullable UserInfo userInfo; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -61,10 +31,10 @@ public class ClientSessionData 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); } } @@ -72,6 +42,7 @@ public class ClientSessionData 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -134,7 +106,7 @@ public class ClientSessionData implements org.apache.thrift.TBase satellites, + java.lang.String sessionId, + java.lang.String authToken, + java.util.List satellites, UserInfo userInfo) { this(); @@ -165,7 +137,7 @@ public class ClientSessionData implements org.apache.thrift.TBase __this__satellites = new ArrayList(other.satellites.size()); + java.util.List __this__satellites = new java.util.ArrayList(other.satellites.size()); for (Satellite other_element : other.satellites) { __this__satellites.add(new Satellite(other_element)); } @@ -188,11 +160,12 @@ public class ClientSessionData implements org.apache.thrift.TBase getSatellitesIterator() { return (this.satellites == null) ? null : this.satellites.iterator(); } public void addToSatellites(Satellite elem) { if (this.satellites == null) { - this.satellites = new ArrayList(); + this.satellites = new java.util.ArrayList(); } this.satellites.add(elem); } - public List getSatellites() { + @org.apache.thrift.annotation.Nullable + public java.util.List getSatellites() { return this.satellites; } - public ClientSessionData setSatellites(List satellites) { + public ClientSessionData setSatellites(@org.apache.thrift.annotation.Nullable java.util.List satellites) { this.satellites = satellites; return this; } @@ -275,11 +251,12 @@ public class ClientSessionData implements org.apache.thrift.TBase)value); + setSatellites((java.util.List)value); } break; @@ -336,7 +313,8 @@ public class ClientSessionData implements org.apache.thrift.TBase list = new ArrayList(); + int hashCode = 1; - boolean present_sessionId = true && (isSetSessionId()); - list.add(present_sessionId); - if (present_sessionId) - list.add(sessionId); + hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); + if (isSetSessionId()) + hashCode = hashCode * 8191 + sessionId.hashCode(); - boolean present_authToken = true && (isSetAuthToken()); - list.add(present_authToken); - if (present_authToken) - list.add(authToken); + hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287); + if (isSetAuthToken()) + hashCode = hashCode * 8191 + authToken.hashCode(); - boolean present_satellites = true && (isSetSatellites()); - list.add(present_satellites); - if (present_satellites) - list.add(satellites); + hashCode = hashCode * 8191 + ((isSetSatellites()) ? 131071 : 524287); + if (isSetSatellites()) + hashCode = hashCode * 8191 + satellites.hashCode(); - boolean present_userInfo = true && (isSetUserInfo()); - list.add(present_userInfo); - if (present_userInfo) - list.add(userInfo); + hashCode = hashCode * 8191 + ((isSetUserInfo()) ? 131071 : 524287); + if (isSetUserInfo()) + hashCode = hashCode * 8191 + userInfo.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -460,7 +434,7 @@ public class ClientSessionData implements org.apache.thrift.TBase { + private static class ClientSessionDataStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ClientSessionData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -617,8 +592,8 @@ public class ClientSessionData implements org.apache.thrift.TBase(_list16.size); - Satellite _elem17; + struct.satellites = new java.util.ArrayList(_list16.size); + @org.apache.thrift.annotation.Nullable Satellite _elem17; for (int _i18 = 0; _i18 < _list16.size; ++_i18) { _elem17 = new Satellite(); @@ -689,18 +664,18 @@ public class ClientSessionData implements org.apache.thrift.TBase { + private static class ClientSessionDataTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ClientSessionData 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.isSetSessionId()) { optionals.set(0); } @@ -736,8 +711,8 @@ public class ClientSessionData implements org.apache.thrift.TBase(_list21.size); - Satellite _elem22; + org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.satellites = new java.util.ArrayList(_list21.size); + @org.apache.thrift.annotation.Nullable Satellite _elem22; for (int _i23 = 0; _i23 < _list21.size; ++_i23) { _elem22 = new Satellite(); @@ -768,5 +743,8 @@ public class ClientSessionData 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