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/ImageBaseWrite.java | 313 ++++++++++----------- 1 file changed, 143 insertions(+), 170 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java index 6e35111..1c796fa 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.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 ImageBaseWrite 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("ImageBaseWrite"); @@ -48,25 +21,22 @@ public class ImageBaseWrite implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ImageBaseWriteStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ImageBaseWriteTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageBaseWriteStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageBaseWriteTupleSchemeFactory(); - public String imageName; // required - public String description; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // required + public @org.apache.thrift.annotation.Nullable java.lang.String description; // required public int osId; // required - public String virtId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required public boolean isTemplate; // required - public ImagePermissions defaultPermissions; // required + public @org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions; // required /** * * @see ShareMode */ - public ShareMode shareMode; // required - public List addTags; // optional - public List remTags; // optional + public @org.apache.thrift.annotation.Nullable ShareMode shareMode; // required + public @org.apache.thrift.annotation.Nullable java.util.List addTags; // optional + public @org.apache.thrift.annotation.Nullable java.util.List remTags; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -84,10 +54,10 @@ public class ImageBaseWrite 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); } } @@ -95,6 +65,7 @@ public class ImageBaseWrite 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.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -182,7 +154,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase __this__addTags = new ArrayList(other.addTags); + java.util.List __this__addTags = new java.util.ArrayList(other.addTags); this.addTags = __this__addTags; } if (other.isSetRemTags()) { - List __this__remTags = new ArrayList(other.remTags); + java.util.List __this__remTags = new java.util.ArrayList(other.remTags); this.remTags = __this__remTags; } } @@ -261,11 +233,12 @@ public class ImageBaseWrite implements org.apache.thrift.TBase getAddTagsIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getAddTagsIterator() { return (this.addTags == null) ? null : this.addTags.iterator(); } - public void addToAddTags(String elem) { + public void addToAddTags(java.lang.String elem) { if (this.addTags == null) { - this.addTags = new ArrayList(); + this.addTags = new java.util.ArrayList(); } this.addTags.add(elem); } - public List getAddTags() { + @org.apache.thrift.annotation.Nullable + public java.util.List getAddTags() { return this.addTags; } - public ImageBaseWrite setAddTags(List addTags) { + public ImageBaseWrite setAddTags(@org.apache.thrift.annotation.Nullable java.util.List addTags) { this.addTags = addTags; return this; } @@ -478,22 +457,24 @@ public class ImageBaseWrite implements org.apache.thrift.TBase getRemTagsIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getRemTagsIterator() { return (this.remTags == null) ? null : this.remTags.iterator(); } - public void addToRemTags(String elem) { + public void addToRemTags(java.lang.String elem) { if (this.remTags == null) { - this.remTags = new ArrayList(); + this.remTags = new java.util.ArrayList(); } this.remTags.add(elem); } - public List getRemTags() { + @org.apache.thrift.annotation.Nullable + public java.util.List getRemTags() { return this.remTags; } - public ImageBaseWrite setRemTags(List remTags) { + public ImageBaseWrite setRemTags(@org.apache.thrift.annotation.Nullable java.util.List remTags) { this.remTags = remTags; return this; } @@ -513,13 +494,13 @@ public class ImageBaseWrite implements org.apache.thrift.TBase)value); + setAddTags((java.util.List)value); } break; @@ -583,14 +564,15 @@ public class ImageBaseWrite implements org.apache.thrift.TBase)value); + setRemTags((java.util.List)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IMAGE_NAME: return getImageName(); @@ -620,13 +602,13 @@ public class ImageBaseWrite implements org.apache.thrift.TBase list = new ArrayList(); + int hashCode = 1; - boolean present_imageName = true && (isSetImageName()); - list.add(present_imageName); - if (present_imageName) - list.add(imageName); + hashCode = hashCode * 8191 + ((isSetImageName()) ? 131071 : 524287); + if (isSetImageName()) + hashCode = hashCode * 8191 + imageName.hashCode(); - boolean present_description = true && (isSetDescription()); - list.add(present_description); - if (present_description) - list.add(description); + hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287); + if (isSetDescription()) + hashCode = hashCode * 8191 + description.hashCode(); - boolean present_osId = true; - list.add(present_osId); - if (present_osId) - list.add(osId); + hashCode = hashCode * 8191 + osId; - boolean present_virtId = true && (isSetVirtId()); - list.add(present_virtId); - if (present_virtId) - list.add(virtId); + hashCode = hashCode * 8191 + ((isSetVirtId()) ? 131071 : 524287); + if (isSetVirtId()) + hashCode = hashCode * 8191 + virtId.hashCode(); - boolean present_isTemplate = true; - list.add(present_isTemplate); - if (present_isTemplate) - list.add(isTemplate); + hashCode = hashCode * 8191 + ((isTemplate) ? 131071 : 524287); - boolean present_defaultPermissions = true && (isSetDefaultPermissions()); - list.add(present_defaultPermissions); - if (present_defaultPermissions) - list.add(defaultPermissions); + hashCode = hashCode * 8191 + ((isSetDefaultPermissions()) ? 131071 : 524287); + if (isSetDefaultPermissions()) + hashCode = hashCode * 8191 + defaultPermissions.hashCode(); - boolean present_shareMode = true && (isSetShareMode()); - list.add(present_shareMode); - if (present_shareMode) - list.add(shareMode.getValue()); + hashCode = hashCode * 8191 + ((isSetShareMode()) ? 131071 : 524287); + if (isSetShareMode()) + hashCode = hashCode * 8191 + shareMode.getValue(); - boolean present_addTags = true && (isSetAddTags()); - list.add(present_addTags); - if (present_addTags) - list.add(addTags); + hashCode = hashCode * 8191 + ((isSetAddTags()) ? 131071 : 524287); + if (isSetAddTags()) + hashCode = hashCode * 8191 + addTags.hashCode(); - boolean present_remTags = true && (isSetRemTags()); - list.add(present_remTags); - if (present_remTags) - list.add(remTags); + hashCode = hashCode * 8191 + ((isSetRemTags()) ? 131071 : 524287); + if (isSetRemTags()) + hashCode = hashCode * 8191 + remTags.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -809,7 +778,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase { + private static class ImageBaseWriteStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ImageBaseWrite struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1095,8 +1065,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase(_list34.size); - String _elem35; + struct.addTags = new java.util.ArrayList(_list34.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem35; for (int _i36 = 0; _i36 < _list34.size; ++_i36) { _elem35 = iprot.readString(); @@ -1113,8 +1083,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase(_list37.size); - String _elem38; + struct.remTags = new java.util.ArrayList(_list37.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem38; for (int _i39 = 0; _i39 < _list37.size; ++_i39) { _elem38 = iprot.readString(); @@ -1178,7 +1148,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase { + private static class ImageBaseWriteTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ImageBaseWrite 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.isSetImageName()) { optionals.set(0); } @@ -1271,7 +1241,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase(_list44.size); - String _elem45; + org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.addTags = new java.util.ArrayList(_list44.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem45; for (int _i46 = 0; _i46 < _list44.size; ++_i46) { _elem45 = iprot.readString(); @@ -1336,9 +1306,9 @@ public class ImageBaseWrite implements org.apache.thrift.TBase(_list47.size); - String _elem48; + org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.remTags = new java.util.ArrayList(_list47.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem48; for (int _i49 = 0; _i49 < _list47.size; ++_i49) { _elem48 = iprot.readString(); @@ -1350,5 +1320,8 @@ public class ImageBaseWrite 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