-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTypes.swift
More file actions
7159 lines (7155 loc) · 451 KB
/
Copy pathTypes.swift
File metadata and controls
7159 lines (7155 loc) · 451 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
// Generated by swift-openapi-generator, do not modify.
@_spi(Generated) import OpenAPIRuntime
#if os(Linux)
@preconcurrency import struct Foundation.URL
@preconcurrency import struct Foundation.Data
@preconcurrency import struct Foundation.Date
#else
import struct Foundation.URL
import struct Foundation.Data
import struct Foundation.Date
#endif
/// A type that performs HTTP operations defined by the OpenAPI document.
public protocol APIProtocol: Sendable {
/// List tasks for repository
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a list of tasks for a specific repository
///
/// **Fine-grained access tokens for "List tasks for repository"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/repos/{owner}/{repo}/tasks`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/get(agent-tasks/list-tasks-for-repo)`.
func agentTasksListTasksForRepo(_ input: Operations.AgentTasksListTasksForRepo.Input) async throws -> Operations.AgentTasksListTasksForRepo.Output
/// Start a task
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Starts a new Copilot cloud agent task for a repository.
///
/// This endpoint is only available to users with a Copilot Business or Copilot Enterprise subscription.
///
/// **Fine-grained access tokens for "Start a task"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read and write)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `POST /agents/repos/{owner}/{repo}/tasks`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/post(agent-tasks/create-task-in-repo)`.
func agentTasksCreateTaskInRepo(_ input: Operations.AgentTasksCreateTaskInRepo.Input) async throws -> Operations.AgentTasksCreateTaskInRepo.Output
/// Get a task by repo
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a task by ID scoped to an owner/repo path
///
/// **Fine-grained access tokens for "Get a task by repo"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/repos/{owner}/{repo}/tasks/{task_id}`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/{task_id}/get(agent-tasks/get-task-by-repo-and-id)`.
func agentTasksGetTaskByRepoAndId(_ input: Operations.AgentTasksGetTaskByRepoAndId.Input) async throws -> Operations.AgentTasksGetTaskByRepoAndId.Output
/// List tasks
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a list of tasks for the authenticated user
///
/// **Fine-grained access tokens for "List tasks"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/tasks`.
/// - Remark: Generated from `#/paths//agents/tasks/get(agent-tasks/list-tasks)`.
func agentTasksListTasks(_ input: Operations.AgentTasksListTasks.Input) async throws -> Operations.AgentTasksListTasks.Output
/// Get a task by ID
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a task by ID with its associated sessions
///
/// **Fine-grained access tokens for "Get a task by ID"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/tasks/{task_id}`.
/// - Remark: Generated from `#/paths//agents/tasks/{task_id}/get(agent-tasks/get-task-by-id)`.
func agentTasksGetTaskById(_ input: Operations.AgentTasksGetTaskById.Input) async throws -> Operations.AgentTasksGetTaskById.Output
}
/// Convenience overloads for operation inputs.
extension APIProtocol {
/// List tasks for repository
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a list of tasks for a specific repository
///
/// **Fine-grained access tokens for "List tasks for repository"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/repos/{owner}/{repo}/tasks`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/get(agent-tasks/list-tasks-for-repo)`.
public func agentTasksListTasksForRepo(
path: Operations.AgentTasksListTasksForRepo.Input.Path,
query: Operations.AgentTasksListTasksForRepo.Input.Query = .init(),
headers: Operations.AgentTasksListTasksForRepo.Input.Headers = .init()
) async throws -> Operations.AgentTasksListTasksForRepo.Output {
try await agentTasksListTasksForRepo(Operations.AgentTasksListTasksForRepo.Input(
path: path,
query: query,
headers: headers
))
}
/// Start a task
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Starts a new Copilot cloud agent task for a repository.
///
/// This endpoint is only available to users with a Copilot Business or Copilot Enterprise subscription.
///
/// **Fine-grained access tokens for "Start a task"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read and write)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `POST /agents/repos/{owner}/{repo}/tasks`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/post(agent-tasks/create-task-in-repo)`.
public func agentTasksCreateTaskInRepo(
path: Operations.AgentTasksCreateTaskInRepo.Input.Path,
headers: Operations.AgentTasksCreateTaskInRepo.Input.Headers = .init(),
body: Operations.AgentTasksCreateTaskInRepo.Input.Body
) async throws -> Operations.AgentTasksCreateTaskInRepo.Output {
try await agentTasksCreateTaskInRepo(Operations.AgentTasksCreateTaskInRepo.Input(
path: path,
headers: headers,
body: body
))
}
/// Get a task by repo
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a task by ID scoped to an owner/repo path
///
/// **Fine-grained access tokens for "Get a task by repo"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/repos/{owner}/{repo}/tasks/{task_id}`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/{task_id}/get(agent-tasks/get-task-by-repo-and-id)`.
public func agentTasksGetTaskByRepoAndId(
path: Operations.AgentTasksGetTaskByRepoAndId.Input.Path,
headers: Operations.AgentTasksGetTaskByRepoAndId.Input.Headers = .init()
) async throws -> Operations.AgentTasksGetTaskByRepoAndId.Output {
try await agentTasksGetTaskByRepoAndId(Operations.AgentTasksGetTaskByRepoAndId.Input(
path: path,
headers: headers
))
}
/// List tasks
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a list of tasks for the authenticated user
///
/// **Fine-grained access tokens for "List tasks"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/tasks`.
/// - Remark: Generated from `#/paths//agents/tasks/get(agent-tasks/list-tasks)`.
public func agentTasksListTasks(
query: Operations.AgentTasksListTasks.Input.Query = .init(),
headers: Operations.AgentTasksListTasks.Input.Headers = .init()
) async throws -> Operations.AgentTasksListTasks.Output {
try await agentTasksListTasks(Operations.AgentTasksListTasks.Input(
query: query,
headers: headers
))
}
/// Get a task by ID
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a task by ID with its associated sessions
///
/// **Fine-grained access tokens for "Get a task by ID"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/tasks/{task_id}`.
/// - Remark: Generated from `#/paths//agents/tasks/{task_id}/get(agent-tasks/get-task-by-id)`.
public func agentTasksGetTaskById(
path: Operations.AgentTasksGetTaskById.Input.Path,
headers: Operations.AgentTasksGetTaskById.Input.Headers = .init()
) async throws -> Operations.AgentTasksGetTaskById.Output {
try await agentTasksGetTaskById(Operations.AgentTasksGetTaskById.Input(
path: path,
headers: headers
))
}
}
/// Server URLs defined in the OpenAPI document.
public enum Servers {
public enum Server1 {
public static func url() throws -> Foundation.URL {
try Foundation.URL(
validatingOpenAPIServerURL: "https://api.github.com",
variables: []
)
}
}
@available(*, deprecated, renamed: "Servers.Server1.url")
public static func server1() throws -> Foundation.URL {
try Foundation.URL(
validatingOpenAPIServerURL: "https://api.github.com",
variables: []
)
}
}
/// Types generated from the components section of the OpenAPI document.
public enum Components {
/// Types generated from the `#/components/schemas` section of the OpenAPI document.
public enum Schemas {}
/// Types generated from the `#/components/parameters` section of the OpenAPI document.
public enum Parameters {}
/// Types generated from the `#/components/requestBodies` section of the OpenAPI document.
public enum RequestBodies {}
/// Types generated from the `#/components/responses` section of the OpenAPI document.
public enum Responses {}
/// Types generated from the `#/components/headers` section of the OpenAPI document.
public enum Headers {}
}
/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document.
public enum Operations {
/// List tasks for repository
///
/// > [!NOTE]
/// > This endpoint is in public preview and is subject to change.
///
/// Returns a list of tasks for a specific repository
///
/// **Fine-grained access tokens for "List tasks for repository"**
///
/// This endpoint works with the following fine-grained token types:
///
/// * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
/// * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
///
/// The fine-grained token must have the following permission set:
///
/// * "Agent tasks" repository permissions (read)
///
/// GitHub App installation access tokens are not supported for this endpoint.
///
///
/// - Remark: HTTP `GET /agents/repos/{owner}/{repo}/tasks`.
/// - Remark: Generated from `#/paths//agents/repos/{owner}/{repo}/tasks/get(agent-tasks/list-tasks-for-repo)`.
public enum AgentTasksListTasksForRepo {
public static let id: Swift.String = "agent-tasks/list-tasks-for-repo"
public struct Input: Sendable, Hashable {
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/path`.
public struct Path: Sendable, Hashable {
/// The account owner of the repository. The name is not case sensitive.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/path/owner`.
public var owner: Swift.String
/// The name of the repository. The name is not case sensitive.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/path/repo`.
public var repo: Swift.String
/// Creates a new `Path`.
///
/// - Parameters:
/// - owner: The account owner of the repository. The name is not case sensitive.
/// - repo: The name of the repository. The name is not case sensitive.
public init(
owner: Swift.String,
repo: Swift.String
) {
self.owner = owner
self.repo = repo
}
}
public var path: Operations.AgentTasksListTasksForRepo.Input.Path
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query`.
public struct Query: Sendable, Hashable {
/// The number of results per page (max 100).
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/per_page`.
public var perPage: Swift.Int?
/// The page number of the results to fetch.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/page`.
public var page: Swift.Int?
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/sort`.
@frozen public enum SortPayload: String, Codable, Hashable, Sendable, CaseIterable {
case updatedAt = "updated_at"
case createdAt = "created_at"
}
/// The field to sort results by. Can be `updated_at` or `created_at`.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/sort`.
public var sort: Operations.AgentTasksListTasksForRepo.Input.Query.SortPayload?
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/direction`.
@frozen public enum DirectionPayload: String, Codable, Hashable, Sendable, CaseIterable {
case asc = "asc"
case desc = "desc"
}
/// The direction to sort results. Can be `asc` or `desc`.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/direction`.
public var direction: Operations.AgentTasksListTasksForRepo.Input.Query.DirectionPayload?
/// Comma-separated list of task states to filter by. Can be any combination of: `queued`, `in_progress`, `completed`, `failed`, `idle`, `waiting_for_user`, `timed_out`, `cancelled`.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/state`.
public var state: Swift.String?
/// Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`.
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/is_archived`.
public var isArchived: Swift.Bool?
/// Only show tasks updated at or after this time (ISO 8601 timestamp)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/since`.
public var since: Foundation.Date?
/// Filter tasks by creator user ID
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/query/creator_id`.
public var creatorId: Swift.Int?
/// Creates a new `Query`.
///
/// - Parameters:
/// - perPage: The number of results per page (max 100).
/// - page: The page number of the results to fetch.
/// - sort: The field to sort results by. Can be `updated_at` or `created_at`.
/// - direction: The direction to sort results. Can be `asc` or `desc`.
/// - state: Comma-separated list of task states to filter by. Can be any combination of: `queued`, `in_progress`, `completed`, `failed`, `idle`, `waiting_for_user`, `timed_out`, `cancelled`.
/// - isArchived: Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`.
/// - since: Only show tasks updated at or after this time (ISO 8601 timestamp)
/// - creatorId: Filter tasks by creator user ID
public init(
perPage: Swift.Int? = nil,
page: Swift.Int? = nil,
sort: Operations.AgentTasksListTasksForRepo.Input.Query.SortPayload? = nil,
direction: Operations.AgentTasksListTasksForRepo.Input.Query.DirectionPayload? = nil,
state: Swift.String? = nil,
isArchived: Swift.Bool? = nil,
since: Foundation.Date? = nil,
creatorId: Swift.Int? = nil
) {
self.perPage = perPage
self.page = page
self.sort = sort
self.direction = direction
self.state = state
self.isArchived = isArchived
self.since = since
self.creatorId = creatorId
}
}
public var query: Operations.AgentTasksListTasksForRepo.Input.Query
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/header`.
public struct Headers: Sendable, Hashable {
public var accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.AgentTasksListTasksForRepo.AcceptableContentType>]
/// Creates a new `Headers`.
///
/// - Parameters:
/// - accept:
public init(accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.AgentTasksListTasksForRepo.AcceptableContentType>] = .defaultValues()) {
self.accept = accept
}
}
public var headers: Operations.AgentTasksListTasksForRepo.Input.Headers
/// Creates a new `Input`.
///
/// - Parameters:
/// - path:
/// - query:
/// - headers:
public init(
path: Operations.AgentTasksListTasksForRepo.Input.Path,
query: Operations.AgentTasksListTasksForRepo.Input.Query = .init(),
headers: Operations.AgentTasksListTasksForRepo.Input.Headers = .init()
) {
self.path = path
self.query = query
self.headers = headers
}
}
@frozen public enum Output: Sendable, Hashable {
public struct Ok: Sendable, Hashable {
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/headers`.
public struct Headers: Sendable, Hashable {
/// Pagination links. Contains rel="first" (always),
/// rel="prev" (when current page > 1),
/// rel="next" (when more pages exist), and rel="last" (when on the final page).
///
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/headers/Link`.
public var link: Swift.String?
/// Creates a new `Headers`.
///
/// - Parameters:
/// - link: Pagination links. Contains rel="first" (always),
public init(link: Swift.String? = nil) {
self.link = link
}
}
/// Received HTTP response headers
public var headers: Operations.AgentTasksListTasksForRepo.Output.Ok.Headers
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content`.
@frozen public enum Body: Sendable, Hashable {
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json`.
public struct JsonPayload: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload`.
public struct TasksPayloadPayload: Codable, Hashable, Sendable {
/// Unique task identifier
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/id`.
public var id: Swift.String
/// API URL for this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/url`.
public var url: Swift.String?
/// Web URL for this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/html_url`.
public var htmlUrl: Swift.String?
/// Human-readable name derived from the task prompt
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/name`.
public var name: Swift.String?
/// The entity who created this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator`.
@frozen public enum CreatorPayload: Codable, Hashable, Sendable {
/// A GitHub user
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator/case1`.
public struct Case1Payload: Codable, Hashable, Sendable {
/// The unique identifier of the user
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator/case1/id`.
public var id: Swift.Int64?
/// Creates a new `Case1Payload`.
///
/// - Parameters:
/// - id: The unique identifier of the user
public init(id: Swift.Int64? = nil) {
self.id = id
}
public enum CodingKeys: String, CodingKey {
case id
}
}
/// A GitHub user
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator/case1`.
case case1(Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.CreatorPayload.Case1Payload)
public init(from decoder: any Swift.Decoder) throws {
var errors: [any Swift.Error] = []
do {
self = .case1(try .init(from: decoder))
return
} catch {
errors.append(error)
}
throw Swift.DecodingError.failedToDecodeOneOfSchema(
type: Self.self,
codingPath: decoder.codingPath,
errors: errors
)
}
public func encode(to encoder: any Swift.Encoder) throws {
switch self {
case let .case1(value):
try value.encode(to: encoder)
}
}
}
/// The entity who created this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator`.
public var creator: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.CreatorPayload?
/// Type of the task creator
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator_type`.
@frozen public enum CreatorTypePayload: String, Codable, Hashable, Sendable, CaseIterable {
case user = "user"
case organization = "organization"
}
/// Type of the task creator
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/creator_type`.
public var creatorType: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.CreatorTypePayload?
/// A GitHub user
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/UserCollaboratorsPayload`.
public struct UserCollaboratorsPayloadPayload: Codable, Hashable, Sendable {
/// The unique identifier of the user
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/UserCollaboratorsPayload/id`.
public var id: Swift.Int64?
/// Creates a new `UserCollaboratorsPayloadPayload`.
///
/// - Parameters:
/// - id: The unique identifier of the user
public init(id: Swift.Int64? = nil) {
self.id = id
}
public enum CodingKeys: String, CodingKey {
case id
}
}
/// User objects of collaborators on this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/user_collaborators`.
public typealias UserCollaboratorsPayload = [Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.UserCollaboratorsPayloadPayload]
/// User objects of collaborators on this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/user_collaborators`.
@available(*, deprecated)
public var userCollaborators: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.UserCollaboratorsPayload?
/// The owner of the repository
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/owner`.
public struct OwnerPayload: Codable, Hashable, Sendable {
/// The unique identifier of the user
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/owner/id`.
public var id: Swift.Int64?
/// Creates a new `OwnerPayload`.
///
/// - Parameters:
/// - id: The unique identifier of the user
public init(id: Swift.Int64? = nil) {
self.id = id
}
public enum CodingKeys: String, CodingKey {
case id
}
}
/// The owner of the repository
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/owner`.
public var owner: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.OwnerPayload?
/// The repository this task belongs to
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/repository`.
public struct RepositoryPayload: Codable, Hashable, Sendable {
/// The unique identifier of the repository
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/repository/id`.
public var id: Swift.Int64?
/// Creates a new `RepositoryPayload`.
///
/// - Parameters:
/// - id: The unique identifier of the repository
public init(id: Swift.Int64? = nil) {
self.id = id
}
public enum CodingKeys: String, CodingKey {
case id
}
}
/// The repository this task belongs to
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/repository`.
public var repository: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.RepositoryPayload?
/// Current state of the task, derived from its most recent session
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/state`.
@frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable {
case queued = "queued"
case inProgress = "in_progress"
case completed = "completed"
case failed = "failed"
case idle = "idle"
case waitingForUser = "waiting_for_user"
case timedOut = "timed_out"
case cancelled = "cancelled"
}
/// Current state of the task, derived from its most recent session
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/state`.
public var state: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.StatePayload
/// Number of sessions in this task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/session_count`.
public var sessionCount: Swift.Int32?
/// A resource generated by the task
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload`.
public struct ArtifactsPayloadPayload: Codable, Hashable, Sendable {
/// Provider namespace
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/provider`.
@frozen public enum ProviderPayload: String, Codable, Hashable, Sendable, CaseIterable {
case github = "github"
}
/// Provider namespace
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/provider`.
public var provider: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload.ProviderPayload
/// Type of artifact. Available Values: `pull`, `branch`.
///
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/type`.
@frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable {
case pull = "pull"
case branch = "branch"
}
/// Type of artifact. Available Values: `pull`, `branch`.
///
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/type`.
public var _type: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload._TypePayload
/// Resource data (shape depends on type)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data`.
@frozen public enum DataPayload: Codable, Hashable, Sendable {
/// A GitHub resource (pull request, issue, etc.)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case1`.
public struct Case1Payload: Codable, Hashable, Sendable {
/// GitHub resource ID
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case1/id`.
public var id: Swift.Int64
/// GraphQL global ID
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case1/global_id`.
public var globalId: Swift.String?
/// Creates a new `Case1Payload`.
///
/// - Parameters:
/// - id: GitHub resource ID
/// - globalId: GraphQL global ID
public init(
id: Swift.Int64,
globalId: Swift.String? = nil
) {
self.id = id
self.globalId = globalId
}
public enum CodingKeys: String, CodingKey {
case id
case globalId = "global_id"
}
}
/// A GitHub resource (pull request, issue, etc.)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case1`.
case case1(Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload.DataPayload.Case1Payload)
/// A Git branch reference
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case2`.
public struct Case2Payload: Codable, Hashable, Sendable {
/// Head branch name
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case2/head_ref`.
public var headRef: Swift.String
/// Base branch name
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case2/base_ref`.
public var baseRef: Swift.String
/// Creates a new `Case2Payload`.
///
/// - Parameters:
/// - headRef: Head branch name
/// - baseRef: Base branch name
public init(
headRef: Swift.String,
baseRef: Swift.String
) {
self.headRef = headRef
self.baseRef = baseRef
}
public enum CodingKeys: String, CodingKey {
case headRef = "head_ref"
case baseRef = "base_ref"
}
}
/// A Git branch reference
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data/case2`.
case case2(Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload.DataPayload.Case2Payload)
public init(from decoder: any Swift.Decoder) throws {
var errors: [any Swift.Error] = []
do {
self = .case1(try .init(from: decoder))
return
} catch {
errors.append(error)
}
do {
self = .case2(try .init(from: decoder))
return
} catch {
errors.append(error)
}
throw Swift.DecodingError.failedToDecodeOneOfSchema(
type: Self.self,
codingPath: decoder.codingPath,
errors: errors
)
}
public func encode(to encoder: any Swift.Encoder) throws {
switch self {
case let .case1(value):
try value.encode(to: encoder)
case let .case2(value):
try value.encode(to: encoder)
}
}
}
/// Resource data (shape depends on type)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/ArtifactsPayload/data`.
public var data: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload.DataPayload
/// Creates a new `ArtifactsPayloadPayload`.
///
/// - Parameters:
/// - provider: Provider namespace
/// - _type: Type of artifact. Available Values: `pull`, `branch`.
/// - data: Resource data (shape depends on type)
public init(
provider: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload.ProviderPayload,
_type: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload._TypePayload,
data: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload.DataPayload
) {
self.provider = provider
self._type = _type
self.data = data
}
public enum CodingKeys: String, CodingKey {
case provider
case _type = "type"
case data
}
}
/// Resources created by this task (PRs, branches, etc.)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/artifacts`.
public typealias ArtifactsPayload = [Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayloadPayload]
/// Resources created by this task (PRs, branches, etc.)
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/artifacts`.
public var artifacts: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayload?
/// Timestamp when the task was archived, null if not archived
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/archived_at`.
public var archivedAt: Foundation.Date?
/// Timestamp of the most recent update
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/updated_at`.
public var updatedAt: Foundation.Date?
/// Timestamp when the task was created
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/TasksPayload/created_at`.
public var createdAt: Foundation.Date
/// Creates a new `TasksPayloadPayload`.
///
/// - Parameters:
/// - id: Unique task identifier
/// - url: API URL for this task
/// - htmlUrl: Web URL for this task
/// - name: Human-readable name derived from the task prompt
/// - creator: The entity who created this task
/// - creatorType: Type of the task creator
/// - userCollaborators: User objects of collaborators on this task
/// - owner: The owner of the repository
/// - repository: The repository this task belongs to
/// - state: Current state of the task, derived from its most recent session
/// - sessionCount: Number of sessions in this task
/// - artifacts: Resources created by this task (PRs, branches, etc.)
/// - archivedAt: Timestamp when the task was archived, null if not archived
/// - updatedAt: Timestamp of the most recent update
/// - createdAt: Timestamp when the task was created
public init(
id: Swift.String,
url: Swift.String? = nil,
htmlUrl: Swift.String? = nil,
name: Swift.String? = nil,
creator: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.CreatorPayload? = nil,
creatorType: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.CreatorTypePayload? = nil,
userCollaborators: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.UserCollaboratorsPayload? = nil,
owner: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.OwnerPayload? = nil,
repository: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.RepositoryPayload? = nil,
state: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.StatePayload,
sessionCount: Swift.Int32? = nil,
artifacts: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload.ArtifactsPayload? = nil,
archivedAt: Foundation.Date? = nil,
updatedAt: Foundation.Date? = nil,
createdAt: Foundation.Date
) {
self.id = id
self.url = url
self.htmlUrl = htmlUrl
self.name = name
self.creator = creator
self.creatorType = creatorType
self.userCollaborators = userCollaborators
self.owner = owner
self.repository = repository
self.state = state
self.sessionCount = sessionCount
self.artifacts = artifacts
self.archivedAt = archivedAt
self.updatedAt = updatedAt
self.createdAt = createdAt
}
public enum CodingKeys: String, CodingKey {
case id
case url
case htmlUrl = "html_url"
case name
case creator
case creatorType = "creator_type"
case userCollaborators = "user_collaborators"
case owner
case repository
case state
case sessionCount = "session_count"
case artifacts
case archivedAt = "archived_at"
case updatedAt = "updated_at"
case createdAt = "created_at"
}
}
/// List of tasks
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/tasks`.
public typealias TasksPayload = [Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayloadPayload]
/// List of tasks
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/tasks`.
public var tasks: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayload
/// Total count of active (non-archived) tasks
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/total_active_count`.
public var totalActiveCount: Swift.Int32?
/// Total count of archived tasks
///
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/json/total_archived_count`.
public var totalArchivedCount: Swift.Int32?
/// Creates a new `JsonPayload`.
///
/// - Parameters:
/// - tasks: List of tasks
/// - totalActiveCount: Total count of active (non-archived) tasks
/// - totalArchivedCount: Total count of archived tasks
public init(
tasks: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload.TasksPayload,
totalActiveCount: Swift.Int32? = nil,
totalArchivedCount: Swift.Int32? = nil
) {
self.tasks = tasks
self.totalActiveCount = totalActiveCount
self.totalArchivedCount = totalArchivedCount
}
public enum CodingKeys: String, CodingKey {
case tasks
case totalActiveCount = "total_active_count"
case totalArchivedCount = "total_archived_count"
}
}
/// - Remark: Generated from `#/paths/agents/repos/{owner}/{repo}/tasks/GET/responses/200/content/application\/json`.
case json(Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload)
/// The associated value of the enum case if `self` is `.json`.
///
/// - Throws: An error if `self` is not `.json`.
/// - SeeAlso: `.json`.
public var json: Operations.AgentTasksListTasksForRepo.Output.Ok.Body.JsonPayload {
get throws {
switch self {
case let .json(body):
return body
}
}
}
}
/// Received HTTP response body
public var body: Operations.AgentTasksListTasksForRepo.Output.Ok.Body
/// Creates a new `Ok`.
///
/// - Parameters:
/// - headers: Received HTTP response headers
/// - body: Received HTTP response body
public init(
headers: Operations.AgentTasksListTasksForRepo.Output.Ok.Headers = .init(),
body: Operations.AgentTasksListTasksForRepo.Output.Ok.Body
) {