Coverage Summary for Class: UserSerializer (com.ghost.serialization.integration.model)

Class Class, % Method, % Branch, % Line, % Instruction, %
UserSerializer 100% (1/1) 76.9% (10/13) 41.2% (154/374) 65.2% (493/756) 57.3% (2185/3813)


 @file:OptIn(InternalGhostApi::class)
 
 package com.ghost.serialization.integration.model
 
 import com.ghost.serialization.InternalGhostApi
 import com.ghost.serialization.contract.GhostSerializer
 import com.ghost.serialization.parser.GhostJsonFlatReader
 import com.ghost.serialization.parser.GhostJsonReader
 import com.ghost.serialization.parser.GhostJsonStringReader
 import com.ghost.serialization.parser.JsonReaderOptions
 import com.ghost.serialization.parser.beginObject
 import com.ghost.serialization.parser.consumeNull
 import com.ghost.serialization.parser.endObject
 import com.ghost.serialization.parser.isNextNullValue
 import com.ghost.serialization.parser.nextBoolean
 import com.ghost.serialization.parser.nextInt
 import com.ghost.serialization.parser.nextLong
 import com.ghost.serialization.parser.nextString
 import com.ghost.serialization.parser.selectNameAndConsume
 import com.ghost.serialization.parser.skipValue
 import com.ghost.serialization.writer.GhostJsonFlatWriter
 import com.ghost.serialization.writer.GhostJsonStringWriter
 import com.ghost.serialization.writer.GhostJsonWriter
 import okio.ByteString
 import okio.ByteString.Companion.encodeUtf8
 
 /**
  * High-performance serializer for [User].
  * Generated by GhostSerialization. Do not modify manually.
  */
 public object UserSerializer : GhostSerializer<User> {
   override val typeName: String = "User"
 
   private val OPTIONS: JsonReaderOptions =
       JsonReaderOptions.of(15, 185, 128, true, "id", "id_str", "name", "screen_name", "location", "description", "url", "entities", "protected", "followers_count", "friends_count", "listed_count", "created_at", "favourites_count", "utc_offset", "time_zone", "geo_enabled", "verified", "statuses_count", "lang", "contributors_enabled", "is_translator", "is_translation_enabled", "profile_background_color", "profile_background_image_url", "profile_background_image_url_https", "profile_background_tile", "profile_image_url", "profile_image_url_https", "profile_banner_url", "profile_link_color", "profile_sidebar_border_color", "profile_sidebar_fill_color", "profile_text_color", "profile_use_background_image", "default_profile", "default_profile_image", "following", "follow_request_sent", "notifications")
 
   private val H_CONTRIBUTORS_ENABLED: ByteString = "\"contributors_enabled\":".encodeUtf8()
 
   private val HS_CONTRIBUTORS_ENABLED: String = "\"contributors_enabled\":"
 
   private val H_CREATED_AT: ByteString = "\"created_at\":".encodeUtf8()
 
   private val HS_CREATED_AT: String = "\"created_at\":"
 
   private val H_DEFAULT_PROFILE: ByteString = "\"default_profile\":".encodeUtf8()
 
   private val HS_DEFAULT_PROFILE: String = "\"default_profile\":"
 
   private val H_DEFAULT_PROFILE_IMAGE: ByteString = "\"default_profile_image\":".encodeUtf8()
 
   private val HS_DEFAULT_PROFILE_IMAGE: String = "\"default_profile_image\":"
 
   private val H_DESCRIPTION: ByteString = "\"description\":".encodeUtf8()
 
   private val HS_DESCRIPTION: String = "\"description\":"
 
   private val H_ENTITIES: ByteString = "\"entities\":".encodeUtf8()
 
   private val HS_ENTITIES: String = "\"entities\":"
 
   private val H_FAVOURITES_COUNT: ByteString = "\"favourites_count\":".encodeUtf8()
 
   private val HS_FAVOURITES_COUNT: String = "\"favourites_count\":"
 
   private val H_FOLLOW_REQUEST_SENT: ByteString = "\"follow_request_sent\":".encodeUtf8()
 
   private val HS_FOLLOW_REQUEST_SENT: String = "\"follow_request_sent\":"
 
   private val H_FOLLOWERS_COUNT: ByteString = "\"followers_count\":".encodeUtf8()
 
   private val HS_FOLLOWERS_COUNT: String = "\"followers_count\":"
 
   private val H_FOLLOWING: ByteString = "\"following\":".encodeUtf8()
 
   private val HS_FOLLOWING: String = "\"following\":"
 
   private val H_FRIENDS_COUNT: ByteString = "\"friends_count\":".encodeUtf8()
 
   private val HS_FRIENDS_COUNT: String = "\"friends_count\":"
 
   private val H_GEO_ENABLED: ByteString = "\"geo_enabled\":".encodeUtf8()
 
   private val HS_GEO_ENABLED: String = "\"geo_enabled\":"
 
   private val H_ID: ByteString = "\"id\":".encodeUtf8()
 
   private val HS_ID: String = "\"id\":"
 
   private val H_ID_STR: ByteString = "\"id_str\":".encodeUtf8()
 
   private val HS_ID_STR: String = "\"id_str\":"
 
   private val H_IS_TRANSLATION_ENABLED: ByteString = "\"is_translation_enabled\":".encodeUtf8()
 
   private val HS_IS_TRANSLATION_ENABLED: String = "\"is_translation_enabled\":"
 
   private val H_IS_TRANSLATOR: ByteString = "\"is_translator\":".encodeUtf8()
 
   private val HS_IS_TRANSLATOR: String = "\"is_translator\":"
 
   private val H_LANG: ByteString = "\"lang\":".encodeUtf8()
 
   private val HS_LANG: String = "\"lang\":"
 
   private val H_LISTED_COUNT: ByteString = "\"listed_count\":".encodeUtf8()
 
   private val HS_LISTED_COUNT: String = "\"listed_count\":"
 
   private val H_LOCATION: ByteString = "\"location\":".encodeUtf8()
 
   private val HS_LOCATION: String = "\"location\":"
 
   private val H_NAME: ByteString = "\"name\":".encodeUtf8()
 
   private val HS_NAME: String = "\"name\":"
 
   private val H_NOTIFICATIONS: ByteString = "\"notifications\":".encodeUtf8()
 
   private val HS_NOTIFICATIONS: String = "\"notifications\":"
 
   private val H_PROFILE_BACKGROUND_COLOR: ByteString = "\"profile_background_color\":".encodeUtf8()
 
   private val HS_PROFILE_BACKGROUND_COLOR: String = "\"profile_background_color\":"
 
   private val H_PROFILE_BACKGROUND_IMAGE_URL: ByteString =
       "\"profile_background_image_url\":".encodeUtf8()
 
   private val HS_PROFILE_BACKGROUND_IMAGE_URL: String = "\"profile_background_image_url\":"
 
   private val H_PROFILE_BACKGROUND_IMAGE_URL_HTTPS: ByteString =
       "\"profile_background_image_url_https\":".encodeUtf8()
 
   private val HS_PROFILE_BACKGROUND_IMAGE_URL_HTTPS: String =
       "\"profile_background_image_url_https\":"
 
   private val H_PROFILE_BACKGROUND_TILE: ByteString = "\"profile_background_tile\":".encodeUtf8()
 
   private val HS_PROFILE_BACKGROUND_TILE: String = "\"profile_background_tile\":"
 
   private val H_PROFILE_BANNER_URL: ByteString = "\"profile_banner_url\":".encodeUtf8()
 
   private val HS_PROFILE_BANNER_URL: String = "\"profile_banner_url\":"
 
   private val H_PROFILE_IMAGE_URL: ByteString = "\"profile_image_url\":".encodeUtf8()
 
   private val HS_PROFILE_IMAGE_URL: String = "\"profile_image_url\":"
 
   private val H_PROFILE_IMAGE_URL_HTTPS: ByteString = "\"profile_image_url_https\":".encodeUtf8()
 
   private val HS_PROFILE_IMAGE_URL_HTTPS: String = "\"profile_image_url_https\":"
 
   private val H_PROFILE_LINK_COLOR: ByteString = "\"profile_link_color\":".encodeUtf8()
 
   private val HS_PROFILE_LINK_COLOR: String = "\"profile_link_color\":"
 
   private val H_PROFILE_SIDEBAR_BORDER_COLOR: ByteString =
       "\"profile_sidebar_border_color\":".encodeUtf8()
 
   private val HS_PROFILE_SIDEBAR_BORDER_COLOR: String = "\"profile_sidebar_border_color\":"
 
   private val H_PROFILE_SIDEBAR_FILL_COLOR: ByteString =
       "\"profile_sidebar_fill_color\":".encodeUtf8()
 
   private val HS_PROFILE_SIDEBAR_FILL_COLOR: String = "\"profile_sidebar_fill_color\":"
 
   private val H_PROFILE_TEXT_COLOR: ByteString = "\"profile_text_color\":".encodeUtf8()
 
   private val HS_PROFILE_TEXT_COLOR: String = "\"profile_text_color\":"
 
   private val H_PROFILE_USE_BACKGROUND_IMAGE: ByteString =
       "\"profile_use_background_image\":".encodeUtf8()
 
   private val HS_PROFILE_USE_BACKGROUND_IMAGE: String = "\"profile_use_background_image\":"
 
   private val H_PROTECTED: ByteString = "\"protected\":".encodeUtf8()
 
   private val HS_PROTECTED: String = "\"protected\":"
 
   private val H_SCREEN_NAME: ByteString = "\"screen_name\":".encodeUtf8()
 
   private val HS_SCREEN_NAME: String = "\"screen_name\":"
 
   private val H_STATUSES_COUNT: ByteString = "\"statuses_count\":".encodeUtf8()
 
   private val HS_STATUSES_COUNT: String = "\"statuses_count\":"
 
   private val H_TIME_ZONE: ByteString = "\"time_zone\":".encodeUtf8()
 
   private val HS_TIME_ZONE: String = "\"time_zone\":"
 
   private val H_URL: ByteString = "\"url\":".encodeUtf8()
 
   private val HS_URL: String = "\"url\":"
 
   private val H_UTC_OFFSET: ByteString = "\"utc_offset\":".encodeUtf8()
 
   private val HS_UTC_OFFSET: String = "\"utc_offset\":"
 
   private val H_VERIFIED: ByteString = "\"verified\":".encodeUtf8()
 
   private val HS_VERIFIED: String = "\"verified\":"
 
   private const val MASK_ID: Long = 1L
 
   private const val MASK_IDSTR: Long = 2L
 
   private const val MASK_NAME: Long = 4L
 
   private const val MASK_SCREENNAME: Long = 8L
 
   private const val MASK_LOCATION: Long = 16L
 
   private const val MASK_DESCRIPTION: Long = 32L
 
   private const val MASK_URL: Long = 64L
 
   private const val MASK_ENTITIES: Long = 128L
 
   private const val MASK_PROTECTED: Long = 256L
 
   private const val MASK_FOLLOWERSCOUNT: Long = 512L
 
   private const val MASK_FRIENDSCOUNT: Long = 1024L
 
   private const val MASK_LISTEDCOUNT: Long = 2048L
 
   private const val MASK_CREATEDAT: Long = 4096L
 
   private const val MASK_FAVOURITESCOUNT: Long = 8192L
 
   private const val MASK_UTCOFFSET: Long = 16384L
 
   private const val MASK_TIMEZONE: Long = 32768L
 
   private const val MASK_GEOENABLED: Long = 65536L
 
   private const val MASK_VERIFIED: Long = 131072L
 
   private const val MASK_STATUSESCOUNT: Long = 262144L
 
   private const val MASK_LANG: Long = 524288L
 
   private const val MASK_CONTRIBUTORSENABLED: Long = 1048576L
 
   private const val MASK_ISTRANSLATOR: Long = 2097152L
 
   private const val MASK_ISTRANSLATIONENABLED: Long = 4194304L
 
   private const val MASK_PROFILEBACKGROUNDCOLOR: Long = 8388608L
 
   private const val MASK_PROFILEBACKGROUNDIMAGEURL: Long = 16777216L
 
   private const val MASK_PROFILEBACKGROUNDIMAGEURLHTTPS: Long = 33554432L
 
   private const val MASK_PROFILEBACKGROUNDTILE: Long = 67108864L
 
   private const val MASK_PROFILEIMAGEURL: Long = 134217728L
 
   private const val MASK_PROFILEIMAGEURLHTTPS: Long = 268435456L
 
   private const val MASK_PROFILEBANNERURL: Long = 536870912L
 
   private const val MASK_PROFILELINKCOLOR: Long = 1073741824L
 
   private const val MASK_PROFILESIDEBARBORDERCOLOR: Long = 2147483648L
 
   private const val MASK_PROFILESIDEBARFILLCOLOR: Long = 4294967296L
 
   private const val MASK_PROFILETEXTCOLOR: Long = 8589934592L
 
   private const val MASK_PROFILEUSEBACKGROUNDIMAGE: Long = 17179869184L
 
   private const val MASK_DEFAULTPROFILE: Long = 34359738368L
 
   private const val MASK_DEFAULTPROFILEIMAGE: Long = 68719476736L
 
   private const val MASK_FOLLOWING: Long = 137438953472L
 
   private const val MASK_FOLLOWREQUESTSENT: Long = 274877906944L
 
   private const val MASK_NOTIFICATIONS: Long = 549755813888L
 
   private const val MASK_REQUIRED_0: Long = 7977570443L
 
   private const val MASK_DEFAULTS_0: Long = 1091534057332L
 
   private fun createInstance(
     mask0: Long,
     idValue: Long,
     idStrValue: String?,
     nameValue: String?,
     screenNameValue: String?,
     locationValue: String?,
     descriptionValue: String?,
     urlValue: String?,
     entitiesValue: UserEntities?,
     protectedValue: Boolean,
     followersCountValue: Int,
     friendsCountValue: Int,
     listedCountValue: Int,
     createdAtValue: String?,
     favouritesCountValue: Int,
     utcOffsetValue: Int?,
     timeZoneValue: String?,
     geoEnabledValue: Boolean,
     verifiedValue: Boolean,
     statusesCountValue: Int,
     langValue: String?,
     contributorsEnabledValue: Boolean,
     isTranslatorValue: Boolean,
     isTranslationEnabledValue: Boolean,
     profileBackgroundColorValue: String?,
     profileBackgroundImageUrlValue: String?,
     profileBackgroundImageUrlHttpsValue: String?,
     profileBackgroundTileValue: Boolean,
     profileImageUrlValue: String?,
     profileImageUrlHttpsValue: String?,
     profileBannerUrlValue: String?,
     profileLinkColorValue: String?,
     profileSidebarBorderColorValue: String?,
     profileSidebarFillColorValue: String?,
     profileTextColorValue: String?,
     profileUseBackgroundImageValue: Boolean,
     defaultProfileValue: Boolean,
     defaultProfileImageValue: Boolean,
     followingValue: Boolean,
     followRequestSentValue: Boolean,
     notificationsValue: Boolean,
   ): User {
     val result = User(
       id = idValue,
       idStr = idStrValue!!,
       screenName = screenNameValue!!,
       entities = entitiesValue!!,
       createdAt = createdAtValue!!,
       profileBackgroundColor = profileBackgroundColorValue!!,
       profileBackgroundImageUrl = profileBackgroundImageUrlValue!!,
       profileBackgroundImageUrlHttps = profileBackgroundImageUrlHttpsValue!!,
       profileImageUrl = profileImageUrlValue!!,
       profileImageUrlHttps = profileImageUrlHttpsValue!!,
       profileLinkColor = profileLinkColorValue!!,
       profileSidebarBorderColor = profileSidebarBorderColorValue!!,
       profileSidebarFillColor = profileSidebarFillColorValue!!,
     )
     if ((mask0 and MASK_DEFAULTS_0) != 0L) {
       return result.copy(
         name = if ((mask0 and MASK_NAME) != 0L) nameValue else result.name,
         location = if ((mask0 and MASK_LOCATION) != 0L) locationValue else result.location,
         description = if ((mask0 and MASK_DESCRIPTION) != 0L) descriptionValue else result.description,
         url = if ((mask0 and MASK_URL) != 0L) urlValue else result.url,
         `protected` = if ((mask0 and MASK_PROTECTED) != 0L) protectedValue else result.protected,
         followersCount = if ((mask0 and MASK_FOLLOWERSCOUNT) != 0L) followersCountValue else result.followersCount,
         friendsCount = if ((mask0 and MASK_FRIENDSCOUNT) != 0L) friendsCountValue else result.friendsCount,
         listedCount = if ((mask0 and MASK_LISTEDCOUNT) != 0L) listedCountValue else result.listedCount,
         favouritesCount = if ((mask0 and MASK_FAVOURITESCOUNT) != 0L) favouritesCountValue else result.favouritesCount,
         utcOffset = if ((mask0 and MASK_UTCOFFSET) != 0L) utcOffsetValue else result.utcOffset,
         timeZone = if ((mask0 and MASK_TIMEZONE) != 0L) timeZoneValue else result.timeZone,
         geoEnabled = if ((mask0 and MASK_GEOENABLED) != 0L) geoEnabledValue else result.geoEnabled,
         verified = if ((mask0 and MASK_VERIFIED) != 0L) verifiedValue else result.verified,
         statusesCount = if ((mask0 and MASK_STATUSESCOUNT) != 0L) statusesCountValue else result.statusesCount,
         lang = if ((mask0 and MASK_LANG) != 0L) langValue else result.lang,
         contributorsEnabled = if ((mask0 and MASK_CONTRIBUTORSENABLED) != 0L) contributorsEnabledValue else result.contributorsEnabled,
         isTranslator = if ((mask0 and MASK_ISTRANSLATOR) != 0L) isTranslatorValue else result.isTranslator,
         isTranslationEnabled = if ((mask0 and MASK_ISTRANSLATIONENABLED) != 0L) isTranslationEnabledValue else result.isTranslationEnabled,
         profileBackgroundTile = if ((mask0 and MASK_PROFILEBACKGROUNDTILE) != 0L) profileBackgroundTileValue else result.profileBackgroundTile,
         profileBannerUrl = if ((mask0 and MASK_PROFILEBANNERURL) != 0L) profileBannerUrlValue else result.profileBannerUrl,
         profileTextColor = if ((mask0 and MASK_PROFILETEXTCOLOR) != 0L) profileTextColorValue else result.profileTextColor,
         profileUseBackgroundImage = if ((mask0 and MASK_PROFILEUSEBACKGROUNDIMAGE) != 0L) profileUseBackgroundImageValue else result.profileUseBackgroundImage,
         defaultProfile = if ((mask0 and MASK_DEFAULTPROFILE) != 0L) defaultProfileValue else result.defaultProfile,
         defaultProfileImage = if ((mask0 and MASK_DEFAULTPROFILEIMAGE) != 0L) defaultProfileImageValue else result.defaultProfileImage,
         following = if ((mask0 and MASK_FOLLOWING) != 0L) followingValue else result.following,
         followRequestSent = if ((mask0 and MASK_FOLLOWREQUESTSENT) != 0L) followRequestSentValue else result.followRequestSent,
         notifications = if ((mask0 and MASK_NOTIFICATIONS) != 0L) notificationsValue else result.notifications,
       )
     } else {
       return result
     }
   }
 
   private fun validateRequiredFields(mask0: Long, reader: GhostJsonReader) {
     if ((mask0 and MASK_REQUIRED_0) != MASK_REQUIRED_0) {
       if ((mask0 and MASK_ID) == 0L) {
         reader.throwError("Required field 'id' missing in JSON")
       } else if ((mask0 and MASK_IDSTR) == 0L) {
         reader.throwError("Required field 'id_str' missing in JSON")
       } else if ((mask0 and MASK_SCREENNAME) == 0L) {
         reader.throwError("Required field 'screen_name' missing in JSON")
       } else if ((mask0 and MASK_ENTITIES) == 0L) {
         reader.throwError("Required field 'entities' missing in JSON")
       } else if ((mask0 and MASK_CREATEDAT) == 0L) {
         reader.throwError("Required field 'created_at' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDCOLOR) == 0L) {
         reader.throwError("Required field 'profile_background_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDIMAGEURL) == 0L) {
         reader.throwError("Required field 'profile_background_image_url' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDIMAGEURLHTTPS) == 0L) {
         reader.throwError("Required field 'profile_background_image_url_https' missing in JSON")
       } else if ((mask0 and MASK_PROFILEIMAGEURL) == 0L) {
         reader.throwError("Required field 'profile_image_url' missing in JSON")
       } else if ((mask0 and MASK_PROFILEIMAGEURLHTTPS) == 0L) {
         reader.throwError("Required field 'profile_image_url_https' missing in JSON")
       } else if ((mask0 and MASK_PROFILELINKCOLOR) == 0L) {
         reader.throwError("Required field 'profile_link_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILESIDEBARBORDERCOLOR) == 0L) {
         reader.throwError("Required field 'profile_sidebar_border_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILESIDEBARFILLCOLOR) == 0L) {
         reader.throwError("Required field 'profile_sidebar_fill_color' missing in JSON")
       }
     }
   }
 
   /**
    * Robust deserialization for [User].
    */
   override fun deserialize(reader: GhostJsonReader): User {
     var idValue: Long = 0L
     var idStrValue: String? = null
     var nameValue: String? = null
     var screenNameValue: String? = null
     var locationValue: String? = null
     var descriptionValue: String? = null
     var urlValue: String? = null
     var entitiesValue: UserEntities? = null
     var protectedValue: Boolean = false
     var followersCountValue: Int = 0
     var friendsCountValue: Int = 0
     var listedCountValue: Int = 0
     var createdAtValue: String? = null
     var favouritesCountValue: Int = 0
     var utcOffsetValue: Int? = null
     var timeZoneValue: String? = null
     var geoEnabledValue: Boolean = false
     var verifiedValue: Boolean = false
     var statusesCountValue: Int = 0
     var langValue: String? = null
     var contributorsEnabledValue: Boolean = false
     var isTranslatorValue: Boolean = false
     var isTranslationEnabledValue: Boolean = false
     var profileBackgroundColorValue: String? = null
     var profileBackgroundImageUrlValue: String? = null
     var profileBackgroundImageUrlHttpsValue: String? = null
     var profileBackgroundTileValue: Boolean = false
     var profileImageUrlValue: String? = null
     var profileImageUrlHttpsValue: String? = null
     var profileBannerUrlValue: String? = null
     var profileLinkColorValue: String? = null
     var profileSidebarBorderColorValue: String? = null
     var profileSidebarFillColorValue: String? = null
     var profileTextColorValue: String? = null
     var profileUseBackgroundImageValue: Boolean = false
     var defaultProfileValue: Boolean = false
     var defaultProfileImageValue: Boolean = false
     var followingValue: Boolean = false
     var followRequestSentValue: Boolean = false
     var notificationsValue: Boolean = false
     var mask0 = 0L
     reader.beginObject()
     while (true) {
       val index = reader.selectNameAndConsume(OPTIONS)
       when (index) {
         0 -> {
           idValue = reader.nextLong()
           mask0 = mask0 or MASK_ID
         }
         1 -> {
           idStrValue = reader.nextString()
           mask0 = mask0 or MASK_IDSTR
         }
         2 -> {
           nameValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_NAME
         }
         3 -> {
           screenNameValue = reader.nextString()
           mask0 = mask0 or MASK_SCREENNAME
         }
         4 -> {
           locationValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_LOCATION
         }
         5 -> {
           descriptionValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_DESCRIPTION
         }
         6 -> {
           urlValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_URL
         }
         7 -> {
           entitiesValue = UserEntitiesSerializer.deserialize(reader)
           mask0 = mask0 or MASK_ENTITIES
         }
         8 -> {
           protectedValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROTECTED
         }
         9 -> {
           followersCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FOLLOWERSCOUNT
         }
         10 -> {
           friendsCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FRIENDSCOUNT
         }
         11 -> {
           listedCountValue = reader.nextInt()
           mask0 = mask0 or MASK_LISTEDCOUNT
         }
         12 -> {
           createdAtValue = reader.nextString()
           mask0 = mask0 or MASK_CREATEDAT
         }
         13 -> {
           favouritesCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FAVOURITESCOUNT
         }
         14 -> {
           utcOffsetValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextInt()
           mask0 = mask0 or MASK_UTCOFFSET
         }
         15 -> {
           timeZoneValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_TIMEZONE
         }
         16 -> {
           geoEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_GEOENABLED
         }
         17 -> {
           verifiedValue = reader.nextBoolean()
           mask0 = mask0 or MASK_VERIFIED
         }
         18 -> {
           statusesCountValue = reader.nextInt()
           mask0 = mask0 or MASK_STATUSESCOUNT
         }
         19 -> {
           langValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_LANG
         }
         20 -> {
           contributorsEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_CONTRIBUTORSENABLED
         }
         21 -> {
           isTranslatorValue = reader.nextBoolean()
           mask0 = mask0 or MASK_ISTRANSLATOR
         }
         22 -> {
           isTranslationEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_ISTRANSLATIONENABLED
         }
         23 -> {
           profileBackgroundColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDCOLOR
         }
         24 -> {
           profileBackgroundImageUrlValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDIMAGEURL
         }
         25 -> {
           profileBackgroundImageUrlHttpsValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDIMAGEURLHTTPS
         }
         26 -> {
           profileBackgroundTileValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDTILE
         }
         27 -> {
           profileImageUrlValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEIMAGEURL
         }
         28 -> {
           profileImageUrlHttpsValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEIMAGEURLHTTPS
         }
         29 -> {
           profileBannerUrlValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_PROFILEBANNERURL
         }
         30 -> {
           profileLinkColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILELINKCOLOR
         }
         31 -> {
           profileSidebarBorderColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILESIDEBARBORDERCOLOR
         }
         32 -> {
           profileSidebarFillColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILESIDEBARFILLCOLOR
         }
         33 -> {
           profileTextColorValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_PROFILETEXTCOLOR
         }
         34 -> {
           profileUseBackgroundImageValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROFILEUSEBACKGROUNDIMAGE
         }
         35 -> {
           defaultProfileValue = reader.nextBoolean()
           mask0 = mask0 or MASK_DEFAULTPROFILE
         }
         36 -> {
           defaultProfileImageValue = reader.nextBoolean()
           mask0 = mask0 or MASK_DEFAULTPROFILEIMAGE
         }
         37 -> {
           followingValue = reader.nextBoolean()
           mask0 = mask0 or MASK_FOLLOWING
         }
         38 -> {
           followRequestSentValue = reader.nextBoolean()
           mask0 = mask0 or MASK_FOLLOWREQUESTSENT
         }
         39 -> {
           notificationsValue = reader.nextBoolean()
           mask0 = mask0 or MASK_NOTIFICATIONS
         }
         -1 -> break
         -2 -> {
           reader.skipValue()
         }
       }
     }
     reader.endObject()
     validateRequiredFields(mask0, reader)
     return createInstance(mask0, idValue, idStrValue, nameValue, screenNameValue, locationValue, descriptionValue, urlValue, entitiesValue, protectedValue, followersCountValue, friendsCountValue, listedCountValue, createdAtValue, favouritesCountValue, utcOffsetValue, timeZoneValue, geoEnabledValue, verifiedValue, statusesCountValue, langValue, contributorsEnabledValue, isTranslatorValue, isTranslationEnabledValue, profileBackgroundColorValue, profileBackgroundImageUrlValue, profileBackgroundImageUrlHttpsValue, profileBackgroundTileValue, profileImageUrlValue, profileImageUrlHttpsValue, profileBannerUrlValue, profileLinkColorValue, profileSidebarBorderColorValue, profileSidebarFillColorValue, profileTextColorValue, profileUseBackgroundImageValue, defaultProfileValue, defaultProfileImageValue, followingValue, followRequestSentValue, notificationsValue)
   }
 
   private fun validateRequiredFields(mask0: Long, reader: GhostJsonFlatReader) {
     if ((mask0 and MASK_REQUIRED_0) != MASK_REQUIRED_0) {
       if ((mask0 and MASK_ID) == 0L) {
         reader.throwError("Required field 'id' missing in JSON")
       } else if ((mask0 and MASK_IDSTR) == 0L) {
         reader.throwError("Required field 'id_str' missing in JSON")
       } else if ((mask0 and MASK_SCREENNAME) == 0L) {
         reader.throwError("Required field 'screen_name' missing in JSON")
       } else if ((mask0 and MASK_ENTITIES) == 0L) {
         reader.throwError("Required field 'entities' missing in JSON")
       } else if ((mask0 and MASK_CREATEDAT) == 0L) {
         reader.throwError("Required field 'created_at' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDCOLOR) == 0L) {
         reader.throwError("Required field 'profile_background_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDIMAGEURL) == 0L) {
         reader.throwError("Required field 'profile_background_image_url' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDIMAGEURLHTTPS) == 0L) {
         reader.throwError("Required field 'profile_background_image_url_https' missing in JSON")
       } else if ((mask0 and MASK_PROFILEIMAGEURL) == 0L) {
         reader.throwError("Required field 'profile_image_url' missing in JSON")
       } else if ((mask0 and MASK_PROFILEIMAGEURLHTTPS) == 0L) {
         reader.throwError("Required field 'profile_image_url_https' missing in JSON")
       } else if ((mask0 and MASK_PROFILELINKCOLOR) == 0L) {
         reader.throwError("Required field 'profile_link_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILESIDEBARBORDERCOLOR) == 0L) {
         reader.throwError("Required field 'profile_sidebar_border_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILESIDEBARFILLCOLOR) == 0L) {
         reader.throwError("Required field 'profile_sidebar_fill_color' missing in JSON")
       }
     }
   }
 
   /**
    * Robust deserialization for [User].
    */
   override fun deserialize(reader: GhostJsonFlatReader): User {
     var idValue: Long = 0L
     var idStrValue: String? = null
     var nameValue: String? = null
     var screenNameValue: String? = null
     var locationValue: String? = null
     var descriptionValue: String? = null
     var urlValue: String? = null
     var entitiesValue: UserEntities? = null
     var protectedValue: Boolean = false
     var followersCountValue: Int = 0
     var friendsCountValue: Int = 0
     var listedCountValue: Int = 0
     var createdAtValue: String? = null
     var favouritesCountValue: Int = 0
     var utcOffsetValue: Int? = null
     var timeZoneValue: String? = null
     var geoEnabledValue: Boolean = false
     var verifiedValue: Boolean = false
     var statusesCountValue: Int = 0
     var langValue: String? = null
     var contributorsEnabledValue: Boolean = false
     var isTranslatorValue: Boolean = false
     var isTranslationEnabledValue: Boolean = false
     var profileBackgroundColorValue: String? = null
     var profileBackgroundImageUrlValue: String? = null
     var profileBackgroundImageUrlHttpsValue: String? = null
     var profileBackgroundTileValue: Boolean = false
     var profileImageUrlValue: String? = null
     var profileImageUrlHttpsValue: String? = null
     var profileBannerUrlValue: String? = null
     var profileLinkColorValue: String? = null
     var profileSidebarBorderColorValue: String? = null
     var profileSidebarFillColorValue: String? = null
     var profileTextColorValue: String? = null
     var profileUseBackgroundImageValue: Boolean = false
     var defaultProfileValue: Boolean = false
     var defaultProfileImageValue: Boolean = false
     var followingValue: Boolean = false
     var followRequestSentValue: Boolean = false
     var notificationsValue: Boolean = false
     var mask0 = 0L
     reader.beginObject()
     while (true) {
       val index = reader.selectNameAndConsume(OPTIONS)
       when (index) {
         0 -> {
           idValue = reader.nextLong()
           mask0 = mask0 or MASK_ID
         }
         1 -> {
           idStrValue = reader.nextString()
           mask0 = mask0 or MASK_IDSTR
         }
         2 -> {
           nameValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_NAME
         }
         3 -> {
           screenNameValue = reader.nextString()
           mask0 = mask0 or MASK_SCREENNAME
         }
         4 -> {
           locationValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_LOCATION
         }
         5 -> {
           descriptionValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_DESCRIPTION
         }
         6 -> {
           urlValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_URL
         }
         7 -> {
           entitiesValue = UserEntitiesSerializer.deserialize(reader)
           mask0 = mask0 or MASK_ENTITIES
         }
         8 -> {
           protectedValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROTECTED
         }
         9 -> {
           followersCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FOLLOWERSCOUNT
         }
         10 -> {
           friendsCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FRIENDSCOUNT
         }
         11 -> {
           listedCountValue = reader.nextInt()
           mask0 = mask0 or MASK_LISTEDCOUNT
         }
         12 -> {
           createdAtValue = reader.nextString()
           mask0 = mask0 or MASK_CREATEDAT
         }
         13 -> {
           favouritesCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FAVOURITESCOUNT
         }
         14 -> {
           utcOffsetValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextInt()
           mask0 = mask0 or MASK_UTCOFFSET
         }
         15 -> {
           timeZoneValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_TIMEZONE
         }
         16 -> {
           geoEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_GEOENABLED
         }
         17 -> {
           verifiedValue = reader.nextBoolean()
           mask0 = mask0 or MASK_VERIFIED
         }
         18 -> {
           statusesCountValue = reader.nextInt()
           mask0 = mask0 or MASK_STATUSESCOUNT
         }
         19 -> {
           langValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_LANG
         }
         20 -> {
           contributorsEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_CONTRIBUTORSENABLED
         }
         21 -> {
           isTranslatorValue = reader.nextBoolean()
           mask0 = mask0 or MASK_ISTRANSLATOR
         }
         22 -> {
           isTranslationEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_ISTRANSLATIONENABLED
         }
         23 -> {
           profileBackgroundColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDCOLOR
         }
         24 -> {
           profileBackgroundImageUrlValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDIMAGEURL
         }
         25 -> {
           profileBackgroundImageUrlHttpsValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDIMAGEURLHTTPS
         }
         26 -> {
           profileBackgroundTileValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDTILE
         }
         27 -> {
           profileImageUrlValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEIMAGEURL
         }
         28 -> {
           profileImageUrlHttpsValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEIMAGEURLHTTPS
         }
         29 -> {
           profileBannerUrlValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_PROFILEBANNERURL
         }
         30 -> {
           profileLinkColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILELINKCOLOR
         }
         31 -> {
           profileSidebarBorderColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILESIDEBARBORDERCOLOR
         }
         32 -> {
           profileSidebarFillColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILESIDEBARFILLCOLOR
         }
         33 -> {
           profileTextColorValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_PROFILETEXTCOLOR
         }
         34 -> {
           profileUseBackgroundImageValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROFILEUSEBACKGROUNDIMAGE
         }
         35 -> {
           defaultProfileValue = reader.nextBoolean()
           mask0 = mask0 or MASK_DEFAULTPROFILE
         }
         36 -> {
           defaultProfileImageValue = reader.nextBoolean()
           mask0 = mask0 or MASK_DEFAULTPROFILEIMAGE
         }
         37 -> {
           followingValue = reader.nextBoolean()
           mask0 = mask0 or MASK_FOLLOWING
         }
         38 -> {
           followRequestSentValue = reader.nextBoolean()
           mask0 = mask0 or MASK_FOLLOWREQUESTSENT
         }
         39 -> {
           notificationsValue = reader.nextBoolean()
           mask0 = mask0 or MASK_NOTIFICATIONS
         }
         -1 -> break
         -2 -> {
           reader.skipValue()
         }
       }
     }
     reader.endObject()
     validateRequiredFields(mask0, reader)
     return createInstance(mask0, idValue, idStrValue, nameValue, screenNameValue, locationValue, descriptionValue, urlValue, entitiesValue, protectedValue, followersCountValue, friendsCountValue, listedCountValue, createdAtValue, favouritesCountValue, utcOffsetValue, timeZoneValue, geoEnabledValue, verifiedValue, statusesCountValue, langValue, contributorsEnabledValue, isTranslatorValue, isTranslationEnabledValue, profileBackgroundColorValue, profileBackgroundImageUrlValue, profileBackgroundImageUrlHttpsValue, profileBackgroundTileValue, profileImageUrlValue, profileImageUrlHttpsValue, profileBannerUrlValue, profileLinkColorValue, profileSidebarBorderColorValue, profileSidebarFillColorValue, profileTextColorValue, profileUseBackgroundImageValue, defaultProfileValue, defaultProfileImageValue, followingValue, followRequestSentValue, notificationsValue)
   }
 
   private fun validateRequiredFields(mask0: Long, reader: GhostJsonStringReader) {
     if ((mask0 and MASK_REQUIRED_0) != MASK_REQUIRED_0) {
       if ((mask0 and MASK_ID) == 0L) {
         reader.throwError("Required field 'id' missing in JSON")
       } else if ((mask0 and MASK_IDSTR) == 0L) {
         reader.throwError("Required field 'id_str' missing in JSON")
       } else if ((mask0 and MASK_SCREENNAME) == 0L) {
         reader.throwError("Required field 'screen_name' missing in JSON")
       } else if ((mask0 and MASK_ENTITIES) == 0L) {
         reader.throwError("Required field 'entities' missing in JSON")
       } else if ((mask0 and MASK_CREATEDAT) == 0L) {
         reader.throwError("Required field 'created_at' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDCOLOR) == 0L) {
         reader.throwError("Required field 'profile_background_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDIMAGEURL) == 0L) {
         reader.throwError("Required field 'profile_background_image_url' missing in JSON")
       } else if ((mask0 and MASK_PROFILEBACKGROUNDIMAGEURLHTTPS) == 0L) {
         reader.throwError("Required field 'profile_background_image_url_https' missing in JSON")
       } else if ((mask0 and MASK_PROFILEIMAGEURL) == 0L) {
         reader.throwError("Required field 'profile_image_url' missing in JSON")
       } else if ((mask0 and MASK_PROFILEIMAGEURLHTTPS) == 0L) {
         reader.throwError("Required field 'profile_image_url_https' missing in JSON")
       } else if ((mask0 and MASK_PROFILELINKCOLOR) == 0L) {
         reader.throwError("Required field 'profile_link_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILESIDEBARBORDERCOLOR) == 0L) {
         reader.throwError("Required field 'profile_sidebar_border_color' missing in JSON")
       } else if ((mask0 and MASK_PROFILESIDEBARFILLCOLOR) == 0L) {
         reader.throwError("Required field 'profile_sidebar_fill_color' missing in JSON")
       }
     }
   }
 
   /**
    * Robust deserialization for [User].
    */
   override fun deserialize(reader: GhostJsonStringReader): User {
     var idValue: Long = 0L
     var idStrValue: String? = null
     var nameValue: String? = null
     var screenNameValue: String? = null
     var locationValue: String? = null
     var descriptionValue: String? = null
     var urlValue: String? = null
     var entitiesValue: UserEntities? = null
     var protectedValue: Boolean = false
     var followersCountValue: Int = 0
     var friendsCountValue: Int = 0
     var listedCountValue: Int = 0
     var createdAtValue: String? = null
     var favouritesCountValue: Int = 0
     var utcOffsetValue: Int? = null
     var timeZoneValue: String? = null
     var geoEnabledValue: Boolean = false
     var verifiedValue: Boolean = false
     var statusesCountValue: Int = 0
     var langValue: String? = null
     var contributorsEnabledValue: Boolean = false
     var isTranslatorValue: Boolean = false
     var isTranslationEnabledValue: Boolean = false
     var profileBackgroundColorValue: String? = null
     var profileBackgroundImageUrlValue: String? = null
     var profileBackgroundImageUrlHttpsValue: String? = null
     var profileBackgroundTileValue: Boolean = false
     var profileImageUrlValue: String? = null
     var profileImageUrlHttpsValue: String? = null
     var profileBannerUrlValue: String? = null
     var profileLinkColorValue: String? = null
     var profileSidebarBorderColorValue: String? = null
     var profileSidebarFillColorValue: String? = null
     var profileTextColorValue: String? = null
     var profileUseBackgroundImageValue: Boolean = false
     var defaultProfileValue: Boolean = false
     var defaultProfileImageValue: Boolean = false
     var followingValue: Boolean = false
     var followRequestSentValue: Boolean = false
     var notificationsValue: Boolean = false
     var mask0 = 0L
     reader.beginObject()
     while (true) {
       val index = reader.selectNameAndConsume(OPTIONS)
       when (index) {
         0 -> {
           idValue = reader.nextLong()
           mask0 = mask0 or MASK_ID
         }
         1 -> {
           idStrValue = reader.nextString()
           mask0 = mask0 or MASK_IDSTR
         }
         2 -> {
           nameValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_NAME
         }
         3 -> {
           screenNameValue = reader.nextString()
           mask0 = mask0 or MASK_SCREENNAME
         }
         4 -> {
           locationValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_LOCATION
         }
         5 -> {
           descriptionValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_DESCRIPTION
         }
         6 -> {
           urlValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_URL
         }
         7 -> {
           entitiesValue = UserEntitiesSerializer.deserialize(reader)
           mask0 = mask0 or MASK_ENTITIES
         }
         8 -> {
           protectedValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROTECTED
         }
         9 -> {
           followersCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FOLLOWERSCOUNT
         }
         10 -> {
           friendsCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FRIENDSCOUNT
         }
         11 -> {
           listedCountValue = reader.nextInt()
           mask0 = mask0 or MASK_LISTEDCOUNT
         }
         12 -> {
           createdAtValue = reader.nextString()
           mask0 = mask0 or MASK_CREATEDAT
         }
         13 -> {
           favouritesCountValue = reader.nextInt()
           mask0 = mask0 or MASK_FAVOURITESCOUNT
         }
         14 -> {
           utcOffsetValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextInt()
           mask0 = mask0 or MASK_UTCOFFSET
         }
         15 -> {
           timeZoneValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_TIMEZONE
         }
         16 -> {
           geoEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_GEOENABLED
         }
         17 -> {
           verifiedValue = reader.nextBoolean()
           mask0 = mask0 or MASK_VERIFIED
         }
         18 -> {
           statusesCountValue = reader.nextInt()
           mask0 = mask0 or MASK_STATUSESCOUNT
         }
         19 -> {
           langValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_LANG
         }
         20 -> {
           contributorsEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_CONTRIBUTORSENABLED
         }
         21 -> {
           isTranslatorValue = reader.nextBoolean()
           mask0 = mask0 or MASK_ISTRANSLATOR
         }
         22 -> {
           isTranslationEnabledValue = reader.nextBoolean()
           mask0 = mask0 or MASK_ISTRANSLATIONENABLED
         }
         23 -> {
           profileBackgroundColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDCOLOR
         }
         24 -> {
           profileBackgroundImageUrlValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDIMAGEURL
         }
         25 -> {
           profileBackgroundImageUrlHttpsValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDIMAGEURLHTTPS
         }
         26 -> {
           profileBackgroundTileValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROFILEBACKGROUNDTILE
         }
         27 -> {
           profileImageUrlValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEIMAGEURL
         }
         28 -> {
           profileImageUrlHttpsValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILEIMAGEURLHTTPS
         }
         29 -> {
           profileBannerUrlValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_PROFILEBANNERURL
         }
         30 -> {
           profileLinkColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILELINKCOLOR
         }
         31 -> {
           profileSidebarBorderColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILESIDEBARBORDERCOLOR
         }
         32 -> {
           profileSidebarFillColorValue = reader.nextString()
           mask0 = mask0 or MASK_PROFILESIDEBARFILLCOLOR
         }
         33 -> {
           profileTextColorValue = if (reader.isNextNullValue()) { reader.consumeNull(); null } else reader.nextString()
           mask0 = mask0 or MASK_PROFILETEXTCOLOR
         }
         34 -> {
           profileUseBackgroundImageValue = reader.nextBoolean()
           mask0 = mask0 or MASK_PROFILEUSEBACKGROUNDIMAGE
         }
         35 -> {
           defaultProfileValue = reader.nextBoolean()
           mask0 = mask0 or MASK_DEFAULTPROFILE
         }
         36 -> {
           defaultProfileImageValue = reader.nextBoolean()
           mask0 = mask0 or MASK_DEFAULTPROFILEIMAGE
         }
         37 -> {
           followingValue = reader.nextBoolean()
           mask0 = mask0 or MASK_FOLLOWING
         }
         38 -> {
           followRequestSentValue = reader.nextBoolean()
           mask0 = mask0 or MASK_FOLLOWREQUESTSENT
         }
         39 -> {
           notificationsValue = reader.nextBoolean()
           mask0 = mask0 or MASK_NOTIFICATIONS
         }
         -1 -> break
         -2 -> {
           reader.skipValue()
         }
       }
     }
     reader.endObject()
     validateRequiredFields(mask0, reader)
     return createInstance(mask0, idValue, idStrValue, nameValue, screenNameValue, locationValue, descriptionValue, urlValue, entitiesValue, protectedValue, followersCountValue, friendsCountValue, listedCountValue, createdAtValue, favouritesCountValue, utcOffsetValue, timeZoneValue, geoEnabledValue, verifiedValue, statusesCountValue, langValue, contributorsEnabledValue, isTranslatorValue, isTranslationEnabledValue, profileBackgroundColorValue, profileBackgroundImageUrlValue, profileBackgroundImageUrlHttpsValue, profileBackgroundTileValue, profileImageUrlValue, profileImageUrlHttpsValue, profileBannerUrlValue, profileLinkColorValue, profileSidebarBorderColorValue, profileSidebarFillColorValue, profileTextColorValue, profileUseBackgroundImageValue, defaultProfileValue, defaultProfileImageValue, followingValue, followRequestSentValue, notificationsValue)
   }
 
   override fun serialize(writer: GhostJsonWriter, `value`: User) {
     writer.beginObject()
     writer.writeField(H_ID, value.id)
     writer.writeField(H_ID_STR, value.idStr)
     if (value.name != null) {
       writer.writeField(H_NAME, value.name)
     }
     writer.writeField(H_SCREEN_NAME, value.screenName)
     if (value.location != null) {
       writer.writeField(H_LOCATION, value.location)
     }
     if (value.description != null) {
       writer.writeField(H_DESCRIPTION, value.description)
     }
     if (value.url != null) {
       writer.writeField(H_URL, value.url)
     }
     writer.writeNameRaw(H_ENTITIES)
     UserEntitiesSerializer.serialize(writer, value.entities)
     writer.writeField(H_PROTECTED, value.`protected`)
     writer.writeField(H_FOLLOWERS_COUNT, value.followersCount)
     writer.writeField(H_FRIENDS_COUNT, value.friendsCount)
     writer.writeField(H_LISTED_COUNT, value.listedCount)
     writer.writeField(H_CREATED_AT, value.createdAt)
     writer.writeField(H_FAVOURITES_COUNT, value.favouritesCount)
     if (value.utcOffset != null) {
       writer.writeField(H_UTC_OFFSET, value.utcOffset)
     }
     if (value.timeZone != null) {
       writer.writeField(H_TIME_ZONE, value.timeZone)
     }
     writer.writeField(H_GEO_ENABLED, value.geoEnabled)
     writer.writeField(H_VERIFIED, value.verified)
     writer.writeField(H_STATUSES_COUNT, value.statusesCount)
     if (value.lang != null) {
       writer.writeField(H_LANG, value.lang)
     }
     writer.writeField(H_CONTRIBUTORS_ENABLED, value.contributorsEnabled)
     writer.writeField(H_IS_TRANSLATOR, value.isTranslator)
     writer.writeField(H_IS_TRANSLATION_ENABLED, value.isTranslationEnabled)
     writer.writeField(H_PROFILE_BACKGROUND_COLOR, value.profileBackgroundColor)
     writer.writeField(H_PROFILE_BACKGROUND_IMAGE_URL, value.profileBackgroundImageUrl)
     writer.writeField(H_PROFILE_BACKGROUND_IMAGE_URL_HTTPS, value.profileBackgroundImageUrlHttps)
     writer.writeField(H_PROFILE_BACKGROUND_TILE, value.profileBackgroundTile)
     writer.writeField(H_PROFILE_IMAGE_URL, value.profileImageUrl)
     writer.writeField(H_PROFILE_IMAGE_URL_HTTPS, value.profileImageUrlHttps)
     if (value.profileBannerUrl != null) {
       writer.writeField(H_PROFILE_BANNER_URL, value.profileBannerUrl)
     }
     writer.writeField(H_PROFILE_LINK_COLOR, value.profileLinkColor)
     writer.writeField(H_PROFILE_SIDEBAR_BORDER_COLOR, value.profileSidebarBorderColor)
     writer.writeField(H_PROFILE_SIDEBAR_FILL_COLOR, value.profileSidebarFillColor)
     if (value.profileTextColor != null) {
       writer.writeField(H_PROFILE_TEXT_COLOR, value.profileTextColor)
     }
     writer.writeField(H_PROFILE_USE_BACKGROUND_IMAGE, value.profileUseBackgroundImage)
     writer.writeField(H_DEFAULT_PROFILE, value.defaultProfile)
     writer.writeField(H_DEFAULT_PROFILE_IMAGE, value.defaultProfileImage)
     writer.writeField(H_FOLLOWING, value.following)
     writer.writeField(H_FOLLOW_REQUEST_SENT, value.followRequestSent)
     writer.writeField(H_NOTIFICATIONS, value.notifications)
     writer.endObject()
   }
 
   override fun serialize(writer: GhostJsonFlatWriter, `value`: User) {
     writer.beginObject()
     writer.writeField(H_ID, value.id)
     writer.writeField(H_ID_STR, value.idStr)
     if (value.name != null) {
       writer.writeField(H_NAME, value.name)
     }
     writer.writeField(H_SCREEN_NAME, value.screenName)
     if (value.location != null) {
       writer.writeField(H_LOCATION, value.location)
     }
     if (value.description != null) {
       writer.writeField(H_DESCRIPTION, value.description)
     }
     if (value.url != null) {
       writer.writeField(H_URL, value.url)
     }
     writer.writeNameRaw(H_ENTITIES)
     UserEntitiesSerializer.serialize(writer, value.entities)
     writer.writeField(H_PROTECTED, value.`protected`)
     writer.writeField(H_FOLLOWERS_COUNT, value.followersCount)
     writer.writeField(H_FRIENDS_COUNT, value.friendsCount)
     writer.writeField(H_LISTED_COUNT, value.listedCount)
     writer.writeField(H_CREATED_AT, value.createdAt)
     writer.writeField(H_FAVOURITES_COUNT, value.favouritesCount)
     if (value.utcOffset != null) {
       writer.writeField(H_UTC_OFFSET, value.utcOffset)
     }
     if (value.timeZone != null) {
       writer.writeField(H_TIME_ZONE, value.timeZone)
     }
     writer.writeField(H_GEO_ENABLED, value.geoEnabled)
     writer.writeField(H_VERIFIED, value.verified)
     writer.writeField(H_STATUSES_COUNT, value.statusesCount)
     if (value.lang != null) {
       writer.writeField(H_LANG, value.lang)
     }
     writer.writeField(H_CONTRIBUTORS_ENABLED, value.contributorsEnabled)
     writer.writeField(H_IS_TRANSLATOR, value.isTranslator)
     writer.writeField(H_IS_TRANSLATION_ENABLED, value.isTranslationEnabled)
     writer.writeField(H_PROFILE_BACKGROUND_COLOR, value.profileBackgroundColor)
     writer.writeField(H_PROFILE_BACKGROUND_IMAGE_URL, value.profileBackgroundImageUrl)
     writer.writeField(H_PROFILE_BACKGROUND_IMAGE_URL_HTTPS, value.profileBackgroundImageUrlHttps)
     writer.writeField(H_PROFILE_BACKGROUND_TILE, value.profileBackgroundTile)
     writer.writeField(H_PROFILE_IMAGE_URL, value.profileImageUrl)
     writer.writeField(H_PROFILE_IMAGE_URL_HTTPS, value.profileImageUrlHttps)
     if (value.profileBannerUrl != null) {
       writer.writeField(H_PROFILE_BANNER_URL, value.profileBannerUrl)
     }
     writer.writeField(H_PROFILE_LINK_COLOR, value.profileLinkColor)
     writer.writeField(H_PROFILE_SIDEBAR_BORDER_COLOR, value.profileSidebarBorderColor)
     writer.writeField(H_PROFILE_SIDEBAR_FILL_COLOR, value.profileSidebarFillColor)
     if (value.profileTextColor != null) {
       writer.writeField(H_PROFILE_TEXT_COLOR, value.profileTextColor)
     }
     writer.writeField(H_PROFILE_USE_BACKGROUND_IMAGE, value.profileUseBackgroundImage)
     writer.writeField(H_DEFAULT_PROFILE, value.defaultProfile)
     writer.writeField(H_DEFAULT_PROFILE_IMAGE, value.defaultProfileImage)
     writer.writeField(H_FOLLOWING, value.following)
     writer.writeField(H_FOLLOW_REQUEST_SENT, value.followRequestSent)
     writer.writeField(H_NOTIFICATIONS, value.notifications)
     writer.endObject()
   }
 
   override fun serialize(writer: GhostJsonStringWriter, `value`: User) {
     writer.beginObject()
     writer.writeField(HS_ID, value.id)
     writer.writeField(HS_ID_STR, value.idStr)
     if (value.name != null) {
       writer.writeField(HS_NAME, value.name)
     }
     writer.writeField(HS_SCREEN_NAME, value.screenName)
     if (value.location != null) {
       writer.writeField(HS_LOCATION, value.location)
     }
     if (value.description != null) {
       writer.writeField(HS_DESCRIPTION, value.description)
     }
     if (value.url != null) {
       writer.writeField(HS_URL, value.url)
     }
     writer.writeNameRaw(HS_ENTITIES)
     UserEntitiesSerializer.serialize(writer, value.entities)
     writer.writeField(HS_PROTECTED, value.`protected`)
     writer.writeField(HS_FOLLOWERS_COUNT, value.followersCount)
     writer.writeField(HS_FRIENDS_COUNT, value.friendsCount)
     writer.writeField(HS_LISTED_COUNT, value.listedCount)
     writer.writeField(HS_CREATED_AT, value.createdAt)
     writer.writeField(HS_FAVOURITES_COUNT, value.favouritesCount)
     if (value.utcOffset != null) {
       writer.writeField(HS_UTC_OFFSET, value.utcOffset)
     }
     if (value.timeZone != null) {
       writer.writeField(HS_TIME_ZONE, value.timeZone)
     }
     writer.writeField(HS_GEO_ENABLED, value.geoEnabled)
     writer.writeField(HS_VERIFIED, value.verified)
     writer.writeField(HS_STATUSES_COUNT, value.statusesCount)
     if (value.lang != null) {
       writer.writeField(HS_LANG, value.lang)
     }
     writer.writeField(HS_CONTRIBUTORS_ENABLED, value.contributorsEnabled)
     writer.writeField(HS_IS_TRANSLATOR, value.isTranslator)
     writer.writeField(HS_IS_TRANSLATION_ENABLED, value.isTranslationEnabled)
     writer.writeField(HS_PROFILE_BACKGROUND_COLOR, value.profileBackgroundColor)
     writer.writeField(HS_PROFILE_BACKGROUND_IMAGE_URL, value.profileBackgroundImageUrl)
     writer.writeField(HS_PROFILE_BACKGROUND_IMAGE_URL_HTTPS, value.profileBackgroundImageUrlHttps)
     writer.writeField(HS_PROFILE_BACKGROUND_TILE, value.profileBackgroundTile)
     writer.writeField(HS_PROFILE_IMAGE_URL, value.profileImageUrl)
     writer.writeField(HS_PROFILE_IMAGE_URL_HTTPS, value.profileImageUrlHttps)
     if (value.profileBannerUrl != null) {
       writer.writeField(HS_PROFILE_BANNER_URL, value.profileBannerUrl)
     }
     writer.writeField(HS_PROFILE_LINK_COLOR, value.profileLinkColor)
     writer.writeField(HS_PROFILE_SIDEBAR_BORDER_COLOR, value.profileSidebarBorderColor)
     writer.writeField(HS_PROFILE_SIDEBAR_FILL_COLOR, value.profileSidebarFillColor)
     if (value.profileTextColor != null) {
       writer.writeField(HS_PROFILE_TEXT_COLOR, value.profileTextColor)
     }
     writer.writeField(HS_PROFILE_USE_BACKGROUND_IMAGE, value.profileUseBackgroundImage)
     writer.writeField(HS_DEFAULT_PROFILE, value.defaultProfile)
     writer.writeField(HS_DEFAULT_PROFILE_IMAGE, value.defaultProfileImage)
     writer.writeField(HS_FOLLOWING, value.following)
     writer.writeField(HS_FOLLOW_REQUEST_SENT, value.followRequestSent)
     writer.writeField(HS_NOTIFICATIONS, value.notifications)
     writer.endObject()
   }
 
   override fun warmUp() {
     try {
       val reader1 = GhostJsonReader("{\"id\":0,\"id_str\":\"\",\"screen_name\":\"\",\"entities\":{},\"created_at\":\"\",\"profile_background_color\":\"\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_image_url\":\"\",\"profile_image_url_https\":\"\",\"profile_link_color\":\"\",\"profile_sidebar_border_color\":\"\",\"profile_sidebar_fill_color\":\"\"}".encodeToByteArray())
       deserialize(reader1)
     } catch (_: Exception) {
     }
     try {
       val reader2 = GhostJsonFlatReader("{\"id\":0,\"id_str\":\"\",\"screen_name\":\"\",\"entities\":{},\"created_at\":\"\",\"profile_background_color\":\"\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_image_url\":\"\",\"profile_image_url_https\":\"\",\"profile_link_color\":\"\",\"profile_sidebar_border_color\":\"\",\"profile_sidebar_fill_color\":\"\"}".encodeToByteArray())
       deserialize(reader2)
     } catch (_: Exception) {
     }
     try {
       val reader3 = GhostJsonStringReader("{\"id\":0,\"id_str\":\"\",\"screen_name\":\"\",\"entities\":{},\"created_at\":\"\",\"profile_background_color\":\"\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_image_url\":\"\",\"profile_image_url_https\":\"\",\"profile_link_color\":\"\",\"profile_sidebar_border_color\":\"\",\"profile_sidebar_fill_color\":\"\"}")
       deserialize(reader3)
     } catch (_: Exception) {
     }
   }
 }