-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTypes.swift
More file actions
2397 lines (2393 loc) · 126 KB
/
Types.swift
File metadata and controls
2397 lines (2393 loc) · 126 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 {
/// Get billing usage report for an organization
///
/// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.
///
/// **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)."
///
/// - Remark: HTTP `GET /organizations/{org}/settings/billing/usage`.
/// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)`.
func billingGetGithubBillingUsageReportOrg(_ input: Operations.BillingGetGithubBillingUsageReportOrg.Input) async throws -> Operations.BillingGetGithubBillingUsageReportOrg.Output
/// Get GitHub Actions billing for an organization
///
/// Gets the summary of the free and paid GitHub Actions minutes used.
///
/// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint.
///
/// - Remark: HTTP `GET /orgs/{org}/settings/billing/actions`.
/// - Remark: Generated from `#/paths//orgs/{org}/settings/billing/actions/get(billing/get-github-actions-billing-org)`.
func billingGetGithubActionsBillingOrg(_ input: Operations.BillingGetGithubActionsBillingOrg.Input) async throws -> Operations.BillingGetGithubActionsBillingOrg.Output
/// Get GitHub Packages billing for an organization
///
/// Gets the free and paid storage used for GitHub Packages in gigabytes.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint.
///
/// - Remark: HTTP `GET /orgs/{org}/settings/billing/packages`.
/// - Remark: Generated from `#/paths//orgs/{org}/settings/billing/packages/get(billing/get-github-packages-billing-org)`.
func billingGetGithubPackagesBillingOrg(_ input: Operations.BillingGetGithubPackagesBillingOrg.Input) async throws -> Operations.BillingGetGithubPackagesBillingOrg.Output
/// Get shared storage billing for an organization
///
/// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint.
///
/// - Remark: HTTP `GET /orgs/{org}/settings/billing/shared-storage`.
/// - Remark: Generated from `#/paths//orgs/{org}/settings/billing/shared-storage/get(billing/get-shared-storage-billing-org)`.
func billingGetSharedStorageBillingOrg(_ input: Operations.BillingGetSharedStorageBillingOrg.Input) async throws -> Operations.BillingGetSharedStorageBillingOrg.Output
/// Get GitHub Actions billing for a user
///
/// Gets the summary of the free and paid GitHub Actions minutes used.
///
/// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
///
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/actions`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/actions/get(billing/get-github-actions-billing-user)`.
func billingGetGithubActionsBillingUser(_ input: Operations.BillingGetGithubActionsBillingUser.Input) async throws -> Operations.BillingGetGithubActionsBillingUser.Output
/// Get GitHub Packages billing for a user
///
/// Gets the free and paid storage used for GitHub Packages in gigabytes.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/packages`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/packages/get(billing/get-github-packages-billing-user)`.
func billingGetGithubPackagesBillingUser(_ input: Operations.BillingGetGithubPackagesBillingUser.Input) async throws -> Operations.BillingGetGithubPackagesBillingUser.Output
/// Get shared storage billing for a user
///
/// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/shared-storage`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/shared-storage/get(billing/get-shared-storage-billing-user)`.
func billingGetSharedStorageBillingUser(_ input: Operations.BillingGetSharedStorageBillingUser.Input) async throws -> Operations.BillingGetSharedStorageBillingUser.Output
/// Get billing usage report for a user
///
/// Gets a report of the total usage for a user.
///
/// **Note:** This endpoint is only available to users with access to the enhanced billing platform.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/usage`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)`.
func billingGetGithubBillingUsageReportUser(_ input: Operations.BillingGetGithubBillingUsageReportUser.Input) async throws -> Operations.BillingGetGithubBillingUsageReportUser.Output
}
/// Convenience overloads for operation inputs.
extension APIProtocol {
/// Get billing usage report for an organization
///
/// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.
///
/// **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)."
///
/// - Remark: HTTP `GET /organizations/{org}/settings/billing/usage`.
/// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/usage/get(billing/get-github-billing-usage-report-org)`.
public func billingGetGithubBillingUsageReportOrg(
path: Operations.BillingGetGithubBillingUsageReportOrg.Input.Path,
query: Operations.BillingGetGithubBillingUsageReportOrg.Input.Query = .init(),
headers: Operations.BillingGetGithubBillingUsageReportOrg.Input.Headers = .init()
) async throws -> Operations.BillingGetGithubBillingUsageReportOrg.Output {
try await billingGetGithubBillingUsageReportOrg(Operations.BillingGetGithubBillingUsageReportOrg.Input(
path: path,
query: query,
headers: headers
))
}
/// Get GitHub Actions billing for an organization
///
/// Gets the summary of the free and paid GitHub Actions minutes used.
///
/// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint.
///
/// - Remark: HTTP `GET /orgs/{org}/settings/billing/actions`.
/// - Remark: Generated from `#/paths//orgs/{org}/settings/billing/actions/get(billing/get-github-actions-billing-org)`.
public func billingGetGithubActionsBillingOrg(
path: Operations.BillingGetGithubActionsBillingOrg.Input.Path,
headers: Operations.BillingGetGithubActionsBillingOrg.Input.Headers = .init()
) async throws -> Operations.BillingGetGithubActionsBillingOrg.Output {
try await billingGetGithubActionsBillingOrg(Operations.BillingGetGithubActionsBillingOrg.Input(
path: path,
headers: headers
))
}
/// Get GitHub Packages billing for an organization
///
/// Gets the free and paid storage used for GitHub Packages in gigabytes.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint.
///
/// - Remark: HTTP `GET /orgs/{org}/settings/billing/packages`.
/// - Remark: Generated from `#/paths//orgs/{org}/settings/billing/packages/get(billing/get-github-packages-billing-org)`.
public func billingGetGithubPackagesBillingOrg(
path: Operations.BillingGetGithubPackagesBillingOrg.Input.Path,
headers: Operations.BillingGetGithubPackagesBillingOrg.Input.Headers = .init()
) async throws -> Operations.BillingGetGithubPackagesBillingOrg.Output {
try await billingGetGithubPackagesBillingOrg(Operations.BillingGetGithubPackagesBillingOrg.Input(
path: path,
headers: headers
))
}
/// Get shared storage billing for an organization
///
/// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint.
///
/// - Remark: HTTP `GET /orgs/{org}/settings/billing/shared-storage`.
/// - Remark: Generated from `#/paths//orgs/{org}/settings/billing/shared-storage/get(billing/get-shared-storage-billing-org)`.
public func billingGetSharedStorageBillingOrg(
path: Operations.BillingGetSharedStorageBillingOrg.Input.Path,
headers: Operations.BillingGetSharedStorageBillingOrg.Input.Headers = .init()
) async throws -> Operations.BillingGetSharedStorageBillingOrg.Output {
try await billingGetSharedStorageBillingOrg(Operations.BillingGetSharedStorageBillingOrg.Input(
path: path,
headers: headers
))
}
/// Get GitHub Actions billing for a user
///
/// Gets the summary of the free and paid GitHub Actions minutes used.
///
/// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
///
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/actions`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/actions/get(billing/get-github-actions-billing-user)`.
public func billingGetGithubActionsBillingUser(
path: Operations.BillingGetGithubActionsBillingUser.Input.Path,
headers: Operations.BillingGetGithubActionsBillingUser.Input.Headers = .init()
) async throws -> Operations.BillingGetGithubActionsBillingUser.Output {
try await billingGetGithubActionsBillingUser(Operations.BillingGetGithubActionsBillingUser.Input(
path: path,
headers: headers
))
}
/// Get GitHub Packages billing for a user
///
/// Gets the free and paid storage used for GitHub Packages in gigabytes.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/packages`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/packages/get(billing/get-github-packages-billing-user)`.
public func billingGetGithubPackagesBillingUser(
path: Operations.BillingGetGithubPackagesBillingUser.Input.Path,
headers: Operations.BillingGetGithubPackagesBillingUser.Input.Headers = .init()
) async throws -> Operations.BillingGetGithubPackagesBillingUser.Output {
try await billingGetGithubPackagesBillingUser(Operations.BillingGetGithubPackagesBillingUser.Input(
path: path,
headers: headers
))
}
/// Get shared storage billing for a user
///
/// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
///
/// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
///
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/shared-storage`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/shared-storage/get(billing/get-shared-storage-billing-user)`.
public func billingGetSharedStorageBillingUser(
path: Operations.BillingGetSharedStorageBillingUser.Input.Path,
headers: Operations.BillingGetSharedStorageBillingUser.Input.Headers = .init()
) async throws -> Operations.BillingGetSharedStorageBillingUser.Output {
try await billingGetSharedStorageBillingUser(Operations.BillingGetSharedStorageBillingUser.Input(
path: path,
headers: headers
))
}
/// Get billing usage report for a user
///
/// Gets a report of the total usage for a user.
///
/// **Note:** This endpoint is only available to users with access to the enhanced billing platform.
///
/// - Remark: HTTP `GET /users/{username}/settings/billing/usage`.
/// - Remark: Generated from `#/paths//users/{username}/settings/billing/usage/get(billing/get-github-billing-usage-report-user)`.
public func billingGetGithubBillingUsageReportUser(
path: Operations.BillingGetGithubBillingUsageReportUser.Input.Path,
query: Operations.BillingGetGithubBillingUsageReportUser.Input.Query = .init(),
headers: Operations.BillingGetGithubBillingUsageReportUser.Input.Headers = .init()
) async throws -> Operations.BillingGetGithubBillingUsageReportUser.Output {
try await billingGetGithubBillingUsageReportUser(Operations.BillingGetGithubBillingUsageReportUser.Input(
path: path,
query: query,
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 {
/// Basic Error
///
/// - Remark: Generated from `#/components/schemas/basic-error`.
public struct BasicError: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/basic-error/message`.
public var message: Swift.String?
/// - Remark: Generated from `#/components/schemas/basic-error/documentation_url`.
public var documentationUrl: Swift.String?
/// - Remark: Generated from `#/components/schemas/basic-error/url`.
public var url: Swift.String?
/// - Remark: Generated from `#/components/schemas/basic-error/status`.
public var status: Swift.String?
/// Creates a new `BasicError`.
///
/// - Parameters:
/// - message:
/// - documentationUrl:
/// - url:
/// - status:
public init(
message: Swift.String? = nil,
documentationUrl: Swift.String? = nil,
url: Swift.String? = nil,
status: Swift.String? = nil
) {
self.message = message
self.documentationUrl = documentationUrl
self.url = url
self.status = status
}
public enum CodingKeys: String, CodingKey {
case message
case documentationUrl = "documentation_url"
case url
case status
}
}
/// Scim Error
///
/// - Remark: Generated from `#/components/schemas/scim-error`.
public struct ScimError: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/scim-error/message`.
public var message: Swift.String?
/// - Remark: Generated from `#/components/schemas/scim-error/documentation_url`.
public var documentationUrl: Swift.String?
/// - Remark: Generated from `#/components/schemas/scim-error/detail`.
public var detail: Swift.String?
/// - Remark: Generated from `#/components/schemas/scim-error/status`.
public var status: Swift.Int?
/// - Remark: Generated from `#/components/schemas/scim-error/scimType`.
public var scimType: Swift.String?
/// - Remark: Generated from `#/components/schemas/scim-error/schemas`.
public var schemas: [Swift.String]?
/// Creates a new `ScimError`.
///
/// - Parameters:
/// - message:
/// - documentationUrl:
/// - detail:
/// - status:
/// - scimType:
/// - schemas:
public init(
message: Swift.String? = nil,
documentationUrl: Swift.String? = nil,
detail: Swift.String? = nil,
status: Swift.Int? = nil,
scimType: Swift.String? = nil,
schemas: [Swift.String]? = nil
) {
self.message = message
self.documentationUrl = documentationUrl
self.detail = detail
self.status = status
self.scimType = scimType
self.schemas = schemas
}
public enum CodingKeys: String, CodingKey {
case message
case documentationUrl = "documentation_url"
case detail
case status
case scimType
case schemas
}
}
/// - Remark: Generated from `#/components/schemas/billing-usage-report`.
public struct BillingUsageReport: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload`.
public struct UsageItemsPayloadPayload: Codable, Hashable, Sendable {
/// Date of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/date`.
public var date: Swift.String
/// Product name.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/product`.
public var product: Swift.String
/// SKU name.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/sku`.
public var sku: Swift.String
/// Quantity of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/quantity`.
public var quantity: Swift.Int
/// Unit type of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/unitType`.
public var unitType: Swift.String
/// Price per unit of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/pricePerUnit`.
public var pricePerUnit: Swift.Double
/// Gross amount of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/grossAmount`.
public var grossAmount: Swift.Double
/// Discount amount of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/discountAmount`.
public var discountAmount: Swift.Double
/// Net amount of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/netAmount`.
public var netAmount: Swift.Double
/// Name of the organization.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/organizationName`.
public var organizationName: Swift.String
/// Name of the repository.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report/UsageItemsPayload/repositoryName`.
public var repositoryName: Swift.String?
/// Creates a new `UsageItemsPayloadPayload`.
///
/// - Parameters:
/// - date: Date of the usage line item.
/// - product: Product name.
/// - sku: SKU name.
/// - quantity: Quantity of the usage line item.
/// - unitType: Unit type of the usage line item.
/// - pricePerUnit: Price per unit of the usage line item.
/// - grossAmount: Gross amount of the usage line item.
/// - discountAmount: Discount amount of the usage line item.
/// - netAmount: Net amount of the usage line item.
/// - organizationName: Name of the organization.
/// - repositoryName: Name of the repository.
public init(
date: Swift.String,
product: Swift.String,
sku: Swift.String,
quantity: Swift.Int,
unitType: Swift.String,
pricePerUnit: Swift.Double,
grossAmount: Swift.Double,
discountAmount: Swift.Double,
netAmount: Swift.Double,
organizationName: Swift.String,
repositoryName: Swift.String? = nil
) {
self.date = date
self.product = product
self.sku = sku
self.quantity = quantity
self.unitType = unitType
self.pricePerUnit = pricePerUnit
self.grossAmount = grossAmount
self.discountAmount = discountAmount
self.netAmount = netAmount
self.organizationName = organizationName
self.repositoryName = repositoryName
}
public enum CodingKeys: String, CodingKey {
case date
case product
case sku
case quantity
case unitType
case pricePerUnit
case grossAmount
case discountAmount
case netAmount
case organizationName
case repositoryName
}
}
/// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItems`.
public typealias UsageItemsPayload = [Components.Schemas.BillingUsageReport.UsageItemsPayloadPayload]
/// - Remark: Generated from `#/components/schemas/billing-usage-report/usageItems`.
public var usageItems: Components.Schemas.BillingUsageReport.UsageItemsPayload?
/// Creates a new `BillingUsageReport`.
///
/// - Parameters:
/// - usageItems:
public init(usageItems: Components.Schemas.BillingUsageReport.UsageItemsPayload? = nil) {
self.usageItems = usageItems
}
public enum CodingKeys: String, CodingKey {
case usageItems
}
}
/// - Remark: Generated from `#/components/schemas/actions-billing-usage`.
public struct ActionsBillingUsage: Codable, Hashable, Sendable {
/// The sum of the free and paid GitHub Actions minutes used.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/total_minutes_used`.
public var totalMinutesUsed: Swift.Int
/// The total paid GitHub Actions minutes used.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/total_paid_minutes_used`.
public var totalPaidMinutesUsed: Swift.Int
/// The amount of free GitHub Actions minutes available.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/included_minutes`.
public var includedMinutes: Swift.Int
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown`.
public struct MinutesUsedBreakdownPayload: Codable, Hashable, Sendable {
/// Total minutes used on Ubuntu runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/UBUNTU`.
public var ubuntu: Swift.Int?
/// Total minutes used on macOS runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/MACOS`.
public var macos: Swift.Int?
/// Total minutes used on Windows runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/WINDOWS`.
public var windows: Swift.Int?
/// Total minutes used on Ubuntu 4 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/ubuntu_4_core`.
public var ubuntu4Core: Swift.Int?
/// Total minutes used on Ubuntu 8 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/ubuntu_8_core`.
public var ubuntu8Core: Swift.Int?
/// Total minutes used on Ubuntu 16 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/ubuntu_16_core`.
public var ubuntu16Core: Swift.Int?
/// Total minutes used on Ubuntu 32 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/ubuntu_32_core`.
public var ubuntu32Core: Swift.Int?
/// Total minutes used on Ubuntu 64 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/ubuntu_64_core`.
public var ubuntu64Core: Swift.Int?
/// Total minutes used on Windows 4 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/windows_4_core`.
public var windows4Core: Swift.Int?
/// Total minutes used on Windows 8 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/windows_8_core`.
public var windows8Core: Swift.Int?
/// Total minutes used on Windows 16 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/windows_16_core`.
public var windows16Core: Swift.Int?
/// Total minutes used on Windows 32 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/windows_32_core`.
public var windows32Core: Swift.Int?
/// Total minutes used on Windows 64 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/windows_64_core`.
public var windows64Core: Swift.Int?
/// Total minutes used on macOS 12 core runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/macos_12_core`.
public var macos12Core: Swift.Int?
/// Total minutes used on all runner machines.
///
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown/total`.
public var total: Swift.Int?
/// Creates a new `MinutesUsedBreakdownPayload`.
///
/// - Parameters:
/// - ubuntu: Total minutes used on Ubuntu runner machines.
/// - macos: Total minutes used on macOS runner machines.
/// - windows: Total minutes used on Windows runner machines.
/// - ubuntu4Core: Total minutes used on Ubuntu 4 core runner machines.
/// - ubuntu8Core: Total minutes used on Ubuntu 8 core runner machines.
/// - ubuntu16Core: Total minutes used on Ubuntu 16 core runner machines.
/// - ubuntu32Core: Total minutes used on Ubuntu 32 core runner machines.
/// - ubuntu64Core: Total minutes used on Ubuntu 64 core runner machines.
/// - windows4Core: Total minutes used on Windows 4 core runner machines.
/// - windows8Core: Total minutes used on Windows 8 core runner machines.
/// - windows16Core: Total minutes used on Windows 16 core runner machines.
/// - windows32Core: Total minutes used on Windows 32 core runner machines.
/// - windows64Core: Total minutes used on Windows 64 core runner machines.
/// - macos12Core: Total minutes used on macOS 12 core runner machines.
/// - total: Total minutes used on all runner machines.
public init(
ubuntu: Swift.Int? = nil,
macos: Swift.Int? = nil,
windows: Swift.Int? = nil,
ubuntu4Core: Swift.Int? = nil,
ubuntu8Core: Swift.Int? = nil,
ubuntu16Core: Swift.Int? = nil,
ubuntu32Core: Swift.Int? = nil,
ubuntu64Core: Swift.Int? = nil,
windows4Core: Swift.Int? = nil,
windows8Core: Swift.Int? = nil,
windows16Core: Swift.Int? = nil,
windows32Core: Swift.Int? = nil,
windows64Core: Swift.Int? = nil,
macos12Core: Swift.Int? = nil,
total: Swift.Int? = nil
) {
self.ubuntu = ubuntu
self.macos = macos
self.windows = windows
self.ubuntu4Core = ubuntu4Core
self.ubuntu8Core = ubuntu8Core
self.ubuntu16Core = ubuntu16Core
self.ubuntu32Core = ubuntu32Core
self.ubuntu64Core = ubuntu64Core
self.windows4Core = windows4Core
self.windows8Core = windows8Core
self.windows16Core = windows16Core
self.windows32Core = windows32Core
self.windows64Core = windows64Core
self.macos12Core = macos12Core
self.total = total
}
public enum CodingKeys: String, CodingKey {
case ubuntu = "UBUNTU"
case macos = "MACOS"
case windows = "WINDOWS"
case ubuntu4Core = "ubuntu_4_core"
case ubuntu8Core = "ubuntu_8_core"
case ubuntu16Core = "ubuntu_16_core"
case ubuntu32Core = "ubuntu_32_core"
case ubuntu64Core = "ubuntu_64_core"
case windows4Core = "windows_4_core"
case windows8Core = "windows_8_core"
case windows16Core = "windows_16_core"
case windows32Core = "windows_32_core"
case windows64Core = "windows_64_core"
case macos12Core = "macos_12_core"
case total
}
}
/// - Remark: Generated from `#/components/schemas/actions-billing-usage/minutes_used_breakdown`.
public var minutesUsedBreakdown: Components.Schemas.ActionsBillingUsage.MinutesUsedBreakdownPayload
/// Creates a new `ActionsBillingUsage`.
///
/// - Parameters:
/// - totalMinutesUsed: The sum of the free and paid GitHub Actions minutes used.
/// - totalPaidMinutesUsed: The total paid GitHub Actions minutes used.
/// - includedMinutes: The amount of free GitHub Actions minutes available.
/// - minutesUsedBreakdown:
public init(
totalMinutesUsed: Swift.Int,
totalPaidMinutesUsed: Swift.Int,
includedMinutes: Swift.Int,
minutesUsedBreakdown: Components.Schemas.ActionsBillingUsage.MinutesUsedBreakdownPayload
) {
self.totalMinutesUsed = totalMinutesUsed
self.totalPaidMinutesUsed = totalPaidMinutesUsed
self.includedMinutes = includedMinutes
self.minutesUsedBreakdown = minutesUsedBreakdown
}
public enum CodingKeys: String, CodingKey {
case totalMinutesUsed = "total_minutes_used"
case totalPaidMinutesUsed = "total_paid_minutes_used"
case includedMinutes = "included_minutes"
case minutesUsedBreakdown = "minutes_used_breakdown"
}
}
/// - Remark: Generated from `#/components/schemas/packages-billing-usage`.
public struct PackagesBillingUsage: Codable, Hashable, Sendable {
/// Sum of the free and paid storage space (GB) for GitHuub Packages.
///
/// - Remark: Generated from `#/components/schemas/packages-billing-usage/total_gigabytes_bandwidth_used`.
public var totalGigabytesBandwidthUsed: Swift.Int
/// Total paid storage space (GB) for GitHuub Packages.
///
/// - Remark: Generated from `#/components/schemas/packages-billing-usage/total_paid_gigabytes_bandwidth_used`.
public var totalPaidGigabytesBandwidthUsed: Swift.Int
/// Free storage space (GB) for GitHub Packages.
///
/// - Remark: Generated from `#/components/schemas/packages-billing-usage/included_gigabytes_bandwidth`.
public var includedGigabytesBandwidth: Swift.Int
/// Creates a new `PackagesBillingUsage`.
///
/// - Parameters:
/// - totalGigabytesBandwidthUsed: Sum of the free and paid storage space (GB) for GitHuub Packages.
/// - totalPaidGigabytesBandwidthUsed: Total paid storage space (GB) for GitHuub Packages.
/// - includedGigabytesBandwidth: Free storage space (GB) for GitHub Packages.
public init(
totalGigabytesBandwidthUsed: Swift.Int,
totalPaidGigabytesBandwidthUsed: Swift.Int,
includedGigabytesBandwidth: Swift.Int
) {
self.totalGigabytesBandwidthUsed = totalGigabytesBandwidthUsed
self.totalPaidGigabytesBandwidthUsed = totalPaidGigabytesBandwidthUsed
self.includedGigabytesBandwidth = includedGigabytesBandwidth
}
public enum CodingKeys: String, CodingKey {
case totalGigabytesBandwidthUsed = "total_gigabytes_bandwidth_used"
case totalPaidGigabytesBandwidthUsed = "total_paid_gigabytes_bandwidth_used"
case includedGigabytesBandwidth = "included_gigabytes_bandwidth"
}
}
/// - Remark: Generated from `#/components/schemas/combined-billing-usage`.
public struct CombinedBillingUsage: Codable, Hashable, Sendable {
/// Numbers of days left in billing cycle.
///
/// - Remark: Generated from `#/components/schemas/combined-billing-usage/days_left_in_billing_cycle`.
public var daysLeftInBillingCycle: Swift.Int
/// Estimated storage space (GB) used in billing cycle.
///
/// - Remark: Generated from `#/components/schemas/combined-billing-usage/estimated_paid_storage_for_month`.
public var estimatedPaidStorageForMonth: Swift.Int
/// Estimated sum of free and paid storage space (GB) used in billing cycle.
///
/// - Remark: Generated from `#/components/schemas/combined-billing-usage/estimated_storage_for_month`.
public var estimatedStorageForMonth: Swift.Int
/// Creates a new `CombinedBillingUsage`.
///
/// - Parameters:
/// - daysLeftInBillingCycle: Numbers of days left in billing cycle.
/// - estimatedPaidStorageForMonth: Estimated storage space (GB) used in billing cycle.
/// - estimatedStorageForMonth: Estimated sum of free and paid storage space (GB) used in billing cycle.
public init(
daysLeftInBillingCycle: Swift.Int,
estimatedPaidStorageForMonth: Swift.Int,
estimatedStorageForMonth: Swift.Int
) {
self.daysLeftInBillingCycle = daysLeftInBillingCycle
self.estimatedPaidStorageForMonth = estimatedPaidStorageForMonth
self.estimatedStorageForMonth = estimatedStorageForMonth
}
public enum CodingKeys: String, CodingKey {
case daysLeftInBillingCycle = "days_left_in_billing_cycle"
case estimatedPaidStorageForMonth = "estimated_paid_storage_for_month"
case estimatedStorageForMonth = "estimated_storage_for_month"
}
}
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user`.
public struct BillingUsageReportUser: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload`.
public struct UsageItemsPayloadPayload: Codable, Hashable, Sendable {
/// Date of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/date`.
public var date: Swift.String
/// Product name.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/product`.
public var product: Swift.String
/// SKU name.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/sku`.
public var sku: Swift.String
/// Quantity of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/quantity`.
public var quantity: Swift.Int
/// Unit type of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/unitType`.
public var unitType: Swift.String
/// Price per unit of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/pricePerUnit`.
public var pricePerUnit: Swift.Double
/// Gross amount of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/grossAmount`.
public var grossAmount: Swift.Double
/// Discount amount of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/discountAmount`.
public var discountAmount: Swift.Double
/// Net amount of the usage line item.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/netAmount`.
public var netAmount: Swift.Double
/// Name of the repository.
///
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/UsageItemsPayload/repositoryName`.
public var repositoryName: Swift.String?
/// Creates a new `UsageItemsPayloadPayload`.
///
/// - Parameters:
/// - date: Date of the usage line item.
/// - product: Product name.
/// - sku: SKU name.
/// - quantity: Quantity of the usage line item.
/// - unitType: Unit type of the usage line item.
/// - pricePerUnit: Price per unit of the usage line item.
/// - grossAmount: Gross amount of the usage line item.
/// - discountAmount: Discount amount of the usage line item.
/// - netAmount: Net amount of the usage line item.
/// - repositoryName: Name of the repository.
public init(
date: Swift.String,
product: Swift.String,
sku: Swift.String,
quantity: Swift.Int,
unitType: Swift.String,
pricePerUnit: Swift.Double,
grossAmount: Swift.Double,
discountAmount: Swift.Double,
netAmount: Swift.Double,
repositoryName: Swift.String? = nil
) {
self.date = date
self.product = product
self.sku = sku
self.quantity = quantity
self.unitType = unitType
self.pricePerUnit = pricePerUnit
self.grossAmount = grossAmount
self.discountAmount = discountAmount
self.netAmount = netAmount
self.repositoryName = repositoryName
}
public enum CodingKeys: String, CodingKey {
case date
case product
case sku
case quantity
case unitType
case pricePerUnit
case grossAmount
case discountAmount
case netAmount
case repositoryName
}
}
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItems`.
public typealias UsageItemsPayload = [Components.Schemas.BillingUsageReportUser.UsageItemsPayloadPayload]
/// - Remark: Generated from `#/components/schemas/billing-usage-report-user/usageItems`.
public var usageItems: Components.Schemas.BillingUsageReportUser.UsageItemsPayload?
/// Creates a new `BillingUsageReportUser`.
///
/// - Parameters:
/// - usageItems:
public init(usageItems: Components.Schemas.BillingUsageReportUser.UsageItemsPayload? = nil) {
self.usageItems = usageItems
}
public enum CodingKeys: String, CodingKey {
case usageItems
}
}
}
/// Types generated from the `#/components/parameters` section of the OpenAPI document.
public enum Parameters {
/// The handle for the GitHub user account.
///
/// - Remark: Generated from `#/components/parameters/username`.
public typealias Username = Swift.String
/// The organization name. The name is not case sensitive.
///
/// - Remark: Generated from `#/components/parameters/org`.
public typealias Org = Swift.String
/// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year.
///
/// - Remark: Generated from `#/components/parameters/billing-usage-report-year`.
public typealias BillingUsageReportYear = Swift.Int
/// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. If no year is specified the default `year` is used.
///
/// - Remark: Generated from `#/components/parameters/billing-usage-report-month`.
public typealias BillingUsageReportMonth = Swift.Int
/// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used.
///
/// - Remark: Generated from `#/components/parameters/billing-usage-report-day`.
public typealias BillingUsageReportDay = Swift.Int
/// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. If no `year`, `month`, or `day` is specified, the default `year`, `month`, and `day` are used.
///
/// - Remark: Generated from `#/components/parameters/billing-usage-report-hour`.
public typealias BillingUsageReportHour = Swift.Int
}
/// 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 {
public struct BadRequest: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/bad_request/content`.
@frozen public enum Body: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/bad_request/content/application\/json`.
case json(Components.Schemas.BasicError)
/// The associated value of the enum case if `self` is `.json`.
///
/// - Throws: An error if `self` is not `.json`.
/// - SeeAlso: `.json`.
public var json: Components.Schemas.BasicError {
get throws {
switch self {
case let .json(body):
return body
default:
try throwUnexpectedResponseBody(
expectedContent: "application/json",
body: self
)
}
}
}
/// - Remark: Generated from `#/components/responses/bad_request/content/application\/scim+json`.
case applicationScimJson(Components.Schemas.ScimError)
/// The associated value of the enum case if `self` is `.applicationScimJson`.
///
/// - Throws: An error if `self` is not `.applicationScimJson`.
/// - SeeAlso: `.applicationScimJson`.
public var applicationScimJson: Components.Schemas.ScimError {
get throws {
switch self {
case let .applicationScimJson(body):
return body
default:
try throwUnexpectedResponseBody(
expectedContent: "application/scim+json",
body: self
)
}
}
}
}
/// Received HTTP response body
public var body: Components.Responses.BadRequest.Body
/// Creates a new `BadRequest`.
///
/// - Parameters:
/// - body: Received HTTP response body
public init(body: Components.Responses.BadRequest.Body) {
self.body = body
}
}
public struct Forbidden: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/forbidden/content`.
@frozen public enum Body: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`.
case json(Components.Schemas.BasicError)
/// The associated value of the enum case if `self` is `.json`.
///
/// - Throws: An error if `self` is not `.json`.
/// - SeeAlso: `.json`.
public var json: Components.Schemas.BasicError {
get throws {
switch self {
case let .json(body):
return body
}
}
}
}
/// Received HTTP response body
public var body: Components.Responses.Forbidden.Body
/// Creates a new `Forbidden`.
///
/// - Parameters:
/// - body: Received HTTP response body
public init(body: Components.Responses.Forbidden.Body) {
self.body = body
}
}
public struct InternalError: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/internal_error/content`.
@frozen public enum Body: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`.
case json(Components.Schemas.BasicError)
/// The associated value of the enum case if `self` is `.json`.
///
/// - Throws: An error if `self` is not `.json`.
/// - SeeAlso: `.json`.
public var json: Components.Schemas.BasicError {
get throws {
switch self {
case let .json(body):
return body
}
}
}
}
/// Received HTTP response body
public var body: Components.Responses.InternalError.Body
/// Creates a new `InternalError`.
///
/// - Parameters:
/// - body: Received HTTP response body
public init(body: Components.Responses.InternalError.Body) {
self.body = body
}
}
public struct ServiceUnavailable: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/service_unavailable/content`.
@frozen public enum Body: Sendable, Hashable {
/// - Remark: Generated from `#/components/responses/service_unavailable/content/json`.
public struct JsonPayload: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/responses/service_unavailable/content/json/code`.
public var code: Swift.String?
/// - Remark: Generated from `#/components/responses/service_unavailable/content/json/message`.
public var message: Swift.String?
/// - Remark: Generated from `#/components/responses/service_unavailable/content/json/documentation_url`.
public var documentationUrl: Swift.String?
/// Creates a new `JsonPayload`.
///
/// - Parameters:
/// - code:
/// - message:
/// - documentationUrl:
public init(
code: Swift.String? = nil,
message: Swift.String? = nil,
documentationUrl: Swift.String? = nil
) {
self.code = code
self.message = message
self.documentationUrl = documentationUrl
}
public enum CodingKeys: String, CodingKey {
case code
case message
case documentationUrl = "documentation_url"