• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package kotlinx.benchmarks.model
2 
3 import kotlinx.serialization.*
4 import kotlinx.serialization.json.*
5 
6 /**
7  * All model classes are the same as in MacroTwitter.kt but named accordingly to Kotlin naming policies to test JsonNamingStrategy performance.
8  * Only Size, SizeType and Urls are not copied
9  */
10 
11 @Serializable
12 data class MacroTwitterFeedKt(
13     val statuses: List<TwitterStatusKt>,
14     val searchMetadata: SearchMetadata
15 )
16 
17 @Serializable
18 data class MicroTwitterFeedKt(
19     val statuses: List<TwitterTrimmedStatusKt>
20 )
21 
22 @Serializable
23 data class TwitterTrimmedStatusKt(
24     val metadata: MetadataKt,
25     val createdAt: String,
26     val id: Long,
27     val idStr: String,
28     val text: String,
29     val source: String,
30     val truncated: Boolean,
31     val user: TwitterTrimmedUserKt,
32     val retweetedStatus: TwitterTrimmedStatusKt? = null,
33 )
34 
35 @Serializable
36 data class TwitterStatusKt(
37     val metadata: MetadataKt,
38     val createdAt: String,
39     val id: Long,
40     val idStr: String,
41     val text: String,
42     val source: String,
43     val truncated: Boolean,
44     val inReplyToStatusId: Long?,
45     val inReplyToStatusIdStr: String?,
46     val inReplyToUserId: Long?,
47     val inReplyToUserIdStr: String?,
48     val inReplyToScreenName: String?,
49     val user: TwitterUserKt,
50     val geo: String?,
51     val coordinates: String?,
52     val place: String?,
53     val contributors: List<String>?,
54     val retweetedStatus: TwitterStatusKt? = null,
55     val retweetCount: Int,
56     val favoriteCount: Int,
57     val entities: StatusEntitiesKt,
58     val favorited: Boolean,
59     val retweeted: Boolean,
60     val lang: String,
61     val possiblySensitive: Boolean? = null
62 )
63 
64 @Serializable
65 data class StatusEntitiesKt(
66     val hashtags: List<Hashtag>,
67     val symbols: List<String>,
68     val urls: List<Url>,
69     val userMentions: List<TwitterUserMentionKt>,
70     val media: List<TwitterMediaKt>? = null
71 )
72 
73 @Serializable
74 data class TwitterMediaKt(
75     val id: Long,
76     val idStr: String,
77     val url: String,
78     val mediaUrl: String,
79     val mediaUrlHttps: String,
80     val expandedUrl: String,
81     val displayUrl: String,
82     val indices: List<Int>,
83     val type: String,
84     val sizes: SizeType,
85     val sourceStatusId: Long? = null,
86     val sourceStatusIdStr: String? = null
87 )
88 
89 @Serializable
90 data class TwitterUserMentionKt(
91     val screenName: String,
92     val name: String,
93     val id: Long,
94     val idStr: String,
95     val indices: List<Int>
96 )
97 
98 @Serializable
99 data class MetadataKt(
100     val resultType: String,
101     val isoLanguageCode: String
102 )
103 
104 @Serializable
105 data class TwitterTrimmedUserKt(
106     val id: Long,
107     val idStr: String,
108     val name: String,
109     val screenName: String,
110     val location: String,
111     val description: String,
112     val url: String?,
113     val entities: UserEntitiesKt,
114     val protected: Boolean,
115     val followersCount: Int,
116     val friendsCount: Int,
117     val listedCount: Int,
118     val createdAt: String,
119     val favouritesCount: Int,
120 )
121 
122 @Serializable
123 data class TwitterUserKt(
124     val id: Long,
125     val idStr: String,
126     val name: String,
127     val screenName: String,
128     val location: String,
129     val description: String,
130     val url: String?,
131     val entities: UserEntitiesKt,
132     val protected: Boolean,
133     val followersCount: Int,
134     val friendsCount: Int,
135     val listedCount: Int,
136     val createdAt: String,
137     val favouritesCount: Int,
138     val utcOffset: Int?,
139     val timeZone: String?,
140     val geoEnabled: Boolean,
141     val verified: Boolean,
142     val statusesCount: Int,
143     val lang: String,
144     val contributorsEnabled: Boolean,
145     val isTranslator: Boolean,
146     val isTranslationEnabled: Boolean,
147     val profileBackgroundColor: String,
148     val profileBackgroundImageUrl: String,
149     val profileBackgroundImageUrlHttps: String,
150     val profileBackgroundTile: Boolean,
151     val profileImageUrl: String,
152     val profileImageUrlHttps: String,
153     val profileBannerUrl: String? = null,
154     val profileLinkColor: String,
155     val profileSidebarBorderColor: String,
156     val profileSidebarFillColor: String,
157     val profileTextColor: String,
158     val profileUseBackgroundImage: Boolean,
159     val defaultProfile: Boolean,
160     val defaultProfileImage: Boolean,
161     val following: Boolean,
162     val followRequestSent: Boolean,
163     val notifications: Boolean
164 )
165 
166 @Serializable
167 data class UserEntitiesKt(
168     val url: Urls? = null,
169     val description: Urls
170 )
171