1
- // Autogenerated from Pigeon (v4.2.2 ), do not edit directly.
1
+ // Autogenerated from Pigeon (v4.2.3 ), do not edit directly.
2
2
// See also: https://pub.dev/packages/pigeon
3
3
4
4
package pl .tkadziolka .snipmeandroid ;
14
14
import java .nio .ByteBuffer ;
15
15
import java .util .Arrays ;
16
16
import java .util .ArrayList ;
17
+ import java .util .Collections ;
17
18
import java .util .List ;
18
19
import java .util .Map ;
19
20
import java .util .HashMap ;
@@ -134,6 +135,24 @@ public void setLanguage(@Nullable SnippetLanguage setterArg) {
134
135
this .language = setterArg ;
135
136
}
136
137
138
+ private @ Nullable Owner owner ;
139
+ public @ Nullable Owner getOwner () { return owner ; }
140
+ public void setOwner (@ Nullable Owner setterArg ) {
141
+ this .owner = setterArg ;
142
+ }
143
+
144
+ private @ Nullable String timeAgo ;
145
+ public @ Nullable String getTimeAgo () { return timeAgo ; }
146
+ public void setTimeAgo (@ Nullable String setterArg ) {
147
+ this .timeAgo = setterArg ;
148
+ }
149
+
150
+ private @ Nullable Long voteResult ;
151
+ public @ Nullable Long getVoteResult () { return voteResult ; }
152
+ public void setVoteResult (@ Nullable Long setterArg ) {
153
+ this .voteResult = setterArg ;
154
+ }
155
+
137
156
public static final class Builder {
138
157
private @ Nullable String uuid ;
139
158
public @ NonNull Builder setUuid (@ Nullable String setterArg ) {
@@ -155,12 +174,30 @@ public static final class Builder {
155
174
this .language = setterArg ;
156
175
return this ;
157
176
}
177
+ private @ Nullable Owner owner ;
178
+ public @ NonNull Builder setOwner (@ Nullable Owner setterArg ) {
179
+ this .owner = setterArg ;
180
+ return this ;
181
+ }
182
+ private @ Nullable String timeAgo ;
183
+ public @ NonNull Builder setTimeAgo (@ Nullable String setterArg ) {
184
+ this .timeAgo = setterArg ;
185
+ return this ;
186
+ }
187
+ private @ Nullable Long voteResult ;
188
+ public @ NonNull Builder setVoteResult (@ Nullable Long setterArg ) {
189
+ this .voteResult = setterArg ;
190
+ return this ;
191
+ }
158
192
public @ NonNull Snippet build () {
159
193
Snippet pigeonReturn = new Snippet ();
160
194
pigeonReturn .setUuid (uuid );
161
195
pigeonReturn .setTitle (title );
162
196
pigeonReturn .setCode (code );
163
197
pigeonReturn .setLanguage (language );
198
+ pigeonReturn .setOwner (owner );
199
+ pigeonReturn .setTimeAgo (timeAgo );
200
+ pigeonReturn .setVoteResult (voteResult );
164
201
return pigeonReturn ;
165
202
}
166
203
}
@@ -170,6 +207,9 @@ public static final class Builder {
170
207
toMapResult .put ("title" , title );
171
208
toMapResult .put ("code" , (code == null ) ? null : code .toMap ());
172
209
toMapResult .put ("language" , (language == null ) ? null : language .toMap ());
210
+ toMapResult .put ("owner" , (owner == null ) ? null : owner .toMap ());
211
+ toMapResult .put ("timeAgo" , timeAgo );
212
+ toMapResult .put ("voteResult" , voteResult );
173
213
return toMapResult ;
174
214
}
175
215
static @ NonNull Snippet fromMap (@ NonNull Map <String , Object > map ) {
@@ -182,6 +222,12 @@ public static final class Builder {
182
222
pigeonResult .setCode ((code == null ) ? null : SnippetCode .fromMap ((Map )code ));
183
223
Object language = map .get ("language" );
184
224
pigeonResult .setLanguage ((language == null ) ? null : SnippetLanguage .fromMap ((Map )language ));
225
+ Object owner = map .get ("owner" );
226
+ pigeonResult .setOwner ((owner == null ) ? null : Owner .fromMap ((Map )owner ));
227
+ Object timeAgo = map .get ("timeAgo" );
228
+ pigeonResult .setTimeAgo ((String )timeAgo );
229
+ Object voteResult = map .get ("voteResult" );
230
+ pigeonResult .setVoteResult ((voteResult == null ) ? null : ((voteResult instanceof Integer ) ? (Integer )voteResult : (Long )voteResult ));
185
231
return pigeonResult ;
186
232
}
187
233
}
@@ -345,6 +391,54 @@ public static final class Builder {
345
391
}
346
392
}
347
393
394
+ /** Generated class from Pigeon that represents data sent in messages. */
395
+ public static class Owner {
396
+ private @ Nullable Long id ;
397
+ public @ Nullable Long getId () { return id ; }
398
+ public void setId (@ Nullable Long setterArg ) {
399
+ this .id = setterArg ;
400
+ }
401
+
402
+ private @ Nullable String login ;
403
+ public @ Nullable String getLogin () { return login ; }
404
+ public void setLogin (@ Nullable String setterArg ) {
405
+ this .login = setterArg ;
406
+ }
407
+
408
+ public static final class Builder {
409
+ private @ Nullable Long id ;
410
+ public @ NonNull Builder setId (@ Nullable Long setterArg ) {
411
+ this .id = setterArg ;
412
+ return this ;
413
+ }
414
+ private @ Nullable String login ;
415
+ public @ NonNull Builder setLogin (@ Nullable String setterArg ) {
416
+ this .login = setterArg ;
417
+ return this ;
418
+ }
419
+ public @ NonNull Owner build () {
420
+ Owner pigeonReturn = new Owner ();
421
+ pigeonReturn .setId (id );
422
+ pigeonReturn .setLogin (login );
423
+ return pigeonReturn ;
424
+ }
425
+ }
426
+ @ NonNull Map <String , Object > toMap () {
427
+ Map <String , Object > toMapResult = new HashMap <>();
428
+ toMapResult .put ("id" , id );
429
+ toMapResult .put ("login" , login );
430
+ return toMapResult ;
431
+ }
432
+ static @ NonNull Owner fromMap (@ NonNull Map <String , Object > map ) {
433
+ Owner pigeonResult = new Owner ();
434
+ Object id = map .get ("id" );
435
+ pigeonResult .setId ((id == null ) ? null : ((id instanceof Integer ) ? (Integer )id : (Long )id ));
436
+ Object login = map .get ("login" );
437
+ pigeonResult .setLogin ((String )login );
438
+ return pigeonResult ;
439
+ }
440
+ }
441
+
348
442
/** Generated class from Pigeon that represents data sent in messages. */
349
443
public static class SnippetFilter {
350
444
private @ Nullable SnippetFilterType type ;
@@ -516,18 +610,21 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) {
516
610
return MainModelStateData .fromMap ((Map <String , Object >) readValue (buffer ));
517
611
518
612
case (byte )130 :
519
- return Snippet .fromMap ((Map <String , Object >) readValue (buffer ));
613
+ return Owner .fromMap ((Map <String , Object >) readValue (buffer ));
520
614
521
615
case (byte )131 :
522
- return SnippetCode .fromMap ((Map <String , Object >) readValue (buffer ));
616
+ return Snippet .fromMap ((Map <String , Object >) readValue (buffer ));
523
617
524
618
case (byte )132 :
525
- return SnippetFilter .fromMap ((Map <String , Object >) readValue (buffer ));
619
+ return SnippetCode .fromMap ((Map <String , Object >) readValue (buffer ));
526
620
527
621
case (byte )133 :
528
- return SnippetLanguage .fromMap ((Map <String , Object >) readValue (buffer ));
622
+ return SnippetFilter .fromMap ((Map <String , Object >) readValue (buffer ));
529
623
530
624
case (byte )134 :
625
+ return SnippetLanguage .fromMap ((Map <String , Object >) readValue (buffer ));
626
+
627
+ case (byte )135 :
531
628
return SyntaxToken .fromMap ((Map <String , Object >) readValue (buffer ));
532
629
533
630
default :
@@ -545,24 +642,28 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value)
545
642
stream .write (129 );
546
643
writeValue (stream , ((MainModelStateData ) value ).toMap ());
547
644
} else
548
- if (value instanceof Snippet ) {
645
+ if (value instanceof Owner ) {
549
646
stream .write (130 );
647
+ writeValue (stream , ((Owner ) value ).toMap ());
648
+ } else
649
+ if (value instanceof Snippet ) {
650
+ stream .write (131 );
550
651
writeValue (stream , ((Snippet ) value ).toMap ());
551
652
} else
552
653
if (value instanceof SnippetCode ) {
553
- stream .write (131 );
654
+ stream .write (132 );
554
655
writeValue (stream , ((SnippetCode ) value ).toMap ());
555
656
} else
556
657
if (value instanceof SnippetFilter ) {
557
- stream .write (132 );
658
+ stream .write (133 );
558
659
writeValue (stream , ((SnippetFilter ) value ).toMap ());
559
660
} else
560
661
if (value instanceof SnippetLanguage ) {
561
- stream .write (133 );
662
+ stream .write (134 );
562
663
writeValue (stream , ((SnippetLanguage ) value ).toMap ());
563
664
} else
564
665
if (value instanceof SyntaxToken ) {
565
- stream .write (134 );
666
+ stream .write (135 );
566
667
writeValue (stream , ((SyntaxToken ) value ).toMap ());
567
668
} else
568
669
{
@@ -673,6 +774,7 @@ static void setup(BinaryMessenger binaryMessenger, MainModelApi api) {
673
774
Map <String , Object > wrapped = new HashMap <>();
674
775
try {
675
776
ArrayList <Object > args = (ArrayList <Object >)message ;
777
+ assert args != null ;
676
778
SnippetFilter filterArg = (SnippetFilter )args .get (0 );
677
779
if (filterArg == null ) {
678
780
throw new NullPointerException ("filterArg unexpectedly null." );
0 commit comments