summaryrefslogtreecommitdiff
path: root/benchmark/src/jmh/kotlin/kotlinx/benchmarks/model/MacroTwitterUntailored.kt
blob: fca69cc07a42a24e54a7319d6799f7f515e06556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
package kotlinx.benchmarks.model

import kotlinx.serialization.*
import kotlinx.serialization.json.*

/**
 * All model classes are the same as in MacroTwitter.kt but named accordingly to Kotlin naming policies to test JsonNamingStrategy performance.
 * Only Size, SizeType and Urls are not copied
 */

@Serializable
data class MacroTwitterFeedKt(
    val statuses: List<TwitterStatusKt>,
    val searchMetadata: SearchMetadata
)

@Serializable
data class MicroTwitterFeedKt(
    val statuses: List<TwitterTrimmedStatusKt>
)

@Serializable
data class TwitterTrimmedStatusKt(
    val metadata: MetadataKt,
    val createdAt: String,
    val id: Long,
    val idStr: String,
    val text: String,
    val source: String,
    val truncated: Boolean,
    val user: TwitterTrimmedUserKt,
    val retweetedStatus: TwitterTrimmedStatusKt? = null,
)

@Serializable
data class TwitterStatusKt(
    val metadata: MetadataKt,
    val createdAt: String,
    val id: Long,
    val idStr: String,
    val text: String,
    val source: String,
    val truncated: Boolean,
    val inReplyToStatusId: Long?,
    val inReplyToStatusIdStr: String?,
    val inReplyToUserId: Long?,
    val inReplyToUserIdStr: String?,
    val inReplyToScreenName: String?,
    val user: TwitterUserKt,
    val geo: String?,
    val coordinates: String?,
    val place: String?,
    val contributors: List<String>?,
    val retweetedStatus: TwitterStatusKt? = null,
    val retweetCount: Int,
    val favoriteCount: Int,
    val entities: StatusEntitiesKt,
    val favorited: Boolean,
    val retweeted: Boolean,
    val lang: String,
    val possiblySensitive: Boolean? = null
)

@Serializable
data class StatusEntitiesKt(
    val hashtags: List<Hashtag>,
    val symbols: List<String>,
    val urls: List<Url>,
    val userMentions: List<TwitterUserMentionKt>,
    val media: List<TwitterMediaKt>? = null
)

@Serializable
data class TwitterMediaKt(
    val id: Long,
    val idStr: String,
    val url: String,
    val mediaUrl: String,
    val mediaUrlHttps: String,
    val expandedUrl: String,
    val displayUrl: String,
    val indices: List<Int>,
    val type: String,
    val sizes: SizeType,
    val sourceStatusId: Long? = null,
    val sourceStatusIdStr: String? = null
)

@Serializable
data class TwitterUserMentionKt(
    val screenName: String,
    val name: String,
    val id: Long,
    val idStr: String,
    val indices: List<Int>
)

@Serializable
data class MetadataKt(
    val resultType: String,
    val isoLanguageCode: String
)

@Serializable
data class TwitterTrimmedUserKt(
    val id: Long,
    val idStr: String,
    val name: String,
    val screenName: String,
    val location: String,
    val description: String,
    val url: String?,
    val entities: UserEntitiesKt,
    val protected: Boolean,
    val followersCount: Int,
    val friendsCount: Int,
    val listedCount: Int,
    val createdAt: String,
    val favouritesCount: Int,
)

@Serializable
data class TwitterUserKt(
    val id: Long,
    val idStr: String,
    val name: String,
    val screenName: String,
    val location: String,
    val description: String,
    val url: String?,
    val entities: UserEntitiesKt,
    val protected: Boolean,
    val followersCount: Int,
    val friendsCount: Int,
    val listedCount: Int,
    val createdAt: String,
    val favouritesCount: Int,
    val utcOffset: Int?,
    val timeZone: String?,
    val geoEnabled: Boolean,
    val verified: Boolean,
    val statusesCount: Int,
    val lang: String,
    val contributorsEnabled: Boolean,
    val isTranslator: Boolean,
    val isTranslationEnabled: Boolean,
    val profileBackgroundColor: String,
    val profileBackgroundImageUrl: String,
    val profileBackgroundImageUrlHttps: String,
    val profileBackgroundTile: Boolean,
    val profileImageUrl: String,
    val profileImageUrlHttps: String,
    val profileBannerUrl: String? = null,
    val profileLinkColor: String,
    val profileSidebarBorderColor: String,
    val profileSidebarFillColor: String,
    val profileTextColor: String,
    val profileUseBackgroundImage: Boolean,
    val defaultProfile: Boolean,
    val defaultProfileImage: Boolean,
    val following: Boolean,
    val followRequestSent: Boolean,
    val notifications: Boolean
)

@Serializable
data class UserEntitiesKt(
    val url: Urls? = null,
    val description: Urls
)