@@ -11,9 +11,11 @@ class GetAllResponsePostAuthor extends PackMeMessage {
11
11
/** !string */ avatar ,
12
12
) {
13
13
super ( ) ;
14
- this . $check ( 'id' , id ) ;
15
- this . $check ( 'nickname' , nickname ) ;
16
- this . $check ( 'avatar' , avatar ) ;
14
+ if ( arguments . length > 0 ) {
15
+ this . $check ( 'id' , id ) ;
16
+ this . $check ( 'nickname' , nickname ) ;
17
+ this . $check ( 'avatar' , avatar ) ;
18
+ }
17
19
this . id = id ;
18
20
this . nickname = nickname ;
19
21
this . avatar = avatar ;
@@ -70,11 +72,13 @@ class GetAllResponsePost extends PackMeMessage {
70
72
/** !Date */ posted ,
71
73
) {
72
74
super ( ) ;
73
- this . $check ( 'id' , id ) ;
74
- this . $check ( 'author' , author ) ;
75
- this . $check ( 'title' , title ) ;
76
- this . $check ( 'shortContent' , shortContent ) ;
77
- this . $check ( 'posted' , posted ) ;
75
+ if ( arguments . length > 0 ) {
76
+ this . $check ( 'id' , id ) ;
77
+ this . $check ( 'author' , author ) ;
78
+ this . $check ( 'title' , title ) ;
79
+ this . $check ( 'shortContent' , shortContent ) ;
80
+ this . $check ( 'posted' , posted ) ;
81
+ }
78
82
this . id = id ;
79
83
this . author = author ;
80
84
this . title = title ;
@@ -130,7 +134,9 @@ class GetAllResponse extends PackMeMessage {
130
134
/** !GetAllResponsePost[] */ posts ,
131
135
) {
132
136
super ( ) ;
133
- this . $check ( 'posts' , posts ) ;
137
+ if ( arguments . length > 0 ) {
138
+ this . $check ( 'posts' , posts ) ;
139
+ }
134
140
this . posts = posts ;
135
141
}
136
142
@@ -221,9 +227,11 @@ class GetResponseAuthor extends PackMeMessage {
221
227
/** ?string */ instagramId ,
222
228
) {
223
229
super ( ) ;
224
- this . $check ( 'id' , id ) ;
225
- this . $check ( 'nickname' , nickname ) ;
226
- this . $check ( 'avatar' , avatar ) ;
230
+ if ( arguments . length > 0 ) {
231
+ this . $check ( 'id' , id ) ;
232
+ this . $check ( 'nickname' , nickname ) ;
233
+ this . $check ( 'avatar' , avatar ) ;
234
+ }
227
235
this . id = id ;
228
236
this . nickname = nickname ;
229
237
this . avatar = avatar ;
@@ -303,8 +311,10 @@ class GetResponseStats extends PackMeMessage {
303
311
/** !number */ dislikes ,
304
312
) {
305
313
super ( ) ;
306
- this . $check ( 'likes' , likes ) ;
307
- this . $check ( 'dislikes' , dislikes ) ;
314
+ if ( arguments . length > 0 ) {
315
+ this . $check ( 'likes' , likes ) ;
316
+ this . $check ( 'dislikes' , dislikes ) ;
317
+ }
308
318
this . likes = likes ;
309
319
this . dislikes = dislikes ;
310
320
}
@@ -345,9 +355,11 @@ class GetResponseCommentAuthor extends PackMeMessage {
345
355
/** !string */ avatar ,
346
356
) {
347
357
super ( ) ;
348
- this . $check ( 'id' , id ) ;
349
- this . $check ( 'nickname' , nickname ) ;
350
- this . $check ( 'avatar' , avatar ) ;
358
+ if ( arguments . length > 0 ) {
359
+ this . $check ( 'id' , id ) ;
360
+ this . $check ( 'nickname' , nickname ) ;
361
+ this . $check ( 'avatar' , avatar ) ;
362
+ }
351
363
this . id = id ;
352
364
this . nickname = nickname ;
353
365
this . avatar = avatar ;
@@ -400,9 +412,11 @@ class GetResponseComment extends PackMeMessage {
400
412
/** !Date */ posted ,
401
413
) {
402
414
super ( ) ;
403
- this . $check ( 'author' , author ) ;
404
- this . $check ( 'comment' , comment ) ;
405
- this . $check ( 'posted' , posted ) ;
415
+ if ( arguments . length > 0 ) {
416
+ this . $check ( 'author' , author ) ;
417
+ this . $check ( 'comment' , comment ) ;
418
+ this . $check ( 'posted' , posted ) ;
419
+ }
406
420
this . author = author ;
407
421
this . comment = comment ;
408
422
this . posted = posted ;
@@ -454,12 +468,14 @@ class GetResponse extends PackMeMessage {
454
468
/** !GetResponseComment[] */ comments ,
455
469
) {
456
470
super ( ) ;
457
- this . $check ( 'title' , title ) ;
458
- this . $check ( 'content' , content ) ;
459
- this . $check ( 'posted' , posted ) ;
460
- this . $check ( 'author' , author ) ;
461
- this . $check ( 'stats' , stats ) ;
462
- this . $check ( 'comments' , comments ) ;
471
+ if ( arguments . length > 0 ) {
472
+ this . $check ( 'title' , title ) ;
473
+ this . $check ( 'content' , content ) ;
474
+ this . $check ( 'posted' , posted ) ;
475
+ this . $check ( 'author' , author ) ;
476
+ this . $check ( 'stats' , stats ) ;
477
+ this . $check ( 'comments' , comments ) ;
478
+ }
463
479
this . title = title ;
464
480
this . content = content ;
465
481
this . posted = posted ;
@@ -521,7 +537,9 @@ class GetRequest extends PackMeMessage {
521
537
/** !number[] */ postId ,
522
538
) {
523
539
super ( ) ;
524
- this . $check ( 'postId' , postId ) ;
540
+ if ( arguments . length > 0 ) {
541
+ this . $check ( 'postId' , postId ) ;
542
+ }
525
543
this . postId = postId ;
526
544
}
527
545
@@ -578,6 +596,8 @@ class DeleteResponse extends PackMeMessage {
578
596
/** ?string */ error ,
579
597
) {
580
598
super ( ) ;
599
+ if ( arguments . length > 0 ) {
600
+ }
581
601
this . error = error ;
582
602
}
583
603
@@ -621,7 +641,9 @@ class DeleteRequest extends PackMeMessage {
621
641
/** !number[] */ postId ,
622
642
) {
623
643
super ( ) ;
624
- this . $check ( 'postId' , postId ) ;
644
+ if ( arguments . length > 0 ) {
645
+ this . $check ( 'postId' , postId ) ;
646
+ }
625
647
this . postId = postId ;
626
648
}
627
649
0 commit comments