|
22 | 22 | /** Generated class from Pigeon. */ |
23 | 23 | @SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"}) |
24 | 24 | public class Messages { |
| 25 | + |
25 | 26 | /** Generated class from Pigeon that represents data sent in messages. */ |
26 | 27 | public static class TextureMessage { |
27 | | - private @Nullable Long textureId; |
| 28 | + private @NonNull Long textureId; |
28 | 29 |
|
29 | | - public @Nullable Long getTextureId() { |
| 30 | + public @NonNull Long getTextureId() { |
30 | 31 | return textureId; |
31 | 32 | } |
32 | 33 |
|
33 | | - public void setTextureId(@Nullable Long setterArg) { |
| 34 | + public void setTextureId(@NonNull Long setterArg) { |
| 35 | + if (setterArg == null) { |
| 36 | + throw new IllegalStateException("Nonnull field \"textureId\" is null."); |
| 37 | + } |
34 | 38 | this.textureId = setterArg; |
35 | 39 | } |
36 | 40 |
|
| 41 | + /** Constructor is private to enforce null safety; use Builder. */ |
| 42 | + private TextureMessage() {} |
| 43 | + |
37 | 44 | public static class Builder { |
38 | 45 | private @Nullable Long textureId; |
39 | 46 |
|
40 | | - public @NonNull Builder setTextureId(@Nullable Long setterArg) { |
| 47 | + public @NonNull Builder setTextureId(@NonNull Long setterArg) { |
41 | 48 | this.textureId = setterArg; |
42 | 49 | return this; |
43 | 50 | } |
@@ -69,37 +76,46 @@ Map<String, Object> toMap() { |
69 | 76 |
|
70 | 77 | /** Generated class from Pigeon that represents data sent in messages. */ |
71 | 78 | public static class LoopingMessage { |
72 | | - private @Nullable Long textureId; |
| 79 | + private @NonNull Long textureId; |
73 | 80 |
|
74 | | - public @Nullable Long getTextureId() { |
| 81 | + public @NonNull Long getTextureId() { |
75 | 82 | return textureId; |
76 | 83 | } |
77 | 84 |
|
78 | | - public void setTextureId(@Nullable Long setterArg) { |
| 85 | + public void setTextureId(@NonNull Long setterArg) { |
| 86 | + if (setterArg == null) { |
| 87 | + throw new IllegalStateException("Nonnull field \"textureId\" is null."); |
| 88 | + } |
79 | 89 | this.textureId = setterArg; |
80 | 90 | } |
81 | 91 |
|
82 | | - private @Nullable Boolean isLooping; |
| 92 | + private @NonNull Boolean isLooping; |
83 | 93 |
|
84 | | - public @Nullable Boolean getIsLooping() { |
| 94 | + public @NonNull Boolean getIsLooping() { |
85 | 95 | return isLooping; |
86 | 96 | } |
87 | 97 |
|
88 | | - public void setIsLooping(@Nullable Boolean setterArg) { |
| 98 | + public void setIsLooping(@NonNull Boolean setterArg) { |
| 99 | + if (setterArg == null) { |
| 100 | + throw new IllegalStateException("Nonnull field \"isLooping\" is null."); |
| 101 | + } |
89 | 102 | this.isLooping = setterArg; |
90 | 103 | } |
91 | 104 |
|
| 105 | + /** Constructor is private to enforce null safety; use Builder. */ |
| 106 | + private LoopingMessage() {} |
| 107 | + |
92 | 108 | public static class Builder { |
93 | 109 | private @Nullable Long textureId; |
94 | 110 |
|
95 | | - public @NonNull Builder setTextureId(@Nullable Long setterArg) { |
| 111 | + public @NonNull Builder setTextureId(@NonNull Long setterArg) { |
96 | 112 | this.textureId = setterArg; |
97 | 113 | return this; |
98 | 114 | } |
99 | 115 |
|
100 | 116 | private @Nullable Boolean isLooping; |
101 | 117 |
|
102 | | - public @NonNull Builder setIsLooping(@Nullable Boolean setterArg) { |
| 118 | + public @NonNull Builder setIsLooping(@NonNull Boolean setterArg) { |
103 | 119 | this.isLooping = setterArg; |
104 | 120 | return this; |
105 | 121 | } |
@@ -135,37 +151,46 @@ Map<String, Object> toMap() { |
135 | 151 |
|
136 | 152 | /** Generated class from Pigeon that represents data sent in messages. */ |
137 | 153 | public static class VolumeMessage { |
138 | | - private @Nullable Long textureId; |
| 154 | + private @NonNull Long textureId; |
139 | 155 |
|
140 | | - public @Nullable Long getTextureId() { |
| 156 | + public @NonNull Long getTextureId() { |
141 | 157 | return textureId; |
142 | 158 | } |
143 | 159 |
|
144 | | - public void setTextureId(@Nullable Long setterArg) { |
| 160 | + public void setTextureId(@NonNull Long setterArg) { |
| 161 | + if (setterArg == null) { |
| 162 | + throw new IllegalStateException("Nonnull field \"textureId\" is null."); |
| 163 | + } |
145 | 164 | this.textureId = setterArg; |
146 | 165 | } |
147 | 166 |
|
148 | | - private @Nullable Double volume; |
| 167 | + private @NonNull Double volume; |
149 | 168 |
|
150 | | - public @Nullable Double getVolume() { |
| 169 | + public @NonNull Double getVolume() { |
151 | 170 | return volume; |
152 | 171 | } |
153 | 172 |
|
154 | | - public void setVolume(@Nullable Double setterArg) { |
| 173 | + public void setVolume(@NonNull Double setterArg) { |
| 174 | + if (setterArg == null) { |
| 175 | + throw new IllegalStateException("Nonnull field \"volume\" is null."); |
| 176 | + } |
155 | 177 | this.volume = setterArg; |
156 | 178 | } |
157 | 179 |
|
| 180 | + /** Constructor is private to enforce null safety; use Builder. */ |
| 181 | + private VolumeMessage() {} |
| 182 | + |
158 | 183 | public static class Builder { |
159 | 184 | private @Nullable Long textureId; |
160 | 185 |
|
161 | | - public @NonNull Builder setTextureId(@Nullable Long setterArg) { |
| 186 | + public @NonNull Builder setTextureId(@NonNull Long setterArg) { |
162 | 187 | this.textureId = setterArg; |
163 | 188 | return this; |
164 | 189 | } |
165 | 190 |
|
166 | 191 | private @Nullable Double volume; |
167 | 192 |
|
168 | | - public @NonNull Builder setVolume(@Nullable Double setterArg) { |
| 193 | + public @NonNull Builder setVolume(@NonNull Double setterArg) { |
169 | 194 | this.volume = setterArg; |
170 | 195 | return this; |
171 | 196 | } |
@@ -201,37 +226,46 @@ Map<String, Object> toMap() { |
201 | 226 |
|
202 | 227 | /** Generated class from Pigeon that represents data sent in messages. */ |
203 | 228 | public static class PlaybackSpeedMessage { |
204 | | - private @Nullable Long textureId; |
| 229 | + private @NonNull Long textureId; |
205 | 230 |
|
206 | | - public @Nullable Long getTextureId() { |
| 231 | + public @NonNull Long getTextureId() { |
207 | 232 | return textureId; |
208 | 233 | } |
209 | 234 |
|
210 | | - public void setTextureId(@Nullable Long setterArg) { |
| 235 | + public void setTextureId(@NonNull Long setterArg) { |
| 236 | + if (setterArg == null) { |
| 237 | + throw new IllegalStateException("Nonnull field \"textureId\" is null."); |
| 238 | + } |
211 | 239 | this.textureId = setterArg; |
212 | 240 | } |
213 | 241 |
|
214 | | - private @Nullable Double speed; |
| 242 | + private @NonNull Double speed; |
215 | 243 |
|
216 | | - public @Nullable Double getSpeed() { |
| 244 | + public @NonNull Double getSpeed() { |
217 | 245 | return speed; |
218 | 246 | } |
219 | 247 |
|
220 | | - public void setSpeed(@Nullable Double setterArg) { |
| 248 | + public void setSpeed(@NonNull Double setterArg) { |
| 249 | + if (setterArg == null) { |
| 250 | + throw new IllegalStateException("Nonnull field \"speed\" is null."); |
| 251 | + } |
221 | 252 | this.speed = setterArg; |
222 | 253 | } |
223 | 254 |
|
| 255 | + /** Constructor is private to enforce null safety; use Builder. */ |
| 256 | + private PlaybackSpeedMessage() {} |
| 257 | + |
224 | 258 | public static class Builder { |
225 | 259 | private @Nullable Long textureId; |
226 | 260 |
|
227 | | - public @NonNull Builder setTextureId(@Nullable Long setterArg) { |
| 261 | + public @NonNull Builder setTextureId(@NonNull Long setterArg) { |
228 | 262 | this.textureId = setterArg; |
229 | 263 | return this; |
230 | 264 | } |
231 | 265 |
|
232 | 266 | private @Nullable Double speed; |
233 | 267 |
|
234 | | - public @NonNull Builder setSpeed(@Nullable Double setterArg) { |
| 268 | + public @NonNull Builder setSpeed(@NonNull Double setterArg) { |
235 | 269 | this.speed = setterArg; |
236 | 270 | return this; |
237 | 271 | } |
@@ -267,37 +301,46 @@ Map<String, Object> toMap() { |
267 | 301 |
|
268 | 302 | /** Generated class from Pigeon that represents data sent in messages. */ |
269 | 303 | public static class PositionMessage { |
270 | | - private @Nullable Long textureId; |
| 304 | + private @NonNull Long textureId; |
271 | 305 |
|
272 | | - public @Nullable Long getTextureId() { |
| 306 | + public @NonNull Long getTextureId() { |
273 | 307 | return textureId; |
274 | 308 | } |
275 | 309 |
|
276 | | - public void setTextureId(@Nullable Long setterArg) { |
| 310 | + public void setTextureId(@NonNull Long setterArg) { |
| 311 | + if (setterArg == null) { |
| 312 | + throw new IllegalStateException("Nonnull field \"textureId\" is null."); |
| 313 | + } |
277 | 314 | this.textureId = setterArg; |
278 | 315 | } |
279 | 316 |
|
280 | | - private @Nullable Long position; |
| 317 | + private @NonNull Long position; |
281 | 318 |
|
282 | | - public @Nullable Long getPosition() { |
| 319 | + public @NonNull Long getPosition() { |
283 | 320 | return position; |
284 | 321 | } |
285 | 322 |
|
286 | | - public void setPosition(@Nullable Long setterArg) { |
| 323 | + public void setPosition(@NonNull Long setterArg) { |
| 324 | + if (setterArg == null) { |
| 325 | + throw new IllegalStateException("Nonnull field \"position\" is null."); |
| 326 | + } |
287 | 327 | this.position = setterArg; |
288 | 328 | } |
289 | 329 |
|
| 330 | + /** Constructor is private to enforce null safety; use Builder. */ |
| 331 | + private PositionMessage() {} |
| 332 | + |
290 | 333 | public static class Builder { |
291 | 334 | private @Nullable Long textureId; |
292 | 335 |
|
293 | | - public @NonNull Builder setTextureId(@Nullable Long setterArg) { |
| 336 | + public @NonNull Builder setTextureId(@NonNull Long setterArg) { |
294 | 337 | this.textureId = setterArg; |
295 | 338 | return this; |
296 | 339 | } |
297 | 340 |
|
298 | 341 | private @Nullable Long position; |
299 | 342 |
|
300 | | - public @NonNull Builder setPosition(@Nullable Long setterArg) { |
| 343 | + public @NonNull Builder setPosition(@NonNull Long setterArg) { |
301 | 344 | this.position = setterArg; |
302 | 345 | return this; |
303 | 346 | } |
@@ -462,20 +505,26 @@ Map<String, Object> toMap() { |
462 | 505 |
|
463 | 506 | /** Generated class from Pigeon that represents data sent in messages. */ |
464 | 507 | public static class MixWithOthersMessage { |
465 | | - private @Nullable Boolean mixWithOthers; |
| 508 | + private @NonNull Boolean mixWithOthers; |
466 | 509 |
|
467 | | - public @Nullable Boolean getMixWithOthers() { |
| 510 | + public @NonNull Boolean getMixWithOthers() { |
468 | 511 | return mixWithOthers; |
469 | 512 | } |
470 | 513 |
|
471 | | - public void setMixWithOthers(@Nullable Boolean setterArg) { |
| 514 | + public void setMixWithOthers(@NonNull Boolean setterArg) { |
| 515 | + if (setterArg == null) { |
| 516 | + throw new IllegalStateException("Nonnull field \"mixWithOthers\" is null."); |
| 517 | + } |
472 | 518 | this.mixWithOthers = setterArg; |
473 | 519 | } |
474 | 520 |
|
| 521 | + /** Constructor is private to enforce null safety; use Builder. */ |
| 522 | + private MixWithOthersMessage() {} |
| 523 | + |
475 | 524 | public static class Builder { |
476 | 525 | private @Nullable Boolean mixWithOthers; |
477 | 526 |
|
478 | | - public @NonNull Builder setMixWithOthers(@Nullable Boolean setterArg) { |
| 527 | + public @NonNull Builder setMixWithOthers(@NonNull Boolean setterArg) { |
479 | 528 | this.mixWithOthers = setterArg; |
480 | 529 | return this; |
481 | 530 | } |
|
0 commit comments