-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgithub.cpp
More file actions
2035 lines (1708 loc) · 93.8 KB
/
github.cpp
File metadata and controls
2035 lines (1708 loc) · 93.8 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// To parse this JSON data, first install
//
// Boost http://www.boost.org
// json.hpp https://github.com/nlohmann/json
//
// Then include this file, and then do
//
// ApiData data = nlohmann::json::parse(jsonString);
// Emojis data = nlohmann::json::parse(jsonString);
// Events data = nlohmann::json::parse(jsonString);
// Gists data = nlohmann::json::parse(jsonString);
// Meta data = nlohmann::json::parse(jsonString);
#pragma once
#include "json.hpp"
#include <boost/optional.hpp>
#include <stdexcept>
#include <regex>
namespace nlohmann {
template <typename T>
struct adl_serializer<std::shared_ptr<T>> {
static void to_json(json& j, const std::shared_ptr<T>& opt) {
if (!opt) j = nullptr; else j = *opt;
}
static std::shared_ptr<T> from_json(const json& j) {
if (j.is_null()) return std::unique_ptr<T>(); else return std::unique_ptr<T>(new T(j.get<T>()));
}
};
}
namespace quicktype {
using nlohmann::json;
inline json get_untyped(const json &j, const char *property) {
if (j.find(property) != j.end()) {
return j.at(property).get<json>();
}
return json();
}
template <typename T>
inline std::shared_ptr<T> get_optional(const json &j, const char *property) {
if (j.find(property) != j.end()) {
return j.at(property).get<std::shared_ptr<T>>();
}
return std::shared_ptr<T>();
}
class Actor {
public:
Actor() = default;
virtual ~Actor() = default;
private:
int64_t id;
std::string login;
std::shared_ptr<std::string> display_login;
std::string gravatar_id;
std::string url;
std::string avatar_url;
public:
const int64_t & get_id() const { return id; }
int64_t & get_mutable_id() { return id; }
void set_id(const int64_t& value) { this->id = value; }
const std::string & get_login() const { return login; }
std::string & get_mutable_login() { return login; }
void set_login(const std::string& value) { this->login = value; }
std::shared_ptr<std::string> get_display_login() const { return display_login; }
void set_display_login(std::shared_ptr<std::string> value) { this->display_login = value; }
const std::string & get_gravatar_id() const { return gravatar_id; }
std::string & get_mutable_gravatar_id() { return gravatar_id; }
void set_gravatar_id(const std::string& value) { this->gravatar_id = value; }
const std::string & get_url() const { return url; }
std::string & get_mutable_url() { return url; }
void set_url(const std::string& value) { this->url = value; }
const std::string & get_avatar_url() const { return avatar_url; }
std::string & get_mutable_avatar_url() { return avatar_url; }
void set_avatar_url(const std::string& value) { this->avatar_url = value; }
};
class Html {
public:
Html() = default;
virtual ~Html() = default;
private:
std::string href;
public:
const std::string & get_href() const { return href; }
std::string & get_mutable_href() { return href; }
void set_href(const std::string& value) { this->href = value; }
};
class CommentLinks {
public:
CommentLinks() = default;
virtual ~CommentLinks() = default;
private:
Html self;
Html html;
Html pull_request;
public:
const Html & get_self() const { return self; }
Html & get_mutable_self() { return self; }
void set_self(const Html& value) { this->self = value; }
const Html & get_html() const { return html; }
Html & get_mutable_html() { return html; }
void set_html(const Html& value) { this->html = value; }
const Html & get_pull_request() const { return pull_request; }
Html & get_mutable_pull_request() { return pull_request; }
void set_pull_request(const Html& value) { this->pull_request = value; }
};
enum class Type : int { ORGANIZATION, USER };
class Owner {
public:
Owner() = default;
virtual ~Owner() = default;
private:
std::string login;
int64_t id;
std::string node_id;
std::string avatar_url;
std::string gravatar_id;
std::string url;
std::string html_url;
std::string followers_url;
std::string following_url;
std::string gists_url;
std::string starred_url;
std::string subscriptions_url;
std::string organizations_url;
std::string repos_url;
std::string events_url;
std::string received_events_url;
Type type;
bool site_admin;
public:
const std::string & get_login() const { return login; }
std::string & get_mutable_login() { return login; }
void set_login(const std::string& value) { this->login = value; }
const int64_t & get_id() const { return id; }
int64_t & get_mutable_id() { return id; }
void set_id(const int64_t& value) { this->id = value; }
const std::string & get_node_id() const { return node_id; }
std::string & get_mutable_node_id() { return node_id; }
void set_node_id(const std::string& value) { this->node_id = value; }
const std::string & get_avatar_url() const { return avatar_url; }
std::string & get_mutable_avatar_url() { return avatar_url; }
void set_avatar_url(const std::string& value) { this->avatar_url = value; }
const std::string & get_gravatar_id() const { return gravatar_id; }
std::string & get_mutable_gravatar_id() { return gravatar_id; }
void set_gravatar_id(const std::string& value) { this->gravatar_id = value; }
const std::string & get_url() const { return url; }
std::string & get_mutable_url() { return url; }
void set_url(const std::string& value) { this->url = value; }
const std::string & get_html_url() const { return html_url; }
std::string & get_mutable_html_url() { return html_url; }
void set_html_url(const std::string& value) { this->html_url = value; }
const std::string & get_followers_url() const { return followers_url; }
std::string & get_mutable_followers_url() { return followers_url; }
void set_followers_url(const std::string& value) { this->followers_url = value; }
const std::string & get_following_url() const { return following_url; }
std::string & get_mutable_following_url() { return following_url; }
void set_following_url(const std::string& value) { this->following_url = value; }
const std::string & get_gists_url() const { return gists_url; }
std::string & get_mutable_gists_url() { return gists_url; }
void set_gists_url(const std::string& value) { this->gists_url = value; }
const std::string & get_starred_url() const { return starred_url; }
std::string & get_mutable_starred_url() { return starred_url; }
void set_starred_url(const std::string& value) { this->starred_url = value; }
const std::string & get_subscriptions_url() const { return subscriptions_url; }
std::string & get_mutable_subscriptions_url() { return subscriptions_url; }
void set_subscriptions_url(const std::string& value) { this->subscriptions_url = value; }
const std::string & get_organizations_url() const { return organizations_url; }
std::string & get_mutable_organizations_url() { return organizations_url; }
void set_organizations_url(const std::string& value) { this->organizations_url = value; }
const std::string & get_repos_url() const { return repos_url; }
std::string & get_mutable_repos_url() { return repos_url; }
void set_repos_url(const std::string& value) { this->repos_url = value; }
const std::string & get_events_url() const { return events_url; }
std::string & get_mutable_events_url() { return events_url; }
void set_events_url(const std::string& value) { this->events_url = value; }
const std::string & get_received_events_url() const { return received_events_url; }
std::string & get_mutable_received_events_url() { return received_events_url; }
void set_received_events_url(const std::string& value) { this->received_events_url = value; }
const Type & get_type() const { return type; }
Type & get_mutable_type() { return type; }
void set_type(const Type& value) { this->type = value; }
const bool & get_site_admin() const { return site_admin; }
bool & get_mutable_site_admin() { return site_admin; }
void set_site_admin(const bool& value) { this->site_admin = value; }
};
class Comment {
public:
Comment() = default;
virtual ~Comment() = default;
private:
std::string url;
int64_t pull_request_review_id;
int64_t id;
std::string node_id;
std::string diff_hunk;
std::string path;
int64_t position;
int64_t original_position;
std::string commit_id;
std::string original_commit_id;
Owner user;
std::string body;
std::string created_at;
std::string updated_at;
std::string html_url;
std::string pull_request_url;
std::string author_association;
CommentLinks links;
public:
const std::string & get_url() const { return url; }
std::string & get_mutable_url() { return url; }
void set_url(const std::string& value) { this->url = value; }
const int64_t & get_pull_request_review_id() const { return pull_request_review_id; }
int64_t & get_mutable_pull_request_review_id() { return pull_request_review_id; }
void set_pull_request_review_id(const int64_t& value) { this->pull_request_review_id = value; }
const int64_t & get_id() const { return id; }
int64_t & get_mutable_id() { return id; }
void set_id(const int64_t& value) { this->id = value; }
const std::string & get_node_id() const { return node_id; }
std::string & get_mutable_node_id() { return node_id; }
void set_node_id(const std::string& value) { this->node_id = value; }
const std::string & get_diff_hunk() const { return diff_hunk; }
std::string & get_mutable_diff_hunk() { return diff_hunk; }
void set_diff_hunk(const std::string& value) { this->diff_hunk = value; }
const std::string & get_path() const { return path; }
std::string & get_mutable_path() { return path; }
void set_path(const std::string& value) { this->path = value; }
const int64_t & get_position() const { return position; }
int64_t & get_mutable_position() { return position; }
void set_position(const int64_t& value) { this->position = value; }
const int64_t & get_original_position() const { return original_position; }
int64_t & get_mutable_original_position() { return original_position; }
void set_original_position(const int64_t& value) { this->original_position = value; }
const std::string & get_commit_id() const { return commit_id; }
std::string & get_mutable_commit_id() { return commit_id; }
void set_commit_id(const std::string& value) { this->commit_id = value; }
const std::string & get_original_commit_id() const { return original_commit_id; }
std::string & get_mutable_original_commit_id() { return original_commit_id; }
void set_original_commit_id(const std::string& value) { this->original_commit_id = value; }
const Owner & get_user() const { return user; }
Owner & get_mutable_user() { return user; }
void set_user(const Owner& value) { this->user = value; }
const std::string & get_body() const { return body; }
std::string & get_mutable_body() { return body; }
void set_body(const std::string& value) { this->body = value; }
const std::string & get_created_at() const { return created_at; }
std::string & get_mutable_created_at() { return created_at; }
void set_created_at(const std::string& value) { this->created_at = value; }
const std::string & get_updated_at() const { return updated_at; }
std::string & get_mutable_updated_at() { return updated_at; }
void set_updated_at(const std::string& value) { this->updated_at = value; }
const std::string & get_html_url() const { return html_url; }
std::string & get_mutable_html_url() { return html_url; }
void set_html_url(const std::string& value) { this->html_url = value; }
const std::string & get_pull_request_url() const { return pull_request_url; }
std::string & get_mutable_pull_request_url() { return pull_request_url; }
void set_pull_request_url(const std::string& value) { this->pull_request_url = value; }
const std::string & get_author_association() const { return author_association; }
std::string & get_mutable_author_association() { return author_association; }
void set_author_association(const std::string& value) { this->author_association = value; }
const CommentLinks & get_links() const { return links; }
CommentLinks & get_mutable_links() { return links; }
void set_links(const CommentLinks& value) { this->links = value; }
};
class Author {
public:
Author() = default;
virtual ~Author() = default;
private:
std::string email;
std::string name;
public:
const std::string & get_email() const { return email; }
std::string & get_mutable_email() { return email; }
void set_email(const std::string& value) { this->email = value; }
const std::string & get_name() const { return name; }
std::string & get_mutable_name() { return name; }
void set_name(const std::string& value) { this->name = value; }
};
class Commit {
public:
Commit() = default;
virtual ~Commit() = default;
private:
std::string sha;
Author author;
std::string message;
bool distinct;
std::string url;
public:
const std::string & get_sha() const { return sha; }
std::string & get_mutable_sha() { return sha; }
void set_sha(const std::string& value) { this->sha = value; }
const Author & get_author() const { return author; }
Author & get_mutable_author() { return author; }
void set_author(const Author& value) { this->author = value; }
const std::string & get_message() const { return message; }
std::string & get_mutable_message() { return message; }
void set_message(const std::string& value) { this->message = value; }
const bool & get_distinct() const { return distinct; }
bool & get_mutable_distinct() { return distinct; }
void set_distinct(const bool& value) { this->distinct = value; }
const std::string & get_url() const { return url; }
std::string & get_mutable_url() { return url; }
void set_url(const std::string& value) { this->url = value; }
};
class License {
public:
License() = default;
virtual ~License() = default;
private:
std::string key;
std::string name;
std::shared_ptr<std::string> spdx_id;
std::shared_ptr<std::string> url;
std::string node_id;
public:
const std::string & get_key() const { return key; }
std::string & get_mutable_key() { return key; }
void set_key(const std::string& value) { this->key = value; }
const std::string & get_name() const { return name; }
std::string & get_mutable_name() { return name; }
void set_name(const std::string& value) { this->name = value; }
std::shared_ptr<std::string> get_spdx_id() const { return spdx_id; }
void set_spdx_id(std::shared_ptr<std::string> value) { this->spdx_id = value; }
std::shared_ptr<std::string> get_url() const { return url; }
void set_url(std::shared_ptr<std::string> value) { this->url = value; }
const std::string & get_node_id() const { return node_id; }
std::string & get_mutable_node_id() { return node_id; }
void set_node_id(const std::string& value) { this->node_id = value; }
};
class BaseRepo {
public:
BaseRepo() = default;
virtual ~BaseRepo() = default;
private:
int64_t id;
std::string node_id;
std::string name;
std::string full_name;
Owner owner;
bool repo_private;
std::string html_url;
std::shared_ptr<std::string> description;
bool fork;
std::string url;
std::string forks_url;
std::string keys_url;
std::string collaborators_url;
std::string teams_url;
std::string hooks_url;
std::string issue_events_url;
std::string events_url;
std::string assignees_url;
std::string branches_url;
std::string tags_url;
std::string blobs_url;
std::string git_tags_url;
std::string git_refs_url;
std::string trees_url;
std::string statuses_url;
std::string languages_url;
std::string stargazers_url;
std::string contributors_url;
std::string subscribers_url;
std::string subscription_url;
std::string commits_url;
std::string git_commits_url;
std::string comments_url;
std::string issue_comment_url;
std::string contents_url;
std::string compare_url;
std::string merges_url;
std::string archive_url;
std::string downloads_url;
std::string issues_url;
std::string pulls_url;
std::string milestones_url;
std::string notifications_url;
std::string labels_url;
std::string releases_url;
std::string deployments_url;
std::string created_at;
std::string updated_at;
std::string pushed_at;
std::string git_url;
std::string ssh_url;
std::string clone_url;
std::string svn_url;
std::shared_ptr<std::string> homepage;
int64_t size;
int64_t stargazers_count;
int64_t watchers_count;
std::string language;
bool has_issues;
bool has_projects;
bool has_downloads;
bool has_wiki;
bool has_pages;
int64_t forks_count;
nlohmann::json mirror_url;
bool archived;
int64_t open_issues_count;
std::shared_ptr<License> license;
int64_t forks;
int64_t open_issues;
int64_t watchers;
std::string default_branch;
public:
const int64_t & get_id() const { return id; }
int64_t & get_mutable_id() { return id; }
void set_id(const int64_t& value) { this->id = value; }
const std::string & get_node_id() const { return node_id; }
std::string & get_mutable_node_id() { return node_id; }
void set_node_id(const std::string& value) { this->node_id = value; }
const std::string & get_name() const { return name; }
std::string & get_mutable_name() { return name; }
void set_name(const std::string& value) { this->name = value; }
const std::string & get_full_name() const { return full_name; }
std::string & get_mutable_full_name() { return full_name; }
void set_full_name(const std::string& value) { this->full_name = value; }
const Owner & get_owner() const { return owner; }
Owner & get_mutable_owner() { return owner; }
void set_owner(const Owner& value) { this->owner = value; }
const bool & get_repo_private() const { return repo_private; }
bool & get_mutable_repo_private() { return repo_private; }
void set_repo_private(const bool& value) { this->repo_private = value; }
const std::string & get_html_url() const { return html_url; }
std::string & get_mutable_html_url() { return html_url; }
void set_html_url(const std::string& value) { this->html_url = value; }
std::shared_ptr<std::string> get_description() const { return description; }
void set_description(std::shared_ptr<std::string> value) { this->description = value; }
const bool & get_fork() const { return fork; }
bool & get_mutable_fork() { return fork; }
void set_fork(const bool& value) { this->fork = value; }
const std::string & get_url() const { return url; }
std::string & get_mutable_url() { return url; }
void set_url(const std::string& value) { this->url = value; }
const std::string & get_forks_url() const { return forks_url; }
std::string & get_mutable_forks_url() { return forks_url; }
void set_forks_url(const std::string& value) { this->forks_url = value; }
const std::string & get_keys_url() const { return keys_url; }
std::string & get_mutable_keys_url() { return keys_url; }
void set_keys_url(const std::string& value) { this->keys_url = value; }
const std::string & get_collaborators_url() const { return collaborators_url; }
std::string & get_mutable_collaborators_url() { return collaborators_url; }
void set_collaborators_url(const std::string& value) { this->collaborators_url = value; }
const std::string & get_teams_url() const { return teams_url; }
std::string & get_mutable_teams_url() { return teams_url; }
void set_teams_url(const std::string& value) { this->teams_url = value; }
const std::string & get_hooks_url() const { return hooks_url; }
std::string & get_mutable_hooks_url() { return hooks_url; }
void set_hooks_url(const std::string& value) { this->hooks_url = value; }
const std::string & get_issue_events_url() const { return issue_events_url; }
std::string & get_mutable_issue_events_url() { return issue_events_url; }
void set_issue_events_url(const std::string& value) { this->issue_events_url = value; }
const std::string & get_events_url() const { return events_url; }
std::string & get_mutable_events_url() { return events_url; }
void set_events_url(const std::string& value) { this->events_url = value; }
const std::string & get_assignees_url() const { return assignees_url; }
std::string & get_mutable_assignees_url() { return assignees_url; }
void set_assignees_url(const std::string& value) { this->assignees_url = value; }
const std::string & get_branches_url() const { return branches_url; }
std::string & get_mutable_branches_url() { return branches_url; }
void set_branches_url(const std::string& value) { this->branches_url = value; }
const std::string & get_tags_url() const { return tags_url; }
std::string & get_mutable_tags_url() { return tags_url; }
void set_tags_url(const std::string& value) { this->tags_url = value; }
const std::string & get_blobs_url() const { return blobs_url; }
std::string & get_mutable_blobs_url() { return blobs_url; }
void set_blobs_url(const std::string& value) { this->blobs_url = value; }
const std::string & get_git_tags_url() const { return git_tags_url; }
std::string & get_mutable_git_tags_url() { return git_tags_url; }
void set_git_tags_url(const std::string& value) { this->git_tags_url = value; }
const std::string & get_git_refs_url() const { return git_refs_url; }
std::string & get_mutable_git_refs_url() { return git_refs_url; }
void set_git_refs_url(const std::string& value) { this->git_refs_url = value; }
const std::string & get_trees_url() const { return trees_url; }
std::string & get_mutable_trees_url() { return trees_url; }
void set_trees_url(const std::string& value) { this->trees_url = value; }
const std::string & get_statuses_url() const { return statuses_url; }
std::string & get_mutable_statuses_url() { return statuses_url; }
void set_statuses_url(const std::string& value) { this->statuses_url = value; }
const std::string & get_languages_url() const { return languages_url; }
std::string & get_mutable_languages_url() { return languages_url; }
void set_languages_url(const std::string& value) { this->languages_url = value; }
const std::string & get_stargazers_url() const { return stargazers_url; }
std::string & get_mutable_stargazers_url() { return stargazers_url; }
void set_stargazers_url(const std::string& value) { this->stargazers_url = value; }
const std::string & get_contributors_url() const { return contributors_url; }
std::string & get_mutable_contributors_url() { return contributors_url; }
void set_contributors_url(const std::string& value) { this->contributors_url = value; }
const std::string & get_subscribers_url() const { return subscribers_url; }
std::string & get_mutable_subscribers_url() { return subscribers_url; }
void set_subscribers_url(const std::string& value) { this->subscribers_url = value; }
const std::string & get_subscription_url() const { return subscription_url; }
std::string & get_mutable_subscription_url() { return subscription_url; }
void set_subscription_url(const std::string& value) { this->subscription_url = value; }
const std::string & get_commits_url() const { return commits_url; }
std::string & get_mutable_commits_url() { return commits_url; }
void set_commits_url(const std::string& value) { this->commits_url = value; }
const std::string & get_git_commits_url() const { return git_commits_url; }
std::string & get_mutable_git_commits_url() { return git_commits_url; }
void set_git_commits_url(const std::string& value) { this->git_commits_url = value; }
const std::string & get_comments_url() const { return comments_url; }
std::string & get_mutable_comments_url() { return comments_url; }
void set_comments_url(const std::string& value) { this->comments_url = value; }
const std::string & get_issue_comment_url() const { return issue_comment_url; }
std::string & get_mutable_issue_comment_url() { return issue_comment_url; }
void set_issue_comment_url(const std::string& value) { this->issue_comment_url = value; }
const std::string & get_contents_url() const { return contents_url; }
std::string & get_mutable_contents_url() { return contents_url; }
void set_contents_url(const std::string& value) { this->contents_url = value; }
const std::string & get_compare_url() const { return compare_url; }
std::string & get_mutable_compare_url() { return compare_url; }
void set_compare_url(const std::string& value) { this->compare_url = value; }
const std::string & get_merges_url() const { return merges_url; }
std::string & get_mutable_merges_url() { return merges_url; }
void set_merges_url(const std::string& value) { this->merges_url = value; }
const std::string & get_archive_url() const { return archive_url; }
std::string & get_mutable_archive_url() { return archive_url; }
void set_archive_url(const std::string& value) { this->archive_url = value; }
const std::string & get_downloads_url() const { return downloads_url; }
std::string & get_mutable_downloads_url() { return downloads_url; }
void set_downloads_url(const std::string& value) { this->downloads_url = value; }
const std::string & get_issues_url() const { return issues_url; }
std::string & get_mutable_issues_url() { return issues_url; }
void set_issues_url(const std::string& value) { this->issues_url = value; }
const std::string & get_pulls_url() const { return pulls_url; }
std::string & get_mutable_pulls_url() { return pulls_url; }
void set_pulls_url(const std::string& value) { this->pulls_url = value; }
const std::string & get_milestones_url() const { return milestones_url; }
std::string & get_mutable_milestones_url() { return milestones_url; }
void set_milestones_url(const std::string& value) { this->milestones_url = value; }
const std::string & get_notifications_url() const { return notifications_url; }
std::string & get_mutable_notifications_url() { return notifications_url; }
void set_notifications_url(const std::string& value) { this->notifications_url = value; }
const std::string & get_labels_url() const { return labels_url; }
std::string & get_mutable_labels_url() { return labels_url; }
void set_labels_url(const std::string& value) { this->labels_url = value; }
const std::string & get_releases_url() const { return releases_url; }
std::string & get_mutable_releases_url() { return releases_url; }
void set_releases_url(const std::string& value) { this->releases_url = value; }
const std::string & get_deployments_url() const { return deployments_url; }
std::string & get_mutable_deployments_url() { return deployments_url; }
void set_deployments_url(const std::string& value) { this->deployments_url = value; }
const std::string & get_created_at() const { return created_at; }
std::string & get_mutable_created_at() { return created_at; }
void set_created_at(const std::string& value) { this->created_at = value; }
const std::string & get_updated_at() const { return updated_at; }
std::string & get_mutable_updated_at() { return updated_at; }
void set_updated_at(const std::string& value) { this->updated_at = value; }
const std::string & get_pushed_at() const { return pushed_at; }
std::string & get_mutable_pushed_at() { return pushed_at; }
void set_pushed_at(const std::string& value) { this->pushed_at = value; }
const std::string & get_git_url() const { return git_url; }
std::string & get_mutable_git_url() { return git_url; }
void set_git_url(const std::string& value) { this->git_url = value; }
const std::string & get_ssh_url() const { return ssh_url; }
std::string & get_mutable_ssh_url() { return ssh_url; }
void set_ssh_url(const std::string& value) { this->ssh_url = value; }
const std::string & get_clone_url() const { return clone_url; }
std::string & get_mutable_clone_url() { return clone_url; }
void set_clone_url(const std::string& value) { this->clone_url = value; }
const std::string & get_svn_url() const { return svn_url; }
std::string & get_mutable_svn_url() { return svn_url; }
void set_svn_url(const std::string& value) { this->svn_url = value; }
std::shared_ptr<std::string> get_homepage() const { return homepage; }
void set_homepage(std::shared_ptr<std::string> value) { this->homepage = value; }
const int64_t & get_size() const { return size; }
int64_t & get_mutable_size() { return size; }
void set_size(const int64_t& value) { this->size = value; }
const int64_t & get_stargazers_count() const { return stargazers_count; }
int64_t & get_mutable_stargazers_count() { return stargazers_count; }
void set_stargazers_count(const int64_t& value) { this->stargazers_count = value; }
const int64_t & get_watchers_count() const { return watchers_count; }
int64_t & get_mutable_watchers_count() { return watchers_count; }
void set_watchers_count(const int64_t& value) { this->watchers_count = value; }
const std::string & get_language() const { return language; }
std::string & get_mutable_language() { return language; }
void set_language(const std::string& value) { this->language = value; }
const bool & get_has_issues() const { return has_issues; }
bool & get_mutable_has_issues() { return has_issues; }
void set_has_issues(const bool& value) { this->has_issues = value; }
const bool & get_has_projects() const { return has_projects; }
bool & get_mutable_has_projects() { return has_projects; }
void set_has_projects(const bool& value) { this->has_projects = value; }
const bool & get_has_downloads() const { return has_downloads; }
bool & get_mutable_has_downloads() { return has_downloads; }
void set_has_downloads(const bool& value) { this->has_downloads = value; }
const bool & get_has_wiki() const { return has_wiki; }
bool & get_mutable_has_wiki() { return has_wiki; }
void set_has_wiki(const bool& value) { this->has_wiki = value; }
const bool & get_has_pages() const { return has_pages; }
bool & get_mutable_has_pages() { return has_pages; }
void set_has_pages(const bool& value) { this->has_pages = value; }
const int64_t & get_forks_count() const { return forks_count; }
int64_t & get_mutable_forks_count() { return forks_count; }
void set_forks_count(const int64_t& value) { this->forks_count = value; }
const nlohmann::json & get_mirror_url() const { return mirror_url; }
nlohmann::json & get_mutable_mirror_url() { return mirror_url; }
void set_mirror_url(const nlohmann::json& value) { this->mirror_url = value; }
const bool & get_archived() const { return archived; }
bool & get_mutable_archived() { return archived; }
void set_archived(const bool& value) { this->archived = value; }
const int64_t & get_open_issues_count() const { return open_issues_count; }
int64_t & get_mutable_open_issues_count() { return open_issues_count; }
void set_open_issues_count(const int64_t& value) { this->open_issues_count = value; }
std::shared_ptr<License> get_license() const { return license; }
void set_license(std::shared_ptr<License> value) { this->license = value; }
const int64_t & get_forks() const { return forks; }
int64_t & get_mutable_forks() { return forks; }
void set_forks(const int64_t& value) { this->forks = value; }
const int64_t & get_open_issues() const { return open_issues; }
int64_t & get_mutable_open_issues() { return open_issues; }
void set_open_issues(const int64_t& value) { this->open_issues = value; }
const int64_t & get_watchers() const { return watchers; }
int64_t & get_mutable_watchers() { return watchers; }
void set_watchers(const int64_t& value) { this->watchers = value; }
const std::string & get_default_branch() const { return default_branch; }
std::string & get_mutable_default_branch() { return default_branch; }
void set_default_branch(const std::string& value) { this->default_branch = value; }
};
class Base {
public:
Base() = default;
virtual ~Base() = default;
private:
std::string label;
std::string ref;
std::string sha;
Owner user;
BaseRepo repo;
public:
const std::string & get_label() const { return label; }
std::string & get_mutable_label() { return label; }
void set_label(const std::string& value) { this->label = value; }
const std::string & get_ref() const { return ref; }
std::string & get_mutable_ref() { return ref; }
void set_ref(const std::string& value) { this->ref = value; }
const std::string & get_sha() const { return sha; }
std::string & get_mutable_sha() { return sha; }
void set_sha(const std::string& value) { this->sha = value; }
const Owner & get_user() const { return user; }
Owner & get_mutable_user() { return user; }
void set_user(const Owner& value) { this->user = value; }
const BaseRepo & get_repo() const { return repo; }
BaseRepo & get_mutable_repo() { return repo; }
void set_repo(const BaseRepo& value) { this->repo = value; }
};
class PullRequestLinks {
public:
PullRequestLinks() = default;
virtual ~PullRequestLinks() = default;
private:
Html self;
Html html;
Html issue;
Html comments;
Html review_comments;
Html review_comment;
Html commits;
Html statuses;
public:
const Html & get_self() const { return self; }
Html & get_mutable_self() { return self; }
void set_self(const Html& value) { this->self = value; }
const Html & get_html() const { return html; }
Html & get_mutable_html() { return html; }
void set_html(const Html& value) { this->html = value; }
const Html & get_issue() const { return issue; }
Html & get_mutable_issue() { return issue; }
void set_issue(const Html& value) { this->issue = value; }
const Html & get_comments() const { return comments; }
Html & get_mutable_comments() { return comments; }
void set_comments(const Html& value) { this->comments = value; }
const Html & get_review_comments() const { return review_comments; }
Html & get_mutable_review_comments() { return review_comments; }
void set_review_comments(const Html& value) { this->review_comments = value; }
const Html & get_review_comment() const { return review_comment; }
Html & get_mutable_review_comment() { return review_comment; }
void set_review_comment(const Html& value) { this->review_comment = value; }
const Html & get_commits() const { return commits; }
Html & get_mutable_commits() { return commits; }
void set_commits(const Html& value) { this->commits = value; }
const Html & get_statuses() const { return statuses; }
Html & get_mutable_statuses() { return statuses; }
void set_statuses(const Html& value) { this->statuses = value; }
};
class PullRequest {
public:
PullRequest() = default;
virtual ~PullRequest() = default;
private:
std::string url;
int64_t id;
std::string node_id;
std::string html_url;
std::string diff_url;
std::string patch_url;
std::string issue_url;
int64_t number;
std::string state;
bool locked;
std::string title;
Owner user;
std::shared_ptr<std::string> body;
std::string created_at;
std::string updated_at;
nlohmann::json closed_at;
nlohmann::json merged_at;
std::shared_ptr<std::string> merge_commit_sha;
nlohmann::json assignee;
std::vector<nlohmann::json> assignees;
std::vector<nlohmann::json> requested_reviewers;
std::vector<nlohmann::json> requested_teams;
std::vector<nlohmann::json> labels;
nlohmann::json milestone;
std::string commits_url;
std::string review_comments_url;
std::string review_comment_url;
std::string comments_url;
std::string statuses_url;
Base head;
Base base;
PullRequestLinks links;
std::string author_association;
std::shared_ptr<bool> merged;
nlohmann::json mergeable;
nlohmann::json rebaseable;
std::shared_ptr<std::string> mergeable_state;
nlohmann::json merged_by;
std::shared_ptr<int64_t> comments;
std::shared_ptr<int64_t> review_comments;
std::shared_ptr<bool> maintainer_can_modify;
std::shared_ptr<int64_t> commits;
std::shared_ptr<int64_t> additions;
std::shared_ptr<int64_t> deletions;
std::shared_ptr<int64_t> changed_files;
public:
const std::string & get_url() const { return url; }
std::string & get_mutable_url() { return url; }
void set_url(const std::string& value) { this->url = value; }
const int64_t & get_id() const { return id; }
int64_t & get_mutable_id() { return id; }
void set_id(const int64_t& value) { this->id = value; }
const std::string & get_node_id() const { return node_id; }
std::string & get_mutable_node_id() { return node_id; }
void set_node_id(const std::string& value) { this->node_id = value; }
const std::string & get_html_url() const { return html_url; }
std::string & get_mutable_html_url() { return html_url; }
void set_html_url(const std::string& value) { this->html_url = value; }
const std::string & get_diff_url() const { return diff_url; }
std::string & get_mutable_diff_url() { return diff_url; }
void set_diff_url(const std::string& value) { this->diff_url = value; }
const std::string & get_patch_url() const { return patch_url; }
std::string & get_mutable_patch_url() { return patch_url; }
void set_patch_url(const std::string& value) { this->patch_url = value; }
const std::string & get_issue_url() const { return issue_url; }
std::string & get_mutable_issue_url() { return issue_url; }
void set_issue_url(const std::string& value) { this->issue_url = value; }
const int64_t & get_number() const { return number; }
int64_t & get_mutable_number() { return number; }
void set_number(const int64_t& value) { this->number = value; }
const std::string & get_state() const { return state; }
std::string & get_mutable_state() { return state; }
void set_state(const std::string& value) { this->state = value; }
const bool & get_locked() const { return locked; }
bool & get_mutable_locked() { return locked; }
void set_locked(const bool& value) { this->locked = value; }
const std::string & get_title() const { return title; }
std::string & get_mutable_title() { return title; }
void set_title(const std::string& value) { this->title = value; }
const Owner & get_user() const { return user; }
Owner & get_mutable_user() { return user; }
void set_user(const Owner& value) { this->user = value; }
std::shared_ptr<std::string> get_body() const { return body; }
void set_body(std::shared_ptr<std::string> value) { this->body = value; }
const std::string & get_created_at() const { return created_at; }
std::string & get_mutable_created_at() { return created_at; }
void set_created_at(const std::string& value) { this->created_at = value; }
const std::string & get_updated_at() const { return updated_at; }
std::string & get_mutable_updated_at() { return updated_at; }
void set_updated_at(const std::string& value) { this->updated_at = value; }
const nlohmann::json & get_closed_at() const { return closed_at; }
nlohmann::json & get_mutable_closed_at() { return closed_at; }
void set_closed_at(const nlohmann::json& value) { this->closed_at = value; }
const nlohmann::json & get_merged_at() const { return merged_at; }
nlohmann::json & get_mutable_merged_at() { return merged_at; }
void set_merged_at(const nlohmann::json& value) { this->merged_at = value; }
std::shared_ptr<std::string> get_merge_commit_sha() const { return merge_commit_sha; }
void set_merge_commit_sha(std::shared_ptr<std::string> value) { this->merge_commit_sha = value; }
const nlohmann::json & get_assignee() const { return assignee; }
nlohmann::json & get_mutable_assignee() { return assignee; }
void set_assignee(const nlohmann::json& value) { this->assignee = value; }
const std::vector<nlohmann::json> & get_assignees() const { return assignees; }
std::vector<nlohmann::json> & get_mutable_assignees() { return assignees; }
void set_assignees(const std::vector<nlohmann::json>& value) { this->assignees = value; }
const std::vector<nlohmann::json> & get_requested_reviewers() const { return requested_reviewers; }
std::vector<nlohmann::json> & get_mutable_requested_reviewers() { return requested_reviewers; }
void set_requested_reviewers(const std::vector<nlohmann::json>& value) { this->requested_reviewers = value; }
const std::vector<nlohmann::json> & get_requested_teams() const { return requested_teams; }
std::vector<nlohmann::json> & get_mutable_requested_teams() { return requested_teams; }
void set_requested_teams(const std::vector<nlohmann::json>& value) { this->requested_teams = value; }