Merge pull request #1694 from entireio/schema-regen · Entire

Home

Log in

Merge pull request #1694 from entireio/schema-regen

e62ebf0→main·

gtrrz-victor·1w ago·18 files·+10,656 added/-555 removed

coreapi: regenerate client against current /repos spec + adapt callers

Changes

18

29 unmodified lines

30
31
32
33
33
34
35
36
44 unmodified lines

81
82
83
84
85
86
84
85
86
87
88
89
3 unmodified lines

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
96
97
98
99
100
101
102
103
104
105
111
106
107
108
109

29 unmodified lines

// not report one (the group then routes by jurisdiction, or home).
    cell string
    // clusterSlug joins the group to the cluster catalog
    // (RepoIndexEntry.ClusterSlug ↔ Cluster.Slug) to resolve baseURL. The
    // (RepoPlacement.ClusterSlug ↔ Cluster.Slug) to resolve baseURL. The
    // catalog does not expose a cell field, so the slug — not the cell name —
    // is the only reliable join key. Several clusters may share a cell; any of
    // them reports the jurisdiction's apiUrl, so the first seen slug serves.
44 unmodified lines

}
            byCell[key] = g
        }
        // Upgrade an empty slug if a later entry provides one (a mirror
        // placement may create the group before the home placement adds the
        // slug).
        // Upgrade an empty slug if a later placement in the same cell provides
        // one, so a slugless placement doesn't pin the group to jurisdiction
        // fallback when a sibling could supply the exact catalog join key.
        if g.clusterSlug == "" && clusterSlug != "" {
            g.clusterSlug = clusterSlug
        }
3 unmodified lines

for _, r := range repos {
        if len(r.Placements) > 0 {
            for _, p := range r.Placements {
                // Placements don't carry a cluster slug; the top-level slug
                // applies only to the home placement. RepoPlacement.Mirror is
                // the contract-guaranteed home(false)/mirror(true) marker, so
                // assign the slug to the home placement and leave mirrors
                // slugless — resolveCellBaseURLs falls back to cell/jurisdiction
                // matching for groups without a slug. (Keying off Mirror rather
                // than p.Cell == r.Cell means the join still works if the index
                // omits the top-level Cell alongside the placement array.)
                slug := ""
                if !p.Mirror {
                    slug = r.ClusterSlug
                }
                addToGroup(p.ID, p.Cell, p.Jurisdiction, slug)
                // Each placement carries its own cluster slug, cell, and
                // jurisdiction (the /repos spec bump; the top-level RepoIndexEntry
                // fields are deprecated). Route every placement — home and mirror
                // alike — by its OWN slug so resolveCellBaseURLs can do the exact
                // catalog join (bySlug), instead of leaving mirrors slugless and
                // falling back to jurisdiction-default routing, which can query
                // the wrong cell within a jurisdiction and silently miss a mirror.
                addToGroup(p.ID, p.Cell, p.Jurisdiction, p.ClusterSlug)
            }
        } else {
            addToGroup(r.ID, r.Cell, r.Jurisdiction, r.ClusterSlug)
            addToGroup(r.ID, r.Cell, r.Jurisdiction, r.ClusterSlug) //nolint:staticcheck // top-level Cell/ClusterSlug deprecated by /repos spec bump; migrate to per-placement fields separately
        }
    }

Mcmd/entire/cli/cell_fanout.go+13/-18

59 unmodified lines

60
61
62
63
63
64
65
66
66
67
67
68
69
70
71
14 unmodified lines

86
87
88
88
89
90
89
90
91
92
93
94
95
2 unmodified lines

98
99
100
99
101
102
103
104
17 unmodified lines

122
123
124
123
124
125
126
127
128
129
125
126
127
128
129
130
131
132
133
134
133
134
135
135
136
137
138
137
138
139
140
141
142
143
144
145
143
144
146
147
148
146
147
148
149
150
151
152
153
152
153
154
155
156
157
158
159
160
161

59 unmodified lines

t.Parallel()
    repos := []coreapi.RepoIndexEntry{
        {
            // US-homed repo with an EU mirror — the real-world scenario.
            // US-homed repo with an EU mirror — the real-world scenario. Each
            // placement carries its OWN cluster slug (the /repos spec bump).
            ID: "01US", Cell: "aws-us-east-2", ClusterSlug: "us-prod", Jurisdiction: "us",
            Placements: []coreapi.RepoPlacement{
                {ID: "01US", Cell: "aws-us-east-2", Jurisdiction: "us"},
                {ID: "01EU", Cell: "aws-eu-central-1", Jurisdiction: "eu", Mirror: true},
                {ID: "01US", Cell: "aws-us-east-2", ClusterSlug: "us-prod", Jurisdiction: "us"},
                {ID: "01EU", Cell: "aws-eu-central-1", ClusterSlug: "eu-prod", Jurisdiction: "eu", Mirror: true},
            },
        },
        {
14 unmodified lines

if got := strings.Join(eu.repoIDs, ","); got != "01EU" {
        t.Fatalf("eu repoIDs = %q, want 01EU", got)
    }
    // EU placement has no cluster slug (cell differs from top-level).
    if eu.clusterSlug != "" {
        t.Fatalf("eu clusterSlug = %q, want empty", eu.clusterSlug)
    // The EU mirror carries its own slug, so the group can do the exact
    // catalog join instead of falling back to jurisdiction-default routing.
    if eu.clusterSlug != "eu-prod" {
        t.Fatalf("eu clusterSlug = %q, want eu-prod", eu.clusterSlug)
    }
    if us.cell != "aws-us-east-2" || us.jurisdiction != "us" {
        t.Fatalf("us group = %+v", us)
2 unmodified lines

if got := strings.Join(us.repoIDs, ","); got != "01US,01LEGACY" {
        t.Fatalf("us repoIDs = %q, want 01US,01LEGACY", got)
    }
    // Home placement inherits the top-level cluster slug.
    // US group gets its slug from the placement (and the legacy entry agrees).
    if us.clusterSlug != testClusterSlugUS {
        t.Fatalf("us clusterSlug = %q, want us-prod", us.clusterSlug)
    }
17 unmodified lines

}
}

// TestGroupReposByCell_PlacementSlugFromMirrorFlag verifies the home
// placement's cluster slug is assigned via RepoPlacement.Mirror rather than by
// string-matching the top-level Cell. When the index omits the top-level Cell
// alongside the placement array, the string-match would find no home and drop
// every group to the fuzzier fallback; keying off Mirror keeps the precise
// slug->catalog join.
func TestGroupReposByCell_PlacementSlugFromMirrorFlag(t *testing.T) {
// TestGroupReposByCell_PlacementUsesOwnSlug verifies each placement routes by
// its OWN cluster slug (home and mirror alike), independent of the Mirror flag
// and of the deprecated top-level Cell/ClusterSlug. This is the fix for the
// mirror-miss: a mirror placement that carries its slug gets the exact catalog
// join instead of the jurisdiction-default fallback. A placement that genuinely
// omits its slug still falls back (empty slug on its group).
func TestGroupReposByCell_PlacementUsesOwnSlug(t *testing.T) {
    t.Parallel()
    repos := []coreapi.RepoIndexEntry{
        {
            // Top-level Cell intentionally empty; the home placement is
            // identified by Mirror=false, not by matching the top-level Cell.
            ID: "01US", ClusterSlug: "us-prod", Jurisdiction: "us",
            // Top-level Cell/ClusterSlug intentionally empty; routing must come
            // entirely from the per-placement fields.
            ID: "01US", Jurisdiction: "us",
            Placements: []coreapi.RepoPlacement{
                {ID: "01US", Cell: "aws-us-east-2", Jurisdiction: "us", Mirror: false},
                {ID: "01EU", Cell: "aws-eu-central-1", Jurisdiction: "eu", Mirror: true},
                {ID: "01US", Cell: "aws-us-east-2", ClusterSlug: "us-prod", Jurisdiction: "us", Mirror: false},
                {ID: "01EU", Cell: "aws-eu-central-1", ClusterSlug: "eu-prod", Jurisdiction: "eu", Mirror: true},
                {ID: "01AP", Cell: "aws-ap-south-1", Jurisdiction: "ap", Mirror: true}, // no slug → fallback
            },
        },
    }
    cells := groupReposByCell(repos)
    if len(cells) != 2 {
        t.Fatalf("groups = %d, want 2: %+v", len(cells), cells)
    if len(cells) != 3 {
        t.Fatalf("groups = %d, want 3: %+v", len(cells), cells)
    }
    // Sorted: aws-eu-central-1 < aws-us-east-2.
    eu := cells[0]
    us := cells[1]
    // Sorted by cell: aws-ap-south-1 < aws-eu-central-1 < aws-us-east-2.
    ap, eu, us := cells[0], cells[1], cells[2]
    if us.cell != "aws-us-east-2" || us.clusterSlug != testClusterSlugUS {
        t.Fatalf("home group = %+v, want cell aws-us-east-2 with slug us-prod", us)
    }
    if eu.cell != "aws-eu-central-1" || eu.clusterSlug != "" {
        t.Fatalf("mirror group = %+v, want cell aws-eu-central-1 with empty slug", eu)
    if eu.cell != "aws-eu-central-1" || eu.clusterSlug != "eu-prod" {
        t.Fatalf("mirror group = %+v, want cell aws-eu-central-1 with slug eu-prod", eu)
    }
    if ap.cell != "aws-ap-south-1" || ap.clusterSlug != "" {
        t.Fatalf("slugless mirror group = %+v, want cell aws-ap-south-1 with empty slug", ap)
    }
}

Mcmd/entire/cli/cell_fanout_test.go+31/-26

72 unmodified lines

73
74
75
76
76
77
78
79

72 unmodified lines

if err != nil {
                        return nil, "", err
                    }
                    return out.Orgs, out.NextPageToken.Or(""), nil
                    return out.Response.Orgs, out.Response.NextPageToken.Or(""), nil
                })
            })
        },

Mcmd/entire/cli/org.go+1/-1

357 unmodified lines

358
359
360
361
361
362
363
364
58 unmodified lines

423
424
425
426
426
427
428
429
45 unmodified lines

475
476
477
478
478
479
480
481

357 unmodified lines

// Only start a Cloning spinner when there's a clone to await —
                        // not for an empty upstream, and not for an admin-suspended
                        // placement (which never becomes ready).
                        if !noWait && !created.Empty && !created.Suspended {
                        if !noWait && !created.Empty && !created.Suspended { //nolint:staticcheck // CreatedMirror.Empty deprecated by /repos spec bump; create-flow cleanup tracked separately
                            cloning = startSpinner(errW, fmt.Sprintf("Cloning %s/%s into %s", owner, repo, clusterHost))
                        }
                    }, nil)
58 unmodified lines

// so return no error.
        return outcome, nil
    }
    if created.Empty {
    if created.Empty { //nolint:staticcheck // CreatedMirror.Empty deprecated by /repos spec bump; create-flow cleanup tracked separately
        // An empty upstream has nothing to clone, so don't poll for "ready" — it
        // never would. But an *existing* placement can be suspended even when
        // empty, and one status read surfaces that (a fresh create can't be
45 unmodified lines

}

if !outcome.polled {
        if created.Empty {
        if created.Empty { //nolint:staticcheck // CreatedMirror.Empty deprecated by /repos spec bump; create-flow cleanup tracked separately
            fmt.Fprintln(out, "Upstream has no commits yet — nothing to clone. The mirror will pick up refs once the upstream is pushed to.")
        } else {
            fmt.Fprintf(out, "Initial clone may still be in progress; `git clone %s` will work once it completes.\n", created.MirrorUrl)

Mcmd/entire/cli/repo_mirror.go+3/-3

603 unmodified lines

604
605
606
607
607
608
609
610

603 unmodified lines

}

if !outcome.polled {
        if outcome.created.Empty {
        if outcome.created.Empty { //nolint:staticcheck // CreatedMirror.Empty deprecated by /repos spec bump; create-flow cleanup tracked separately
            res.status = mirrorStatusEmpty
        } else {
            res.status = mirrorStatusRegistered

Mcmd/entire/cli/repo_mirror_create_wizard.go+1/-1

69 unmodified lines

70
71
72
73
73
74
75
76

69 unmodified lines

}
        return "", err
    }
    org, ok := out.Org.Get()
    org, ok := out.Response.Org.Get()
    if !ok {
        return "", noOrgNamedErr(ref)
    }

Mcmd/entire/cli/resolveref.go+1/-1

514 unmodified lines

515
516
517
518
518
519
520
521

514 unmodified lines

reposCtx, reposCancel := context.WithTimeout(ctx, 10*time.Second)
    defer reposCancel()

repoIndex, err := coreClient.ListRepos(reposCtx)
    repoIndex, err := coreClient.ListRepos(reposCtx, coreapi.ListReposParams{})
    if err != nil {
        return nil, fmt.Errorf("listing repos for cell discovery: %w", err)
    }

Mcmd/entire/cli/search_cmd.go+1/-1

32 unmodified lines

33
34
35
36
37
38
39
40
41
42
43
44
24 unmodified lines

69
70
71
72
73
74
75
76
77
78
79
80
8 unmodified lines

89
90
91
80
92
93
94
95
21 unmodified lines

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
6 unmodified lines

147
148
149
150
151
152
153
154
155
156
157
158
30 unmodified lines

189
190
191
192
193
194
195
196
197
198
199
200
77 unmodified lines

278
279
280
245
281
282
283
284
12 unmodified lines

297
298
299
300
301
302
303
304
305
306
307
308
5 unmodified lines

314
315
316
275
317
318
319
320
18 unmodified lines

339
340
341
342
343
344
345
346
347
348
349
350
42 unmodified lines

393
394
395
348
349
350
351
352
353
396
397
398
226 unmodified lines

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
438 unmodified lines

1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
200 unmodified lines

1461
1462
1463
1236
1464
1465
1466
1467
1 unmodified line

1469
1470
1471
1244
1472
1473
1474
1475
506 unmodified lines

1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
94 unmodified lines

2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
176 unmodified lines

2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
634 unmodified lines

3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
1512 unmodified lines

4807
4808
4809
4197
4810
4811
4812
4813
4814
4202
4815
4816
4817
4818
59 unmodified lines

4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
483 unmodified lines

5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
137 unmodified lines

5627
5628
5629
4900
4901
5630
5631
5632
5633
5634
4905
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
538 unmodified lines

6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
1044 unmodified lines

7375
7376
7377
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590

32 unmodified lines

//
    // POST /lookup
    BatchLookup(ctx context.Context, request *BatchLookupInputBody) (*BatchLookupOutputBody, error)
    // CancelDeletion invokes cancelDeletion operation.
    //
    // Cancel a pending deletion request for the calling account.
    //
    // POST /me/cancel-deletion
    CancelDeletion(ctx context.Context) error
    // CreateBinding invokes createBinding operation.
    //
    // Create OIDC binding.
24 unmodified lines

//
    // POST /repos
    CreateRepo(ctx context.Context, request *CreateRepoInputBody) (*Repo, error)
    // CreateRepoCIWebhook invokes createRepoCIWebhook operation.
    //
    // Enroll a repo into a CI webhook (Buildkite).
    //
    // POST /repos/{repoId}/ci-webhooks
    CreateRepoCIWebhook(ctx context.Context, request *CreateRepoCIWebhookInputBody, params CreateRepoCIWebhookParams) (*CIWebhookView, error)
    // CreateServiceAccount invokes createServiceAccount operation.
    //
    // Create service account.
8 unmodified lines

DeleteBinding(ctx context.Context, params DeleteBindingParams) error
    // DeleteMe invokes deleteMe operation.
    //
    // Request deletion of the calling account (7-day cooldown; login cancels).
    // Request deletion of the calling account (7-day cooldown; cancel via POST /me/cancel-deletion).
    //
    // DELETE /me
    DeleteMe(ctx context.Context) error
21 unmodified lines

//
    // DELETE /repos/{repoId}
    DeleteRepo(ctx context.Context, params DeleteRepoParams) error
    // DeleteRepoCIWebhook invokes deleteRepoCIWebhook operation.
    //
    // Delete a repo's CI webhook.
    //
    // DELETE /repos/{repoId}/ci-webhooks/{id}
    DeleteRepoCIWebhook(ctx context.Context, params DeleteRepoCIWebhookParams) error
    // DeleteServiceAccount invokes deleteServiceAccount operation.
    //
    // Delete service account.
    //
    // DELETE /service-accounts/{accountId}
    DeleteServiceAccount(ctx context.Context, params DeleteServiceAccountParams) error
    // GetDeletionPreview invokes getDeletionPreview operation.
    //
    // Preview what deleting the calling account will erase, unlink, and block on.
    //
    // GET /me/deletion-preview
    GetDeletionPreview(ctx context.Context) (*GetDeletionPreviewOutputBody, error)
    // GetMe invokes getMe operation.
    //
    // Get the calling account's identity and profile.
6 unmodified lines

//
    // GET /mirrors/{mirrorId}
    GetMirror(ctx context.Context, params GetMirrorParams) (*Mirror, error)
    // GetOnboardingStatus invokes getOnboardingStatus operation.
    //
    // Report whether the calling account still needs to onboard (has no mirror yet).
    //
    // GET /me/onboarding
    GetOnboardingStatus(ctx context.Context) (*GetOnboardingStatusOutputBody, error)
    // GetOrg invokes getOrg operation.
    //
    // Get an organization.
30 unmodified lines

//
    // GET /service-accounts/{accountId}
    GetServiceAccount(ctx context.Context, params GetServiceAccountParams) (*ServiceAccount, error)
    // GetTopology invokes getTopology operation.
    //
    // Get the cluster topology as a jurisdiction → region → cluster tree.
    //
    // GET /topology
    GetTopology(ctx context.Context) (*GetTopologyOutputBody, error)
    // GetVersion invokes getVersion operation.
    //
    // Get the server version and mode.
77 unmodified lines

// List organizations the caller can see (or one by name).
    //
    // GET /orgs
    ListOrgs(ctx context.Context, params ListOrgsParams) (*ListOrgsOutputBody, error)
    ListOrgs(ctx context.Context, params ListOrgsParams) (*ListOrgsOutputBodyHeaders, error)
    // ListProjectMembers invokes listProjectMembers operation.
    //
    // List project members and their roles.
12 unmodified lines

//
    // GET /projects
    ListProjects(ctx context.Context, params ListProjectsParams) (*ListProjectsOutputBody, error)
    // ListRepoCIWebhooks invokes listRepoCIWebhooks operation.
    //
    // List a repo's CI webhooks.
    //
    // GET /repos/{repoId}/ci-webhooks
    ListRepoCIWebhooks(ctx context.Context, params ListRepoCIWebhooksParams) (*ListRepoCIWebhooksOutputBody, error)
    // ListRepoGrants invokes listRepoGrants operation.
    //
    // List repo grants.
5 unmodified lines

// List the caller's readable repositories (placement index).
    //
    // GET /repos
    ListRepos(ctx context.Context) (*ListReposOutputBody, error)
    ListRepos(ctx context.Context, params ListReposParams) (*ListReposOutputBody, error)
    // ListServiceAccountGrants invokes listServiceAccountGrants operation.
    //
    // List service account grants.
18 unmodified lines

//
    // GET /access/{resourceType}
    LookupResources(ctx context.Context, params LookupResourcesParams) (*LookupResourcesOutputBody, error)
    // PatchRepoCIWebhook invokes patchRepoCIWebhook operation.
    //
    // Update a repo's CI webhook.
    //
    // PATCH /repos/{repoId}/ci-webhooks/{id}
    PatchRepoCIWebhook(ctx context.Context, request *PatchRepoCIWebhookInputBody, params PatchRepoCIWebhookParams) (*CIWebhookView, error)
    // RemoveOrgMember invokes removeOrgMember operation.
    //
    // Remove a member from an organization.
42 unmodified lines

//
    // PUT /repos/{repoId}/visibility
    SetRepoVisibility(ctx context.Context, request *SetRepoVisibilityInputBody, params SetRepoVisibilityParams) (*SetRepoVisibilityOutputBody, error)
    // UpdateMe invokes updateMe operation.
    //
    // Update the calling account's contact email.
    //
    // PATCH /me
    UpdateMe(ctx context.Context, request *UpdateMeInputBody) (*UpdateMeOutputBody, error)
}

// Client implements OAS client.
226 unmodified lines

return result, nil
}

// CancelDeletion invokes cancelDeletion operation.
//
// Cancel a pending deletion request for the calling account.
//
// POST /me/cancel-deletion
func (c *Client) CancelDeletion(ctx context.Context) error {
    _, err := c.sendCancelDeletion(ctx)
    return err
}

func (c *Client) sendCancelDeletion(ctx context.Context) (res *CancelDeletionOK, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
    pathParts[0] = "/me/cancel-deletion"
    uri.AddPathParts(u, pathParts[:]...)

r, err := ht.NewRequest(ctx, "POST", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, CancelDeletionOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, CancelDeletionOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

if ok := func() bool {
        nextRequirement:
            for _, requirement := range []bitset{
                {0b00000001},
                {0b00000010},
            } {
                for i, mask := range requirement {
                    if satisfied[i]&mask != mask {
                        continue nextRequirement
                    }
                }
                return true
            }
            return false
        }(); !ok {
            return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied
        }
    }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeCancelDeletionResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// CreateBinding invokes createBinding operation.
//
// Create OIDC binding.
438 unmodified lines

return result, nil
}

// CreateRepoCIWebhook invokes createRepoCIWebhook operation.
//
// Enroll a repo into a CI webhook (Buildkite).
//
// POST /repos/{repoId}/ci-webhooks
func (c *Client) CreateRepoCIWebhook(ctx context.Context, request *CreateRepoCIWebhookInputBody, params CreateRepoCIWebhookParams) (*CIWebhookView, error) {
    res, err := c.sendCreateRepoCIWebhook(ctx, request, params)
    return res, err
}

func (c *Client) sendCreateRepoCIWebhook(ctx context.Context, request *CreateRepoCIWebhookInputBody, params CreateRepoCIWebhookParams) (res *CIWebhookView, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [3]string
    pathParts[0] = "/repos/"
    {
        // Encode "repoId" parameter.
        e := uri.NewPathEncoder(uri.PathEncoderConfig{
            Param:   "repoId",
            Style:   uri.PathStyleSimple,
            Explode: false,
        })
        if err := func() error {
            return e.EncodeValue(conv.StringToString(params.RepoId))
        }(); err != nil {
            return res, errors.Wrap(err, "encode path")
        }
        encoded, err := e.Result()
        if err != nil {
            return res, errors.Wrap(err, "encode path")
        }
        pathParts[1] = encoded
    }
    pathParts[2] = "/ci-webhooks"
    uri.AddPathParts(u, pathParts[:]...)

r, err := ht.NewRequest(ctx, "POST", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }
    if err := encodeCreateRepoCIWebhookRequest(request, r); err != nil {
        return res, errors.Wrap(err, "encode request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, CreateRepoCIWebhookOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, CreateRepoCIWebhookOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeCreateRepoCIWebhookResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// CreateServiceAccount invokes createServiceAccount operation.
//
// Create service account.
200 unmodified lines

// DeleteMe invokes deleteMe operation.
//
// Request deletion of the calling account (7-day cooldown; login cancels).
// Request deletion of the calling account (7-day cooldown; cancel via POST /me/cancel-deletion).
//
// DELETE /me
func (c *Client) DeleteMe(ctx context.Context) error {
1 unmodified line

return err
}

func (c *Client) sendDeleteMe(ctx context.Context) (res *DeleteMeNoContent, err error) {
func (c *Client) sendDeleteMe(ctx context.Context) (res *DeleteMeAccepted, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
506 unmodified lines

return result, nil
}

// DeleteRepoCIWebhook invokes deleteRepoCIWebhook operation.
//
// Delete a repo's CI webhook.
//
// DELETE /repos/{repoId}/ci-webhooks/{id}
func (c *Client) DeleteRepoCIWebhook(ctx context.Context, params DeleteRepoCIWebhookParams) error {
    _, err := c.sendDeleteRepoCIWebhook(ctx, params)
    return err
}

func (c *Client) sendDeleteRepoCIWebhook(ctx context.Context, params DeleteRepoCIWebhookParams) (res *DeleteRepoCIWebhookNoContent, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [4]string
    pathParts[0] = "/repos/"
    {
        // Encode "repoId" parameter.
        e := uri.NewPathEncoder(uri.PathEncoderConfig{
            Param:   "repoId",
            Style:   uri.PathStyleSimple,
            Explode: false,
        })
        if err := func() error {
            return e.EncodeValue(conv.StringToString(params.RepoId))
        }(); err != nil {
            return res, errors.Wrap(err, "encode path")
        }
        encoded, err := e.Result()
        if err != nil {
            return res, errors.Wrap(err, "encode path")
        }
        pathParts[1] = encoded
    }
    pathParts[2] = "/ci-webhooks/"
    {
        // Encode "id" parameter.
        e := uri.NewPathEncoder(uri.PathEncoderConfig{
            Param:   "id",
            Style:   uri.PathStyleSimple,
            Explode: false,
        })
        if err := func() error {
            return e.EncodeValue(conv.StringToString(params.ID))
        }(); err != nil {
            return res, errors.Wrap(err, "encode path")
        }
        encoded, err := e.Result()
        if err != nil {
            return res, errors.Wrap(err, "encode path")
        }
        pathParts[3] = encoded
    }
    uri.AddPathParts(u, pathParts[:]...)

q := uri.NewQueryEncoder()
    {
        // Encode "teardown" parameter.
        cfg := uri.QueryParameterEncodingConfig{
            Name:    "teardown",
            Style:   uri.QueryStyleForm,
            Explode: false,
        }

if err := q.EncodeParam(cfg, func(e uri.Encoder) error {
            if val, ok := params.Teardown.Get(); ok {
                return e.EncodeValue(conv.BoolToString(val))
            }
            return nil
        }); err != nil {
            return res, errors.Wrap(err, "encode query")
        }
    }
    u.RawQuery = q.Values().Encode()

r, err := ht.NewRequest(ctx, "DELETE", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, DeleteRepoCIWebhookOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, DeleteRepoCIWebhookOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeDeleteRepoCIWebhookResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// DeleteServiceAccount invokes deleteServiceAccount operation.
//
// Delete service account.
94 unmodified lines

return result, nil
}

// GetDeletionPreview invokes getDeletionPreview operation.
//
// Preview what deleting the calling account will erase, unlink, and block on.
//
// GET /me/deletion-preview
func (c *Client) GetDeletionPreview(ctx context.Context) (*GetDeletionPreviewOutputBody, error) {
    res, err := c.sendGetDeletionPreview(ctx)
    return res, err
}

func (c *Client) sendGetDeletionPreview(ctx context.Context) (res *GetDeletionPreviewOutputBody, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
    pathParts[0] = "/me/deletion-preview"
    uri.AddPathParts(u, pathParts[:]...)

r, err := ht.NewRequest(ctx, "GET", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, GetDeletionPreviewOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, GetDeletionPreviewOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeGetDeletionPreviewResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// GetMe invokes getMe operation.
//
// Get the calling account's identity and profile.
176 unmodified lines

return result, nil
}

// GetOnboardingStatus invokes getOnboardingStatus operation.
//
// Report whether the calling account still needs to onboard (has no mirror yet).
//
// GET /me/onboarding
func (c *Client) GetOnboardingStatus(ctx context.Context) (*GetOnboardingStatusOutputBody, error) {
    res, err := c.sendGetOnboardingStatus(ctx)
    return res, err
}

func (c *Client) sendGetOnboardingStatus(ctx context.Context) (res *GetOnboardingStatusOutputBody, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
    pathParts[0] = "/me/onboarding"
    uri.AddPathParts(u, pathParts[:]...)

r, err := ht.NewRequest(ctx, "GET", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, GetOnboardingStatusOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, GetOnboardingStatusOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeGetOnboardingStatusResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// GetOrg invokes getOrg operation.
//
// Get an organization.
634 unmodified lines

return result, nil
}

// GetTopology invokes getTopology operation.
//
// Get the cluster topology as a jurisdiction → region → cluster tree.
//
// GET /topology
func (c *Client) GetTopology(ctx context.Context) (*GetTopologyOutputBody, error) {
    res, err := c.sendGetTopology(ctx)
    return res, err
}

func (c *Client) sendGetTopology(ctx context.Context) (res *GetTopologyOutputBody, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
    pathParts[0] = "/topology"
    uri.AddPathParts(u, pathParts[:]...)

r, err := ht.NewRequest(ctx, "GET", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, GetTopologyOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, GetTopologyOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeGetTopologyResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// GetVersion invokes getVersion operation.
//
// Get the server version and mode.
1512 unmodified lines

// List organizations the caller can see (or one by name).
//
// GET /orgs
func (c *Client) ListOrgs(ctx context.Context, params ListOrgsParams) (*ListOrgsOutputBody, error) {
func (c *Client) ListOrgs(ctx context.Context, params ListOrgsParams) (*ListOrgsOutputBodyHeaders, error) {
    res, err := c.sendListOrgs(ctx, params)
    return res, err
}

func (c *Client) sendListOrgs(ctx context.Context, params ListOrgsParams) (res *ListOrgsOutputBody, err error) {
func (c *Client) sendListOrgs(ctx context.Context, params ListOrgsParams) (res *ListOrgsOutputBodyHeaders, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
59 unmodified lines

return res, errors.Wrap(err, "create request")
    }

h := uri.NewHeaderEncoder(r.Header)
    {
        cfg := uri.HeaderParameterEncodingConfig{
            Name:    "If-None-Match",
            Explode: false,
        }
        if err := h.EncodeParam(cfg, func(e uri.Encoder) error {
            if val, ok := params.IfNoneMatch.Get(); ok {
                return e.EncodeValue(conv.StringToString(val))
            }
            return nil
        }); err != nil {
            return res, errors.Wrap(err, "encode header")
        }
    }

{
        type bitset = [1]uint8
        var satisfied bitset
483 unmodified lines

return result, nil
}

// ListRepoCIWebhooks invokes listRepoCIWebhooks operation.
//
// List a repo's CI webhooks.
//
// GET /repos/{repoId}/ci-webhooks
func (c *Client) ListRepoCIWebhooks(ctx context.Context, params ListRepoCIWebhooksParams) (*ListRepoCIWebhooksOutputBody, error) {
    res, err := c.sendListRepoCIWebhooks(ctx, params)
    return res, err
}

func (c *Client) sendListRepoCIWebhooks(ctx context.Context, params ListRepoCIWebhooksParams) (res *ListRepoCIWebhooksOutputBody, err error) {

r, err := ht.NewRequest(ctx, "GET", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, ListRepoCIWebhooksOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, ListRepoCIWebhooksOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeListRepoCIWebhooksResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// ListRepoGrants invokes listRepoGrants operation.
//
// List repo grants.
137 unmodified lines

// List the caller's readable repositories (placement index).
//
// GET /repos
func (c *Client) ListRepos(ctx context.Context) (*ListReposOutputBody, error) {
    res, err := c.sendListRepos(ctx)
func (c *Client) ListRepos(ctx context.Context, params ListReposParams) (*ListReposOutputBody, error) {
    res, err := c.sendListRepos(ctx, params)
    return res, err
}

func (c *Client) sendListRepos(ctx context.Context) (res *ListReposOutputBody, err error) {
func (c *Client) sendListRepos(ctx context.Context, params ListReposParams) (res *ListReposOutputBody, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
    pathParts[0] = "/repos"
    uri.AddPathParts(u, pathParts[:]...)

q := uri.NewQueryEncoder()
    {
        // Encode "scope" parameter.
        cfg := uri.QueryParameterEncodingConfig{
            Name:    "scope",
            Style:   uri.QueryStyleForm,
            Explode: false,
        }

if err := q.EncodeParam(cfg, func(e uri.Encoder) error {
            if val, ok := params.Scope.Get(); ok {
                return e.EncodeValue(conv.StringToString(string(val)))
            }
            return nil
        }); err != nil {
            return res, errors.Wrap(err, "encode query")
        }
    }
    u.RawQuery = q.Values().Encode()

r, err := ht.NewRequest(ctx, "GET", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
538 unmodified lines

return result, nil
}

// PatchRepoCIWebhook invokes patchRepoCIWebhook operation.
//
// Update a repo's CI webhook.
//
// PATCH /repos/{repoId}/ci-webhooks/{id}
func (c *Client) PatchRepoCIWebhook(ctx context.Context, request *PatchRepoCIWebhookInputBody, params PatchRepoCIWebhookParams) (*CIWebhookView, error) {
    res, err := c.sendPatchRepoCIWebhook(ctx, request, params)
    return res, err
}

func (c *Client) sendPatchRepoCIWebhook(ctx context.Context, request *PatchRepoCIWebhookInputBody, params PatchRepoCIWebhookParams) (res *CIWebhookView, err error) {

r, err := ht.NewRequest(ctx, "PATCH", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }
    if err := encodePatchRepoCIWebhookRequest(request, r); err != nil {
        return res, errors.Wrap(err, "encode request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, PatchRepoCIWebhookOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, PatchRepoCIWebhookOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodePatchRepoCIWebhookResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

// RemoveOrgMember invokes removeOrgMember operation.
//
// Remove a member from an organization.
1044 unmodified lines

return result, nil
}

// UpdateMe invokes updateMe operation.
//
// Update the calling account's contact email.
//
// PATCH /me
func (c *Client) UpdateMe(ctx context.Context, request *UpdateMeInputBody) (*UpdateMeOutputBody, error) {
    res, err := c.sendUpdateMe(ctx, request)
    return res, err
}

func (c *Client) sendUpdateMe(ctx context.Context, request *UpdateMeInputBody) (res *UpdateMeOutputBody, err error) {

u := uri.Clone(c.requestURL(ctx))
    var pathParts [1]string
    pathParts[0] = "/me"
    uri.AddPathParts(u, pathParts[:]...)

r, err := ht.NewRequest(ctx, "PATCH", u)
    if err != nil {
        return res, errors.Wrap(err, "create request")
    }
    if err := encodeUpdateMeRequest(request, r); err != nil {
        return res, errors.Wrap(err, "encode request")
    }

{
        type bitset = [1]uint8
        var satisfied bitset
        {

switch err := c.securityBearerAuth(ctx, UpdateMeOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 0
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"BearerAuth\"")
            }
        }
        {

switch err := c.securitySessionAuth(ctx, UpdateMeOperation, r); {
            case err == nil: // if NO error
                satisfied[0] |= 1 << 1
            case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
                // Skip this security.
            default:
                return res, errors.Wrap(err, "security \"SessionAuth\"")
            }
        }

resp, err := c.cfg.Client.Do(r)
    if err != nil {
        return res, errors.Wrap(err, "do request")
    }
    body := resp.Body
    defer body.Close()

result, err := decodeUpdateMeResponse(resp)
    if err != nil {
        return res, errors.Wrap(err, "decode response")
    }

return result, nil
}

Minternal/coreapi/oas_client_gen.go+888/-101

1593 unmodified lines

1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1206 unmodified lines

3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
757 unmodified lines

4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
423 unmodified lines

5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
13 unmodified lines

5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
31 unmodified lines

5974
5975
5976
4057
5977
5978
5979
4060
4061
4062
4063
4064
5980
5981
5982
5983
5984
5985
5986
5987
5988
26 unmodified lines

6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
4098
6029
6030
6031
6032
63 unmodified lines

6096
6097
6098
4168
6099
6100
6101
6102
139 unmodified lines

6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
534 unmodified lines

6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
1053 unmodified lines

8231
8232
8233
8234
8235
8236
8237
8238
3406 unmodified lines

11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
2097 unmodified lines

13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
13 unmodified lines

14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
23 unmodified lines

14190
14191
14192
11476
14193
14194
14195
11479
11480
11481
14196
14197
14198
14199
14200
14201
14202
28 unmodified lines

14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
5 unmodified lines

14254
14255
14256
11527
14257
14258
14259
14260
41 unmodified lines

14302
14303
14304
11575
14305
14306
14307
14308
2355 unmodified lines

16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
192 unmodified lines

16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
322 unmodified lines

17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
575 unmodified lines

18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
42 unmodified lines

18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
15 unmodified lines

18139
18140
18141
15113
18142
18143
18144
18145
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
36 unmodified lines

18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
15171
18212
18213
18214
18215
25 unmodified lines

18241
18242
18243
15203
18244
18245
18246
18247
15 unmodified lines

18263
18264
18265
15225
18266
18267
18268
18269
34 unmodified lines

18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
35 unmodified lines

18355
18356
18357
15307
15308
18358
18359
18360
18361
18362
97 unmodified lines

18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
244 unmodified lines

18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
39 unmodified lines

18991
18992
18993
15707
15708
15709
15710
15711
15712
15713
15714
15715
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
1 unmodified line

19008
19009
19010
15723
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
15729
19027
19028
19029
19030
5 unmodified lines

19036
19037
19038
15741
19039
19040
19041
19042
5 unmodified lines

19048
19049
19050
15753
19051
19052
19053
19054
5 unmodified lines

19060
19061
19062
15765
19063
19064
19065
19066
5 unmodified lines

19072
19073
19074
15777
19075
19076
19077
19078
5 unmodified lines

19084
19085
19086
15789
19087
19088
19089
19090
5 unmodified lines

19096
19097
19098
15801
19099
19100
19101
19102
11 unmodified lines

19114
19115
19116
15819
19117
19118
19119
19120
24 unmodified lines

19145
19146
19147
15850
15851
19148
19149
19150
19151
19152
19153
110 unmodified lines

19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
6 unmodified lines

19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
3 unmodified lines

19293
19294
19295
15989
19296
19297
15991
15992
15993
19298
19299
19300
19301
19302
19303
19304
19305
18 unmodified lines

19324
19325
19326
16018
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
5 unmodified lines

19349
19350
19351
16031
19352
19353
19354
19355
5 unmodified lines

19361
19362
19363
16043
19364
19365
19366
19367
4 unmodified lines

19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
15 unmodified lines

19403
19404
19405
16075
19406
19407
19408
19409
97 unmodified lines

19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
1680 unmodified lines

21237
21238
21239
17865
21240
21241
21242
21243
21244
21245
21246
17872
21247
21248
17874
17875
17876
17877
21249
21250
21251
21252
17880
17881
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
3 unmodified lines

21274
21275
21276
17892
17893
17894
21277
21278
21279
21280
21281
21282
21283
21284
17897
17898
21285
21286
21287
17900
21288
21289
21290
21291
21292
21293
21294
17907
21295
21296
21297
17909
17910
21298
21299
21300
21301
21302
21303
21304
17915
21305
21306
17917
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
17921
21323
21324
21325
21326
21327
21328
17927
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
10 unmodified lines

21368
21369
21370
17945
21371
21372
21373
21374
21375
17950
21376
21377
21378
21379
5 unmodified lines

21385
21386
21387
17962
17963
21388
21389
21390
21391
21392
14 unmodified lines

21407
21408
21409
17984
21410
21411
21412
21413
21414
21415
21416
17991
21417
21418
21419
21420
21421
21422
17997
21423
21424
21425
21426
21427
21428
21429
18004
21430
21431
21432
21433
3 unmodified lines

21437
21438
21439
18014
18015
21440
21441
21442
18017
21443
21444
21445
21446
11 unmodified lines

21458
21459
21460
18035
21461
21462
21463
21464
21465
21466
21467
18042
21468
21469
21470
21471
21472
21473
21474
18049
21475
21476
21477
21478
21479
21480
18055
21481
21482
21483
21484
21485
21486
21487
18062
21488
21489
18064
18065
18066
18067
21490
21491
21492
21493
18070
18071
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
3 unmodified lines

21511
21512
21513
18082
18083
18084
21514
21515
21516
21517
21518
21519
18087
18088
21520
21521
21522
18090
21523
21524
21525
21526
21527
21528
21529
18097
21530
21531
21532
18099
18100
21533
21534
21535
21536
21537
21538
21539
18105
21540
21541
18107
21542
21543
21544
21545
18111
21546
21547
21548
21549
21550
21551
18117
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
10 unmodified lines

21585
21586
21587
18135
21588
21589
21590
21591
21592
18140
21593
21594
21595
21596
5 unmodified lines

21602
21603
21604
18152
18153
21605
21606
21607
21608
21609
14 unmodified lines

21624
21625
21626
18174
21627
21628
21629
21630
21631
21632
21633
18181
21634
21635
21636
21637
21638
21639
18187
21640
21641
21642
21643
21644
21645
21646
18194
21647
21648
21649
21650
3 unmodified lines

21654
21655
21656
18204
18205
21657
21658
21659
18207
21660
21661
21662
21663
11 unmodified lines

21675
21676
21677
18225
21678
21679
21680
21681
21682
21683
21684
18232
21685
21686
21687
21688
21689
21690
21691
18239
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322

1593 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *CIWebhookView) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *CIWebhookView) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        e.FieldStart("bk_organization")
        e.Str(s.BkOrganization)
    }
    {
        e.FieldStart("bk_pipeline")
        e.Str(s.BkPipeline)
    }
    {
        e.FieldStart("created_at")
        json.EncodeDateTime(e, s.CreatedAt)
    }
    {
        e.FieldStart("display_name")
        e.Str(s.DisplayName)
    }
    {
        e.FieldStart("enabled")
        e.Bool(s.Enabled)
    }
    {
        e.FieldStart("events")
        e.ArrStart()
        for _, elem := range s.Events {
            e.Str(elem)
        }
        e.ArrEnd()
    }
    {
        e.FieldStart("id")
        e.Str(s.ID)
    }
    {
        e.FieldStart("provider")
        e.Str(s.Provider)
    }
    {
        e.FieldStart("ref_filter")
        e.Str(s.RefFilter)
    }
    {
        e.FieldStart("repo_id")
        e.Str(s.RepoID)
    }
    {
        e.FieldStart("updated_at")
        json.EncodeDateTime(e, s.UpdatedAt)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfCIWebhookView = [12]string{
    0:  "$schema",
    1:  "bk_organization",
    2:  "bk_pipeline",
    3:  "created_at",
    4:  "display_name",
    5:  "enabled",
    6:  "events",
    7:  "id",
    8:  "provider",
    9:  "ref_filter",
    10: "repo_id",
    11: "updated_at",
}

// Decode decodes CIWebhookView from json.
func (s *CIWebhookView) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode CIWebhookView to nil")
    }
    var requiredBitSet [2]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "bk_organization":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.BkOrganization = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"bk_organization\"")
            }
        case "bk_pipeline":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.BkPipeline = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"bk_pipeline\"")
            }
        case "created_at":
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                v, err := json.DecodeDateTime(d)
                s.CreatedAt = v
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"created_at\"")
            }
        case "display_name":
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Str()
                s.DisplayName = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"display_name\"")
            }
        case "enabled":
            requiredBitSet[0] |= 1 << 5
            if err := func() error {
                v, err := d.Bool()
                s.Enabled = bool(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"enabled\"")
            }
        case "events":
            requiredBitSet[0] |= 1 << 6
            if err := func() error {
                s.Events = make([]string, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem string
                    v, err := d.Str()
                    elem = string(v)
                    if err != nil {
                        return err
                    }
                    s.Events = append(s.Events, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"events\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 7
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"id\"")
            }
        case "provider":
            requiredBitSet[1] |= 1 << 0
            if err := func() error {
                v, err := d.Str()
                s.Provider = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"provider\"")
            }
        case "ref_filter":
            requiredBitSet[1] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.RefFilter = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"ref_filter\"")
            }
        case "repo_id":
            requiredBitSet[1] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.RepoID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"repo_id\"")
            }
        case "updated_at":
            requiredBitSet[1] |= 1 << 3
            if err := func() error {
                v, err := json.DecodeDateTime(d)
                s.UpdatedAt = v
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"updated_at\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode CIWebhookView")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [2]uint8{
        0b11111110,
        0b00001111,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfCIWebhookView) {
                    name = jsonFieldsNameOfCIWebhookView[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *CIWebhookView) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *CIWebhookView) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s CIWebhookViewAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s CIWebhookViewAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes CIWebhookViewAdditional from json.
func (s *CIWebhookViewAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode CIWebhookViewAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode CIWebhookViewAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s CIWebhookViewAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *CIWebhookViewAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *Cluster) Encode(e *jx.Encoder) {
    e.ObjStart()
1206 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *CreateRepoCIWebhookInputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *CreateRepoCIWebhookInputBody) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        e.FieldStart("bk_cluster_id")
        e.Str(s.BkClusterID)
    }
    {
        e.FieldStart("bk_organization")
        e.Str(s.BkOrganization)
    }
    {
        if s.BkPipeline.Set {
            e.FieldStart("bk_pipeline")
            s.BkPipeline.Encode(e)
        }
    }
    {
        if s.DisplayName.Set {
            e.FieldStart("display_name")
            s.DisplayName.Encode(e)
        }
    }
    {
        if s.Events != nil {
            e.FieldStart("events")
            e.ArrStart()
            for _, elem := range s.Events {
                e.Str(elem)
            }
            e.ArrEnd()
        }
    }
    {
        e.FieldStart("provider")
        s.Provider.Encode(e)
    }
    {
        if s.RefFilter.Set {
            e.FieldStart("ref_filter")
            s.RefFilter.Encode(e)
        }
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfCreateRepoCIWebhookInputBody = [8]string{
    0: "$schema",
    1: "bk_cluster_id",
    2: "bk_organization",
    3: "bk_pipeline",
    4: "display_name",
    5: "events",
    6: "provider",
    7: "ref_filter",
}

// Decode decodes CreateRepoCIWebhookInputBody from json.
func (s *CreateRepoCIWebhookInputBody) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode CreateRepoCIWebhookInputBody to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "bk_cluster_id":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.BkClusterID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"bk_cluster_id\"")
            }
        case "bk_organization":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.BkOrganization = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"bk_organization\"")
            }
        case "bk_pipeline":
            if err := func() error {
                s.BkPipeline.Reset()
                if err := s.BkPipeline.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"bk_pipeline\"")
            }
        case "display_name":
            if err := func() error {
                s.DisplayName.Reset()
                if err := s.DisplayName.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"display_name\"")
            }
        case "events":
            if err := func() error {
                s.Events = make([]string, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem string
                    v, err := d.Str()
                    elem = string(v)
                    if err != nil {
                        return err
                    }
                    s.Events = append(s.Events, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"events\"")
            }
        case "provider":
            requiredBitSet[0] |= 1 << 6
            if err := func() error {
                if err := s.Provider.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"provider\"")
            }
        case "ref_filter":
            if err := func() error {
                s.RefFilter.Reset()
                if err := s.RefFilter.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"ref_filter\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode CreateRepoCIWebhookInputBody")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b01000110,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfCreateRepoCIWebhookInputBody) {
                    name = jsonFieldsNameOfCreateRepoCIWebhookInputBody[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *CreateRepoCIWebhookInputBody) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *CreateRepoCIWebhookInputBody) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s CreateRepoCIWebhookInputBodyAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s CreateRepoCIWebhookInputBodyAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes CreateRepoCIWebhookInputBodyAdditional from json.
func (s *CreateRepoCIWebhookInputBodyAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode CreateRepoCIWebhookInputBodyAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode CreateRepoCIWebhookInputBodyAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s CreateRepoCIWebhookInputBodyAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *CreateRepoCIWebhookInputBodyAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode encodes CreateRepoCIWebhookInputBodyProvider as json.
func (s CreateRepoCIWebhookInputBodyProvider) Encode(e *jx.Encoder) {
    e.Str(string(s))
}

// Decode decodes CreateRepoCIWebhookInputBodyProvider from json.
func (s *CreateRepoCIWebhookInputBodyProvider) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode CreateRepoCIWebhookInputBodyProvider to nil")
    }
    v, err := d.StrBytes()
    if err != nil {
        return err
    }
    // Try to use constant string.
    switch CreateRepoCIWebhookInputBodyProvider(v) {
    case CreateRepoCIWebhookInputBodyProviderBuildkite:
        *s = CreateRepoCIWebhookInputBodyProviderBuildkite
    default:
        *s = CreateRepoCIWebhookInputBodyProvider(v)
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s CreateRepoCIWebhookInputBodyProvider) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *CreateRepoCIWebhookInputBodyProvider) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *CreateRepoInputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
757 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *DeletionBlocker) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *DeletionBlocker) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("deletable")
        e.Bool(s.Deletable)
    }
    {
        e.FieldStart("id")
        e.Str(s.ID)
    }
    {
        e.FieldStart("kind")
        s.Kind.Encode(e)
    }
    {
        e.FieldStart("message")
        e.Str(s.Message)
    }
    {
        e.FieldStart("name")
        e.Str(s.Name)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfDeletionBlocker = [5]string{
    0: "deletable",
    1: "id",
    2: "kind",
    3: "message",
    4: "name",
}

// Decode decodes DeletionBlocker from json.
func (s *DeletionBlocker) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionBlocker to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "deletable":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                v, err := d.Bool()
                s.Deletable = bool(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"deletable\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"id\"")
            }
        case "kind":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                if err := s.Kind.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"kind\"")
            }
        case "message":
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                v, err := d.Str()
                s.Message = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"message\"")
            }
        case "name":
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Str()
                s.Name = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"name\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionBlocker")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00011111,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfDeletionBlocker) {
                    name = jsonFieldsNameOfDeletionBlocker[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *DeletionBlocker) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionBlocker) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s DeletionBlockerAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s DeletionBlockerAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes DeletionBlockerAdditional from json.
func (s *DeletionBlockerAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionBlockerAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionBlockerAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s DeletionBlockerAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionBlockerAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode encodes DeletionBlockerKind as json.
func (s DeletionBlockerKind) Encode(e *jx.Encoder) {
    e.Str(string(s))
}

// Decode decodes DeletionBlockerKind from json.
func (s *DeletionBlockerKind) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionBlockerKind to nil")
    }
    v, err := d.StrBytes()
    if err != nil {
        return err
    }
    // Try to use constant string.
    switch DeletionBlockerKind(v) {
    case DeletionBlockerKindOwnedOrg:
        *s = DeletionBlockerKindOwnedOrg
    default:
        *s = DeletionBlockerKind(v)
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s DeletionBlockerKind) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionBlockerKind) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *DeletionGrant) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *DeletionGrant) encodeFields(e *jx.Encoder) {
    {
        if s.Jurisdiction.Set {
            e.FieldStart("jurisdiction")
            s.Jurisdiction.Encode(e)
        }
    }
    {
        e.FieldStart("resourceId")
        e.Str(s.ResourceId)
    }
    {
        e.FieldStart("resourceName")
        e.Str(s.ResourceName)
    }
    {
        e.FieldStart("resourceType")
        s.ResourceType.Encode(e)
    }
    {
        e.FieldStart("role")
        e.Str(s.Role)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfDeletionGrant = [5]string{
    0: "jurisdiction",
    1: "resourceId",
    2: "resourceName",
    3: "resourceType",
    4: "role",
}

// Decode decodes DeletionGrant from json.
func (s *DeletionGrant) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionGrant to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "jurisdiction":
            if err := func() error {
                s.Jurisdiction.Reset()
                if err := s.Jurisdiction.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"jurisdiction\"")
            }
        case "resourceId":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.ResourceId = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"resourceId\"")
            }
        case "resourceName":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.ResourceName = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"resourceName\"")
            }
        case "resourceType":
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                if err := s.ResourceType.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"resourceType\"")
            }
        case "role":
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Str()
                s.Role = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"role\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionGrant")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00011110,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfDeletionGrant) {
                    name = jsonFieldsNameOfDeletionGrant[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *DeletionGrant) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionGrant) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s DeletionGrantAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s DeletionGrantAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes DeletionGrantAdditional from json.
func (s *DeletionGrantAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionGrantAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionGrantAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s DeletionGrantAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionGrantAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode encodes DeletionGrantResourceType as json.
func (s DeletionGrantResourceType) Encode(e *jx.Encoder) {
    e.Str(string(s))
}

// Decode decodes DeletionGrantResourceType from json.
func (s *DeletionGrantResourceType) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionGrantResourceType to nil")
    }
    v, err := d.StrBytes()
    if err != nil {
        return err
    }
    // Try to use constant string.
    switch DeletionGrantResourceType(v) {
    case DeletionGrantResourceTypeProject:
        *s = DeletionGrantResourceTypeProject
    case DeletionGrantResourceTypeRepo:
        *s = DeletionGrantResourceTypeRepo
    default:
        *s = DeletionGrantResourceType(v)
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s DeletionGrantResourceType) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionGrantResourceType) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *DeletionMembership) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *DeletionMembership) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("name")
        e.Str(s.Name)
    }
    {
        e.FieldStart("orgId")
        e.Str(s.OrgId)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfDeletionMembership = [2]string{
    0: "name",
    1: "orgId",
}

// Decode decodes DeletionMembership from json.
func (s *DeletionMembership) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionMembership to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "name":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                v, err := d.Str()
                s.Name = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"name\"")
            }
        case "orgId":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.OrgId = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"orgId\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionMembership")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000011,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfDeletionMembership) {
                    name = jsonFieldsNameOfDeletionMembership[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *DeletionMembership) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionMembership) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s DeletionMembershipAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s DeletionMembershipAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes DeletionMembershipAdditional from json.
func (s *DeletionMembershipAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionMembershipAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionMembershipAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s DeletionMembershipAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionMembershipAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *DeletionRepo) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *DeletionRepo) encodeFields(e *jx.Encoder) {
    {
        if s.Cluster.Set {
            e.FieldStart("cluster")
            s.Cluster.Encode(e)
        }
    }
    {
        e.FieldStart("id")
        e.Str(s.ID)
    }
    {
        e.FieldStart("name")
        e.Str(s.Name)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfDeletionRepo = [3]string{
    0: "cluster",
    1: "id",
    2: "name",
}

// Decode decodes DeletionRepo from json.
func (s *DeletionRepo) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionRepo to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "cluster":
            if err := func() error {
                s.Cluster.Reset()
                if err := s.Cluster.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"cluster\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"id\"")
            }
        case "name":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.Name = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"name\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionRepo")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000110,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfDeletionRepo) {
                    name = jsonFieldsNameOfDeletionRepo[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *DeletionRepo) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionRepo) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s DeletionRepoAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s DeletionRepoAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes DeletionRepoAdditional from json.
func (s *DeletionRepoAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode DeletionRepoAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode DeletionRepoAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s DeletionRepoAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *DeletionRepoAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *ErrorDetail) Encode(e *jx.Encoder) {
    e.ObjStart()
423 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *GetDeletionPreviewOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *GetDeletionPreviewOutputBody) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        e.FieldStart("blocked")
        e.Bool(s.Blocked)
    }
    {
        e.FieldStart("blockers")
        e.ArrStart()
        for _, elem := range s.Blockers {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    {
        e.FieldStart("willDelete")
        s.WillDelete.Encode(e)
    }
    {
        e.FieldStart("willUnlink")
        s.WillUnlink.Encode(e)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfGetDeletionPreviewOutputBody = [5]string{
    0: "$schema",
    1: "blocked",
    2: "blockers",
    3: "willDelete",
    4: "willUnlink",
}

// Decode decodes GetDeletionPreviewOutputBody from json.
func (s *GetDeletionPreviewOutputBody) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode GetDeletionPreviewOutputBody to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "blocked":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Bool()
                s.Blocked = bool(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"blocked\"")
            }
        case "blockers":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                s.Blockers = make([]DeletionBlocker, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem DeletionBlocker
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Blockers = append(s.Blockers, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"blockers\"")
            }
        case "willDelete":
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                if err := s.WillDelete.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"willDelete\"")
            }
        case "willUnlink":
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                if err := s.WillUnlink.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"willUnlink\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode GetDeletionPreviewOutputBody")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00011110,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfGetDeletionPreviewOutputBody) {
                    name = jsonFieldsNameOfGetDeletionPreviewOutputBody[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *GetDeletionPreviewOutputBody) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetDeletionPreviewOutputBody) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s GetDeletionPreviewOutputBodyAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s GetDeletionPreviewOutputBodyAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes GetDeletionPreviewOutputBodyAdditional from json.
func (s *GetDeletionPreviewOutputBodyAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode GetDeletionPreviewOutputBodyAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode GetDeletionPreviewOutputBodyAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s GetDeletionPreviewOutputBodyAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetDeletionPreviewOutputBodyAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *GetMeOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
13 unmodified lines

e.FieldStart("auth")
        s.Auth.Encode(e)
    }
    {
        if s.Deletion.Set {
            e.FieldStart("deletion")
            s.Deletion.Encode(e)
        }
    }
    {
        e.FieldStart("global")
        s.Global.Encode(e)
31 unmodified lines

}
}

var jsonFieldsNameOfGetMeOutputBody = [7]string{
var jsonFieldsNameOfGetMeOutputBody = [8]string{
    0: "$schema",
    1: "auth",
    2: "global",
    3: "jurisdiction",
    4: "mode",
    5: "regional",
    6: "regionalUnavailable",
    2: "deletion",
    3: "global",
    4: "jurisdiction",
    5: "mode",
    6: "regional",
    7: "regionalUnavailable",
}

// Decode decodes GetMeOutputBody from json.
26 unmodified lines

}(); err != nil {
                return errors.Wrap(err, "decode field \"auth\"")
            }
        case "deletion":
            if err := func() error {
                s.Deletion.Reset()
                if err := s.Deletion.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"deletion\"")
            }
        case "global":
            requiredBitSet[0] |= 1 << 2
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                if err := s.Global.Decode(d); err != nil {
                    return err
63 unmodified lines

// Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000110,
        0b00001010,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
139 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *GetOnboardingStatusOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *GetOnboardingStatusOutputBody) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        e.FieldStart("needsOnboarding")
        e.Bool(s.NeedsOnboarding)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfGetOnboardingStatusOutputBody = [2]string{
    0: "$schema",
    1: "needsOnboarding",
}

// Decode decodes GetOnboardingStatusOutputBody from json.
func (s *GetOnboardingStatusOutputBody) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode GetOnboardingStatusOutputBody to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "needsOnboarding":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Bool()
                s.NeedsOnboarding = bool(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"needsOnboarding\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode GetOnboardingStatusOutputBody")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000010,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfGetOnboardingStatusOutputBody) {
                    name = jsonFieldsNameOfGetOnboardingStatusOutputBody[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *GetOnboardingStatusOutputBody) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetOnboardingStatusOutputBody) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s GetOnboardingStatusOutputBodyAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s GetOnboardingStatusOutputBodyAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes GetOnboardingStatusOutputBodyAdditional from json.
func (s *GetOnboardingStatusOutputBodyAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode GetOnboardingStatusOutputBodyAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode GetOnboardingStatusOutputBodyAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s GetOnboardingStatusOutputBodyAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetOnboardingStatusOutputBodyAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *GetPermissionsOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
534 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *GetTopologyOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *GetTopologyOutputBody) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        e.FieldStart("jurisdictions")
        e.ArrStart()
        for _, elem := range s.Jurisdictions {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfGetTopologyOutputBody = [2]string{
    0: "$schema",
    1: "jurisdictions",
}

// Decode decodes GetTopologyOutputBody from json.
func (s *GetTopologyOutputBody) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode GetTopologyOutputBody to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "jurisdictions":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                s.Jurisdictions = make([]TopologyJurisdiction, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem TopologyJurisdiction
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Jurisdictions = append(s.Jurisdictions, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"jurisdictions\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode GetTopologyOutputBody")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000010,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfGetTopologyOutputBody) {
                    name = jsonFieldsNameOfGetTopologyOutputBody[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *GetTopologyOutputBody) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetTopologyOutputBody) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s GetTopologyOutputBodyAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s GetTopologyOutputBodyAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes GetTopologyOutputBodyAdditional from json.
func (s *GetTopologyOutputBodyAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode GetTopologyOutputBodyAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode GetTopologyOutputBodyAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s GetTopologyOutputBodyAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetTopologyOutputBodyAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *GetVersionOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
1053 unmodified lines

*s = GrantRepoAccessInputBodyRoleWriter
    case GrantRepoAccessInputBodyRoleAdmin:
        *s = GrantRepoAccessInputBodyRoleAdmin
    case GrantRepoAccessInputBodyRoleCiManager:
        *s = GrantRepoAccessInputBodyRoleCiManager
    default:
        *s = GrantRepoAccessInputBodyRole(v)
    }
3406 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *ListRepoCIWebhooksOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *ListRepoCIWebhooksOutputBody) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        e.FieldStart("subscriptions")
        e.ArrStart()
        for _, elem := range s.Subscriptions {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfListRepoCIWebhooksOutputBody = [2]string{
    0: "$schema",
    1: "subscriptions",
}

// Decode decodes ListRepoCIWebhooksOutputBody from json.
func (s *ListRepoCIWebhooksOutputBody) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode ListRepoCIWebhooksOutputBody to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "subscriptions":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                s.Subscriptions = make([]CIWebhookView, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem CIWebhookView
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Subscriptions = append(s.Subscriptions, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"subscriptions\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode ListRepoCIWebhooksOutputBody")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000010,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfListRepoCIWebhooksOutputBody) {
                    name = jsonFieldsNameOfListRepoCIWebhooksOutputBody[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *ListRepoCIWebhooksOutputBody) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ListRepoCIWebhooksOutputBody) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s ListRepoCIWebhooksOutputBodyAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s ListRepoCIWebhooksOutputBodyAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes ListRepoCIWebhooksOutputBodyAdditional from json.
func (s *ListRepoCIWebhooksOutputBodyAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode ListRepoCIWebhooksOutputBodyAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode ListRepoCIWebhooksOutputBodyAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s ListRepoCIWebhooksOutputBodyAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ListRepoCIWebhooksOutputBodyAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *ListRepoGrantsOutputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
2097 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *MeDeletion) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *MeDeletion) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("cooldownEndsAt")
        json.EncodeDateTime(e, s.CooldownEndsAt)
    }
    {
        e.FieldStart("requestedAt")
        json.EncodeDateTime(e, s.RequestedAt)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfMeDeletion = [2]string{
    0: "cooldownEndsAt",
    1: "requestedAt",
}

// Decode decodes MeDeletion from json.
func (s *MeDeletion) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode MeDeletion to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "cooldownEndsAt":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                v, err := json.DecodeDateTime(d)
                s.CooldownEndsAt = v
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"cooldownEndsAt\"")
            }
        case "requestedAt":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := json.DecodeDateTime(d)
                s.RequestedAt = v
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"requestedAt\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode MeDeletion")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000011,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfMeDeletion) {
                    name = jsonFieldsNameOfMeDeletion[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *MeDeletion) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *MeDeletion) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s MeDeletionAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s MeDeletionAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes MeDeletionAdditional from json.
func (s *MeDeletionAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode MeDeletionAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode MeDeletionAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s MeDeletionAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *MeDeletionAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *MeGlobal) Encode(e *jx.Encoder) {
    e.ObjStart()
13 unmodified lines

s.AvatarUrl.Encode(e)
        }
    }
    {
        e.FieldStart("createdAt")
        json.EncodeDateTime(e, s.CreatedAt)
    }
    {
        if s.Handle.Set {
            e.FieldStart("handle")
23 unmodified lines

}
}

var jsonFieldsNameOfMeGlobal = [5]string{
var jsonFieldsNameOfMeGlobal = [6]string{
    0: "accountId",
    1: "avatarUrl",
    2: "handle",
    3: "handles",
    4: "homeJurisdiction",
    2: "createdAt",
    3: "handle",
    4: "handles",
    5: "homeJurisdiction",
}

// Decode decodes MeGlobal from json.
28 unmodified lines

}(); err != nil {
                return errors.Wrap(err, "decode field \"avatarUrl\"")
            }
        case "createdAt":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := json.DecodeDateTime(d)
                s.CreatedAt = v
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"createdAt\"")
            }
        case "handle":
            if err := func() error {
                s.Handle.Reset()
5 unmodified lines

return errors.Wrap(err, "decode field \"handle\"")
            }
        case "handles":
            requiredBitSet[0] |= 1 << 3
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                s.Handles = make([]MeIdentityHandle, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
41 unmodified lines

// Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00001001,
        0b00010101,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
2355 unmodified lines

return s.Decode(d)
}

// Encode encodes MeDeletion as json.
func (o OptMeDeletion) Encode(e *jx.Encoder) {
    if !o.Set {
        return
    }
    o.Value.Encode(e)
}

// Decode decodes MeDeletion from json.
func (o *OptMeDeletion) Decode(d *jx.Decoder) error {
    if o == nil {
        return errors.New("invalid: unable to decode OptMeDeletion to nil")
    }
    o.Set = true
    if err := o.Value.Decode(d); err != nil {
        return err
    }
    return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s OptMeDeletion) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *OptMeDeletion) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode encodes MeRegional as json.
func (o OptMeRegional) Encode(e *jx.Encoder) {
    if !o.Set {
192 unmodified lines

return s.Decode(d)
}

// Encode encodes RepoCandidate as json.
func (o OptRepoCandidate) Encode(e *jx.Encoder) {
    if !o.Set {
        return
    }
    o.Value.Encode(e)
}

// Decode decodes RepoCandidate from json.
func (o *OptRepoCandidate) Decode(d *jx.Decoder) error {
    if o == nil {
        return errors.New("invalid: unable to decode OptRepoCandidate to nil")
    }
    o.Set = true
    if err := o.Value.Decode(d); err != nil {
        return err
    }
    return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s OptRepoCandidate) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *OptRepoCandidate) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode encodes string as json.
func (o OptString) Encode(e *jx.Encoder) {
    if !o.Set {
322 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *PatchRepoCIWebhookInputBody) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *PatchRepoCIWebhookInputBody) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
    }
    {
        if s.DisplayName.Set {
            e.FieldStart("display_name")
            s.DisplayName.Encode(e)
        }
    }
    {
        if s.Enabled.Set {
            e.FieldStart("enabled")
            s.Enabled.Encode(e)
        }
    }
    {
        if s.Events != nil {
            e.FieldStart("events")
            e.ArrStart()
            for _, elem := range s.Events {
                e.Str(elem)
            }
            e.ArrEnd()
        }
    }
    {
        if s.RefFilter.Set {
            e.FieldStart("ref_filter")
            s.RefFilter.Encode(e)
        }
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfPatchRepoCIWebhookInputBody = [5]string{
    0: "$schema",
    1: "display_name",
    2: "enabled",
    3: "events",
    4: "ref_filter",
}

// Decode decodes PatchRepoCIWebhookInputBody from json.
func (s *PatchRepoCIWebhookInputBody) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode PatchRepoCIWebhookInputBody to nil")
    }
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
            }
        case "display_name":
            if err := func() error {
                s.DisplayName.Reset()
                if err := s.DisplayName.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"display_name\"")
            }
        case "enabled":
            if err := func() error {
                s.Enabled.Reset()
                if err := s.Enabled.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"enabled\"")
            }
        case "events":
            if err := func() error {
                s.Events = make([]string, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem string
                    v, err := d.Str()
                    elem = string(v)
                    if err != nil {
                        return err
                    }
                    s.Events = append(s.Events, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"events\"")
            }
        case "ref_filter":
            if err := func() error {
                s.RefFilter.Reset()
                if err := s.RefFilter.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"ref_filter\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode PatchRepoCIWebhookInputBody")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *PatchRepoCIWebhookInputBody) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *PatchRepoCIWebhookInputBody) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s PatchRepoCIWebhookInputBodyAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s PatchRepoCIWebhookInputBodyAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes PatchRepoCIWebhookInputBodyAdditional from json.
func (s *PatchRepoCIWebhookInputBodyAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode PatchRepoCIWebhookInputBodyAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode PatchRepoCIWebhookInputBodyAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s PatchRepoCIWebhookInputBodyAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *PatchRepoCIWebhookInputBodyAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *Project) Encode(e *jx.Encoder) {
    e.ObjStart()
575 unmodified lines

s.Foreign.Encode(e)
        }
    }
    {
        if s.FullName.Set {
            e.FieldStart("fullName")
            s.FullName.Encode(e)
        }
    }
    {
        e.FieldStart("id")
        e.Str(s.ID)
42 unmodified lines

s.ProvisionReason.Encode(e)
        }
    }
    {
        if s.RepoGroupId.Set {
            e.FieldStart("repoGroupId")
            s.RepoGroupId.Encode(e)
        }
    }
    {
        if s.State.Set {
            e.FieldStart("state")
15 unmodified lines

}
}

var jsonFieldsNameOfRepo = [14]string{
var jsonFieldsNameOfRepo = [16]string{
    0:  "$schema",
    1:  "clusterHost",
    2:  "foreign",
    3:  "id",
    4:  "mirrorSuspended",
    5:  "mirrorSuspendedAt",
    6:  "name",
    7:  "objectFormat",
    8:  "owningProjectId",
    9:  "path",
    10: "provisionAttempts",
    11: "provisionReason",
    12: "state",
    13: "visibility",
    3:  "fullName",
    4:  "id",
    5:  "mirrorSuspended",
    6:  "mirrorSuspendedAt",
    7:  "name",
    8:  "objectFormat",
    9:  "owningProjectId",
    10: "path",
    11: "provisionAttempts",
    12: "provisionReason",
    13: "repoGroupId",
    14: "state",
    15: "visibility",
}

// Decode decodes Repo from json.
36 unmodified lines

}(); err != nil {
                return errors.Wrap(err, "decode field \"foreign\"")
            }
        case "fullName":
            if err := func() error {
                s.FullName.Reset()
                if err := s.FullName.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"fullName\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 3
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
25 unmodified lines

return errors.Wrap(err, "decode field \"mirrorSuspendedAt\"")
            }
        case "name":
            requiredBitSet[0] |= 1 << 6
            requiredBitSet[0] |= 1 << 7
            if err := func() error {
                v, err := d.Str()
                s.Name = string(v)
15 unmodified lines

return errors.Wrap(err, "decode field \"objectFormat\"")
            }
        case "owningProjectId":
            requiredBitSet[1] |= 1 << 0
            requiredBitSet[1] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.OwningProjectId = string(v)
34 unmodified lines

}(); err != nil {
                return errors.Wrap(err, "decode field \"provisionReason\"")
            }
        case "repoGroupId":
            if err := func() error {
                s.RepoGroupId.Reset()
                if err := s.RepoGroupId.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"repoGroupId\"")
            }
        case "state":
            if err := func() error {
                s.State.Reset()
35 unmodified lines

// Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [2]uint8{
        0b01001000,
        0b00000001,
        0b10010000,
        0b00000010,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
97 unmodified lines

return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *RepoCandidate) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *RepoCandidate) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("access")
        s.Access.Encode(e)
    }
    {
        e.FieldStart("onboardable")
        e.Bool(s.Onboardable)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfRepoCandidate = [2]string{
    0: "access",
    1: "onboardable",
}

// Decode decodes RepoCandidate from json.
func (s *RepoCandidate) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode RepoCandidate to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "access":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                if err := s.Access.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"access\"")
            }
        case "onboardable":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Bool()
                s.Onboardable = bool(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"onboardable\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode RepoCandidate")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000011,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfRepoCandidate) {
                    name = jsonFieldsNameOfRepoCandidate[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *RepoCandidate) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RepoCandidate) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode encodes RepoCandidateAccess as json.
func (s RepoCandidateAccess) Encode(e *jx.Encoder) {
    e.Str(string(s))
}

// Decode decodes RepoCandidateAccess from json.
func (s *RepoCandidateAccess) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode RepoCandidateAccess to nil")
    }
    v, err := d.StrBytes()
    if err != nil {
        return err
    }
    // Try to use constant string.
    switch RepoCandidateAccess(v) {
    case RepoCandidateAccessRead:
        *s = RepoCandidateAccessRead
    case RepoCandidateAccessWrite:
        *s = RepoCandidateAccessWrite
    case RepoCandidateAccessAdmin:
        *s = RepoCandidateAccessAdmin
    default:
        *s = RepoCandidateAccess(v)
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s RepoCandidateAccess) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RepoCandidateAccess) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s RepoCandidateAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s RepoCandidateAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes RepoCandidateAdditional from json.
func (s *RepoCandidateAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode RepoCandidateAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode RepoCandidateAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s RepoCandidateAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RepoCandidateAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *RepoGrant) Encode(e *jx.Encoder) {
    e.ObjStart()
244 unmodified lines

// encodeFields encodes fields.
func (s *RepoIndexEntry) encodeFields(e *jx.Encoder) {
    {
        if s.Candidate.Set {
            e.FieldStart("candidate")
            s.Candidate.Encode(e)
        }
    }
    {
        e.FieldStart("cell")
        e.Str(s.Cell)
39 unmodified lines

}
}

var jsonFieldsNameOfRepoIndexEntry = [8]string{
    0: "cell",
    1: "clusterSlug",
    2: "full_name",
    3: "id",
    4: "jurisdiction",
    5: "name",
    6: "placements",
    7: "visibility",
var jsonFieldsNameOfRepoIndexEntry = [9]string{
    0: "candidate",
    1: "cell",
    2: "clusterSlug",
    3: "full_name",
    4: "id",
    5: "jurisdiction",
    6: "name",
    7: "placements",
    8: "visibility",
}

// Decode decodes RepoIndexEntry from json.
1 unmodified line

if s == nil {
        return errors.New("invalid: unable to decode RepoIndexEntry to nil")
    }
    var requiredBitSet [1]uint8
    var requiredBitSet [2]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "candidate":
            if err := func() error {
                s.Candidate.Reset()
                if err := s.Candidate.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"candidate\"")
            }
        case "cell":
            requiredBitSet[0] |= 1 << 0
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.Cell = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"cell\"")
            }
        case "clusterSlug":
            requiredBitSet[0] |= 1 << 1
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.ClusterSlug = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"clusterSlug\"")
            }
        case "full_name":
            requiredBitSet[0] |= 1 << 2
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                v, err := d.Str()
                s.FullName = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"full_name\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 3
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"id\"")
            }
        case "jurisdiction":
            requiredBitSet[0] |= 1 << 4
            requiredBitSet[0] |= 1 << 5
            if err := func() error {
                v, err := d.Str()
                s.Jurisdiction = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"jurisdiction\"")
            }
        case "name":
            requiredBitSet[0] |= 1 << 5
            requiredBitSet[0] |= 1 << 6
            if err := func() error {
                v, err := d.Str()
                s.Name = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"name\"")
            }
        case "placements":
            requiredBitSet[0] |= 1 << 6
            requiredBitSet[0] |= 1 << 7
            if err := func() error {
                s.Placements = make([]RepoPlacement, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
11 unmodified lines

return errors.Wrap(err, "decode field \"placements\"")
            }
        case "visibility":
            requiredBitSet[0] |= 1 << 7
            requiredBitSet[1] |= 1 << 0
            if err := func() error {
                v, err := d.Str()
                s.Visibility = string(v)
24 unmodified lines

}
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b11111111,
    for i, mask := range [2]uint8{
        0b11111110,
        0b00000001,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
110 unmodified lines

e.FieldStart("cell")
        e.Str(s.Cell)
    }
    {
        e.FieldStart("clusterSlug")
        e.Str(s.ClusterSlug)
    }
    {
        e.FieldStart("id")
        e.Str(s.ID)
6 unmodified lines

e.FieldStart("mirror")
        e.Bool(s.Mirror)
    }
    {
        e.FieldStart("status")
        s.Status.Encode(e)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

3 unmodified lines

}
}

var jsonFieldsNameOfRepoPlacement = [4]string{
var jsonFieldsNameOfRepoPlacement = [6]string{
    0: "cell",
    1: "id",
    2: "jurisdiction",
    3: "mirror",
    1: "clusterSlug",
    2: "id",
    3: "jurisdiction",
    4: "mirror",
    5: "status",
}

// Decode decodes RepoPlacement from json.
18 unmodified lines

}(); err != nil {
                return errors.Wrap(err, "decode field \"cell\"")
            }
        case "id":
        case "clusterSlug":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.ClusterSlug = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"clusterSlug\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"id\"")
            }
        case "jurisdiction":
            requiredBitSet[0] |= 1 << 2
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                v, err := d.Str()
                s.Jurisdiction = string(v)
5 unmodified lines

return errors.Wrap(err, "decode field \"jurisdiction\"")
            }
        case "mirror":
            requiredBitSet[0] |= 1 << 3
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Bool()
                s.Mirror = bool(v)
4 unmodified lines

}(); err != nil {
                return errors.Wrap(err, "decode field \"mirror\"")
            }
        case "status":
            requiredBitSet[0] |= 1 << 5
            if err := func() error {
                if err := s.Status.Decode(d); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"status\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
15 unmodified lines

// Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00001111,
        0b00111111,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
97 unmodified lines

return s.Decode(d)
}

// Encode encodes RepoPlacementStatus as json.
func (s RepoPlacementStatus) Encode(e *jx.Encoder) {
    e.Str(string(s))
}

// Decode decodes RepoPlacementStatus from json.
func (s *RepoPlacementStatus) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode RepoPlacementStatus to nil")
    }
    v, err := d.StrBytes()
    if err != nil {
        return err
    }
    // Try to use constant string.
    switch RepoPlacementStatus(v) {
    case RepoPlacementStatusProcessing:
        *s = RepoPlacementStatusProcessing
    case RepoPlacementStatusReady:
        *s = RepoPlacementStatusReady
    case RepoPlacementStatusFailed:
        *s = RepoPlacementStatusFailed
    case RepoPlacementStatusSuspended:
        *s = RepoPlacementStatusSuspended
    default:
        *s = RepoPlacementStatus(v)
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s RepoPlacementStatus) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RepoPlacementStatus) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *ResolvedIdentity) Encode(e *jx.Encoder) {
    e.ObjStart()
1680 unmodified lines

}

// Encode implements json.Marshaler.
func (s *UpdateMeInputBody) Encode(e *jx.Encoder) {
func (s *TopologyCluster) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *UpdateMeInputBody) encodeFields(e *jx.Encoder) {
func (s *TopologyCluster) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
        e.FieldStart("host")
        e.Str(s.Host)
    }
    {
        e.FieldStart("email")
        e.Str(s.Email)
        e.FieldStart("isDefault")
        e.Bool(s.IsDefault)
    }
    {
        e.FieldStart("label")
        e.Str(s.Label)
    }
    {
        e.FieldStart("publicUrl")
        e.Str(s.PublicUrl)
    }
    {
        e.FieldStart("slug")
        e.Str(s.Slug)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

3 unmodified lines

}
}

var jsonFieldsNameOfUpdateMeInputBody = [2]string{
    0: "$schema",
    1: "email",
var jsonFieldsNameOfTopologyCluster = [5]string{
    0: "host",
    1: "isDefault",
    2: "label",
    3: "publicUrl",
    4: "slug",
}

// Decode decodes UpdateMeInputBody from json.
func (s *UpdateMeInputBody) Decode(d *jx.Decoder) error {
// Decode decodes TopologyCluster from json.
func (s *TopologyCluster) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode UpdateMeInputBody to nil")
        return errors.New("invalid: unable to decode TopologyCluster to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
        case "host":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                v, err := d.Str()
                s.Host = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
                return errors.Wrap(err, "decode field \"host\"")
            }
        case "email":
        case "isDefault":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Bool()
                s.IsDefault = bool(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"isDefault\"")
            }
        case "label":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.Email = string(v)
                s.Label = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"email\"")
                return errors.Wrap(err, "decode field \"label\"")
            }
        case "publicUrl":
            requiredBitSet[0] |= 1 << 3
            if err := func() error {
                v, err := d.Str()
                s.PublicUrl = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"publicUrl\"")
            }
        case "slug":
            requiredBitSet[0] |= 1 << 4
            if err := func() error {
                v, err := d.Str()
                s.Slug = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"slug\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
10 unmodified lines

}
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode UpdateMeInputBody")
        return errors.Wrap(err, "decode TopologyCluster")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000010,
        0b00011111,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
5 unmodified lines

bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfUpdateMeInputBody) {
                    name = jsonFieldsNameOfUpdateMeInputBody[fieldIdx]
                if fieldIdx < len(jsonFieldsNameOfTopologyCluster) {
                    name = jsonFieldsNameOfTopologyCluster[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
14 unmodified lines

}

// MarshalJSON implements stdjson.Marshaler.
func (s *UpdateMeInputBody) MarshalJSON() ([]byte, error) {
func (s *TopologyCluster) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *UpdateMeInputBody) UnmarshalJSON(data []byte) error {
func (s *TopologyCluster) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s UpdateMeInputBodyAdditional) Encode(e *jx.Encoder) {
func (s TopologyClusterAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s UpdateMeInputBodyAdditional) encodeFields(e *jx.Encoder) {
func (s TopologyClusterAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

3 unmodified lines

}
}

// Decode decodes UpdateMeInputBodyAdditional from json.
func (s *UpdateMeInputBodyAdditional) Decode(d *jx.Decoder) error {
// Decode decodes TopologyClusterAdditional from json.
func (s *TopologyClusterAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode UpdateMeInputBodyAdditional to nil")
        return errors.New("invalid: unable to decode TopologyClusterAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
11 unmodified lines

m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode UpdateMeInputBodyAdditional")
        return errors.Wrap(err, "decode TopologyClusterAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s UpdateMeInputBodyAdditional) MarshalJSON() ([]byte, error) {
func (s TopologyClusterAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *UpdateMeInputBodyAdditional) UnmarshalJSON(data []byte) error {
func (s *TopologyClusterAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *UpdateMeOutputBody) Encode(e *jx.Encoder) {
func (s *TopologyJurisdiction) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *UpdateMeOutputBody) encodeFields(e *jx.Encoder) {
func (s *TopologyJurisdiction) encodeFields(e *jx.Encoder) {
    {
        if s.Schema.Set {
            e.FieldStart("$schema")
            s.Schema.Encode(e)
        }
        e.FieldStart("id")
        e.Str(s.ID)
    }
    {
        e.FieldStart("email")
        e.Str(s.Email)
        e.FieldStart("label")
        e.Str(s.Label)
    }
    {
        e.FieldStart("regions")
        e.ArrStart()
        for _, elem := range s.Regions {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

3 unmodified lines

}
}

var jsonFieldsNameOfUpdateMeOutputBody = [2]string{
    0: "$schema",
    1: "email",
var jsonFieldsNameOfTopologyJurisdiction = [3]string{
    0: "id",
    1: "label",
    2: "regions",
}

// Decode decodes UpdateMeOutputBody from json.
func (s *UpdateMeOutputBody) Decode(d *jx.Decoder) error {
// Decode decodes TopologyJurisdiction from json.
func (s *TopologyJurisdiction) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode UpdateMeOutputBody to nil")
        return errors.New("invalid: unable to decode TopologyJurisdiction to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "$schema":
        case "id":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                s.Schema.Reset()
                if err := s.Schema.Decode(d); err != nil {
                v, err := d.Str()
                s.ID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"$schema\"")
                return errors.Wrap(err, "decode field \"id\"")
            }
        case "email":
        case "label":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.Email = string(v)
                s.Label = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"email\"")
                return errors.Wrap(err, "decode field \"label\"")
            }
        case "regions":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                s.Regions = make([]TopologyRegion, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem TopologyRegion
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Regions = append(s.Regions, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"regions\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
10 unmodified lines

}
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode UpdateMeOutputBody")
        return errors.Wrap(err, "decode TopologyJurisdiction")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000010,
        0b00000111,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
5 unmodified lines

bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfUpdateMeOutputBody) {
                    name = jsonFieldsNameOfUpdateMeOutputBody[fieldIdx]
                if fieldIdx < len(jsonFieldsNameOfTopologyJurisdiction) {
                    name = jsonFieldsNameOfTopologyJurisdiction[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
14 unmodified lines

}

// MarshalJSON implements stdjson.Marshaler.
func (s *UpdateMeOutputBody) MarshalJSON() ([]byte, error) {
func (s *TopologyJurisdiction) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *UpdateMeOutputBody) UnmarshalJSON(data []byte) error {
func (s *TopologyJurisdiction) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s UpdateMeOutputBodyAdditional) Encode(e *jx.Encoder) {
func (s TopologyJurisdictionAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s UpdateMeOutputBodyAdditional) encodeFields(e *jx.Encoder) {
func (s TopologyJurisdictionAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

3 unmodified lines

}
}

// Decode decodes UpdateMeOutputBodyAdditional from json.
func (s *UpdateMeOutputBodyAdditional) Decode(d *jx.Decoder) error {
// Decode decodes TopologyJurisdictionAdditional from json.
func (s *TopologyJurisdictionAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode UpdateMeOutputBodyAdditional to nil")
        return errors.New("invalid: unable to decode TopologyJurisdictionAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
11 unmodified lines

m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode UpdateMeOutputBodyAdditional")
        return errors.Wrap(err, "decode TopologyJurisdictionAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s UpdateMeOutputBodyAdditional) MarshalJSON() ([]byte, error) {
func (s TopologyJurisdictionAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *UpdateMeOutputBodyAdditional) UnmarshalJSON(data []byte) error {
func (s *TopologyJurisdictionAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *TopologyRegion) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *TopologyRegion) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("clusters")
        e.ArrStart()
        for _, elem := range s.Clusters {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    {
        e.FieldStart("id")
        e.Str(s.ID)
    }
    {
        e.FieldStart("label")
        e.Str(s.Label)
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfTopologyRegion = [3]string{
    0: "clusters",
    1: "id",
    2: "label",
}

// Decode decodes TopologyRegion from json.
func (s *TopologyRegion) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode TopologyRegion to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "clusters":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                s.Clusters = make([]TopologyCluster, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem TopologyCluster
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Clusters = append(s.Clusters, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"clusters\"")
            }
        case "id":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                v, err := d.Str()
                s.ID = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"id\"")
            }
        case "label":
            requiredBitSet[0] |= 1 << 2
            if err := func() error {
                v, err := d.Str()
                s.Label = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"label\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode TopologyRegion")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000111,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfTopologyRegion) {
                    name = jsonFieldsNameOfTopologyRegion[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *TopologyRegion) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *TopologyRegion) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s TopologyRegionAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s TopologyRegionAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes TopologyRegionAdditional from json.
func (s *TopologyRegionAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode TopologyRegionAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode TopologyRegionAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s TopologyRegionAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *TopologyRegionAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *WillDeleteStruct) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *WillDeleteStruct) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("profileDataNote")
        e.Str(s.ProfileDataNote)
    }
    {
        e.FieldStart("repos")
        e.ArrStart()
        for _, elem := range s.Repos {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfWillDeleteStruct = [2]string{
    0: "profileDataNote",
    1: "repos",
}

// Decode decodes WillDeleteStruct from json.
func (s *WillDeleteStruct) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode WillDeleteStruct to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "profileDataNote":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                v, err := d.Str()
                s.ProfileDataNote = string(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"profileDataNote\"")
            }
        case "repos":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                s.Repos = make([]DeletionRepo, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem DeletionRepo
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Repos = append(s.Repos, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"repos\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode WillDeleteStruct")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000011,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfWillDeleteStruct) {
                    name = jsonFieldsNameOfWillDeleteStruct[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *WillDeleteStruct) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *WillDeleteStruct) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s WillDeleteStructAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s WillDeleteStructAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes WillDeleteStructAdditional from json.
func (s *WillDeleteStructAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode WillDeleteStructAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode WillDeleteStructAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s WillDeleteStructAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *WillDeleteStructAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *WillUnlinkStruct) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields encodes fields.
func (s *WillUnlinkStruct) encodeFields(e *jx.Encoder) {
    {
        e.FieldStart("grants")
        e.ArrStart()
        for _, elem := range s.Grants {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    {
        e.FieldStart("memberships")
        e.ArrStart()
        for _, elem := range s.Memberships {
            elem.Encode(e)
        }
        e.ArrEnd()
    }
    for k, elem := range s.AdditionalProps {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

var jsonFieldsNameOfWillUnlinkStruct = [2]string{
    0: "grants",
    1: "memberships",
}

// Decode decodes WillUnlinkStruct from json.
func (s *WillUnlinkStruct) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode WillUnlinkStruct to nil")
    }
    var requiredBitSet [1]uint8
    s.AdditionalProps = map[string]jx.Raw{}

if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        switch string(k) {
        case "grants":
            requiredBitSet[0] |= 1 << 0
            if err := func() error {
                s.Grants = make([]DeletionGrant, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem DeletionGrant
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Grants = append(s.Grants, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"grants\"")
            }
        case "memberships":
            requiredBitSet[0] |= 1 << 1
            if err := func() error {
                s.Memberships = make([]DeletionMembership, 0)
                if err := d.Arr(func(d *jx.Decoder) error {
                    var elem DeletionMembership
                    if err := elem.Decode(d); err != nil {
                        return err
                    }
                    s.Memberships = append(s.Memberships, elem)
                    return nil
                }); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrap(err, "decode field \"memberships\"")
            }
        default:
            var elem jx.Raw
            if err := func() error {
                v, err := d.RawAppend(nil)
                elem = jx.Raw(v)
                if err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return errors.Wrapf(err, "decode field %q", k)
            }
            s.AdditionalProps[string(k)] = elem
        }
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode WillUnlinkStruct")
    }
    // Validate required fields.
    var failures []validate.FieldError
    for i, mask := range [1]uint8{
        0b00000011,
    } {
        if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
            // Mask only required fields and check equality to mask using XOR.
            //
            // If XOR result is not zero, result is not equal to expected, so some fields are missed.
            // Bits of fields which would be set are actually bits of missed fields.
            missed := bits.OnesCount8(result)
            for bitN := 0; bitN < missed; bitN++ {
                bitIdx := bits.TrailingZeros8(result)
                fieldIdx := i*8 + bitIdx
                var name string
                if fieldIdx < len(jsonFieldsNameOfWillUnlinkStruct) {
                    name = jsonFieldsNameOfWillUnlinkStruct[fieldIdx]
                } else {
                    name = strconv.Itoa(fieldIdx)
                }
                failures = append(failures, validate.FieldError{
                    Name:  name,
                    Error: validate.ErrFieldRequired,
                })
                // Reset bit.
                result &^= 1 << bitIdx
            }
        }
    }
    if len(failures) > 0 {
        return &validate.Error{Fields: failures}
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *WillUnlinkStruct) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *WillUnlinkStruct) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s WillUnlinkStructAdditional) Encode(e *jx.Encoder) {
    e.ObjStart()
    s.encodeFields(e)
    e.ObjEnd()
}

// encodeFields implements json.Marshaler.
func (s WillUnlinkStructAdditional) encodeFields(e *jx.Encoder) {
    for k, elem := range s {
        e.FieldStart(k)

if len(elem) != 0 {
            e.Raw(elem)
        }
    }
}

// Decode decodes WillUnlinkStructAdditional from json.
func (s *WillUnlinkStructAdditional) Decode(d *jx.Decoder) error {
    if s == nil {
        return errors.New("invalid: unable to decode WillUnlinkStructAdditional to nil")
    }
    m := s.init()
    if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
        var elem jx.Raw
        if err := func() error {
            v, err := d.RawAppend(nil)
            elem = jx.Raw(v)
            if err != nil {
                return err
            }
            return nil
        }(); err != nil {
            return errors.Wrapf(err, "decode field %q", k)
        }
        m[string(k)] = elem
        return nil
    }); err != nil {
        return errors.Wrap(err, "decode WillUnlinkStructAdditional")
    }

return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s WillUnlinkStructAdditional) MarshalJSON() ([]byte, error) {
    e := jx.Encoder{}
    s.Encode(&e)
    return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *WillUnlinkStructAdditional) UnmarshalJSON(data []byte) error {
    d := jx.DecodeBytes(data)
    return s.Decode(d)
}

Minternal/coreapi/oas_json_gen.go+4209/-129

7 unmodified lines

8
9
10
11
12
13
14
15
16
17
18
19
20
1 unmodified line

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
11 unmodified lines

52
53
54
55
56
57
58
59
60
61
62
63
64
65
2 unmodified lines

68
69
70
63
71

7 unmodified lines

const (
    AddOrgMemberOperation                  OperationName = "AddOrgMember"
    BatchLookupOperation                   OperationName = "BatchLookup"
    CancelDeletionOperation                OperationName = "CancelDeletion"
    CreateBindingOperation                 OperationName = "CreateBinding"
    CreateMirrorOperation                  OperationName = "CreateMirror"
    CreateOrgOperation                     OperationName = "CreateOrg"
    CreateProjectOperation                 OperationName = "CreateProject"
    CreateRepoOperation                    OperationName = "CreateRepo"
    CreateRepoCIWebhookOperation           OperationName = "CreateRepoCIWebhook"
    CreateServiceAccountOperation          OperationName = "CreateServiceAccount"
    DeleteBindingOperation                 OperationName = "DeleteBinding"
    DeleteMeOperation                      OperationName = "DeleteMe"
1 unmodified line

DeleteOrgOperation                     OperationName = "DeleteOrg"
    DeleteProjectOperation                 OperationName = "DeleteProject"
    DeleteRepoOperation                    OperationName = "DeleteRepo"
    DeleteRepoCIWebhookOperation           OperationName = "DeleteRepoCIWebhook"
    DeleteServiceAccountOperation          OperationName = "DeleteServiceAccount"
    GetDeletionPreviewOperation            OperationName = "GetDeletionPreview"
    GetMeOperation                         OperationName = "GetMe"
    GetMirrorOperation                     OperationName = "GetMirror"
    GetOnboardingStatusOperation           OperationName = "GetOnboardingStatus"
    GetOrgOperation                        OperationName = "GetOrg"
    GetPermissionsOperation                OperationName = "GetPermissions"
    GetProjectOperation                    OperationName = "GetProject"
    GetRepoOperation                       OperationName = "GetRepo"
    GetRepoVisibilityOperation             OperationName = "GetRepoVisibility"
    GetServiceAccountOperation             OperationName = "GetServiceAccount"
    GetTopologyOperation                   OperationName = "GetTopology"
    GetVersionOperation                    OperationName = "GetVersion"
    GrantProjectAccessOperation            OperationName = "GrantProjectAccess"
    GrantRepoAccessOperation               OperationName = "GrantRepoAccess"
11 unmodified lines

ListProjectMembersOperation            OperationName = "ListProjectMembers"
    ListProjectReposOperation              OperationName = "ListProjectRepos"
    ListProjectsOperation                  OperationName = "ListProjects"
    ListRepoCIWebhooksOperation            OperationName = "ListRepoCIWebhooks"
    ListRepoGrantsOperation                OperationName = "ListRepoGrants"
    ListReposOperation                     OperationName = "ListRepos"
    ListServiceAccountGrantsOperation      OperationName = "ListServiceAccountGrants"
    ListServiceAccountsOperation           OperationName = "ListServiceAccounts"
    LookupRepoBySlugOperation              OperationName = "LookupRepoBySlug"
    LookupResourcesOperation               OperationName = "LookupResources"
    PatchRepoCIWebhookOperation            OperationName = "PatchRepoCIWebhook"
    RemoveOrgMemberOperation               OperationName = "RemoveOrgMember"
    ResolveHandleOperation                 OperationName = "ResolveHandle"
    RevokeProjectAccessOperation           OperationName = "RevokeProjectAccess"
2 unmodified lines

RevokeRepoAccessByProviderOperation    OperationName = "RevokeRepoAccessByProvider"
    RevokeServiceAccountAccessOperation    OperationName = "RevokeServiceAccountAccess"
    SetRepoVisibilityOperation             OperationName = "SetRepoVisibility"
    UpdateMeOperation                      OperationName = "UpdateMe"
)

Minternal/coreapi/oas_operations_gen.go+8/-1

11 unmodified lines

12
13
14
15
16
17
18
19
20
21
22
24 unmodified lines

47
48
49
50
51
52
53
54
55
56
57
58
59
134 unmodified lines

194
195
196
185
197
198
199
200
201
26 unmodified lines

228
229
230
231
232
233
234
235
236
237
238
3 unmodified lines

242
243
244
245
246
247
248
249
250
251
252
253
31 unmodified lines

285
286
287
288
289
290
291
292
293
294
295
296

11 unmodified lines

AccountId string
}

// CreateRepoCIWebhookParams is parameters of createRepoCIWebhook operation.
type CreateRepoCIWebhookParams struct {
    RepoId string
}

// DeleteBindingParams is parameters of deleteBinding operation.
type DeleteBindingParams struct {
    AccountId string
24 unmodified lines

RepoId string
}

// DeleteRepoCIWebhookParams is parameters of deleteRepoCIWebhook operation.
type DeleteRepoCIWebhookParams struct {
    RepoId   string
    ID       string
    Teardown OptBool `json:",omitempty,omitzero"`
}

// DeleteServiceAccountParams is parameters of deleteServiceAccount operation.
type DeleteServiceAccountParams struct {
    AccountId string
134 unmodified lines

// Opaque cursor from a previous response's nextPageToken.
    PageToken OptString `json:",omitempty,omitzero"`
    // Optional: exact-match org name (case-insensitive).
    Name OptString `json:",omitempty,omitzero"`
    Name        OptString `json:",omitempty,omitzero"`
    IfNoneMatch OptString `json:",omitempty,omitzero"`
}

// ListProjectMembersParams is parameters of listProjectMembers operation.
26 unmodified lines

Name OptString `json:",omitempty,omitzero"`
}

// ListRepoCIWebhooksParams is parameters of listRepoCIWebhooks operation.
type ListRepoCIWebhooksParams struct {
    RepoId string
}

// ListRepoGrantsParams is parameters of listRepoGrants operation.
type ListRepoGrantsParams struct {
    // Maximum entries to return; server may cap further.
3 unmodified lines

RepoId    string
}

// ListReposParams is parameters of listRepos operation.
type ListReposParams struct {
    // Onboarded (default): repos in Entire; all: also include onboardable GitHub candidates.
    Scope OptListReposScope `json:",omitempty,omitzero"`
}

// ListServiceAccountGrantsParams is parameters of listServiceAccountGrants operation.
type ListServiceAccountGrantsParams struct {
    // Maximum entries to return; server may cap further.
31 unmodified lines

Permission OptString `json:",omitempty,omitzero"`
}

// PatchRepoCIWebhookParams is parameters of patchRepoCIWebhook operation.
type PatchRepoCIWebhookParams struct {
    RepoId string
    ID     string
}

// RemoveOrgMemberParams is parameters of removeOrgMember operation.
type RemoveOrgMemberParams struct {
    OrgId          string

Minternal/coreapi/oas_parameters_gen.go+31/-1

107 unmodified lines

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
50 unmodified lines

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
7 unmodified lines

205
206
207
180
181
182
183
184
185
186
187
188
189
190
191
192
193

107 unmodified lines

return nil
}

func encodeCreateRepoCIWebhookRequest(
    req *CreateRepoCIWebhookInputBody,
    r *http.Request,
) error {
    const contentType = "application/json"
    e := new(jx.Encoder)
    {
        req.Encode(e)
    }
    encoded := e.Bytes()
    ht.SetBody(r, bytes.NewReader(encoded), contentType)
    return nil
}

func encodeCreateServiceAccountRequest(
    req *CreateServiceAccountInputBody,
    r *http.Request,
50 unmodified lines

return nil
}

func encodePatchRepoCIWebhookRequest(
    req *PatchRepoCIWebhookInputBody,
    r *http.Request,
) error {
    const contentType = "application/json"
    e := new(jx.Encoder)
    {
        req.Encode(e)
    }
    encoded := e.Bytes()
    ht.SetBody(r, bytes.NewReader(encoded), contentType)
    return nil
}

func encodeSetRepoVisibilityRequest(
    req *SetRepoVisibilityInputBody,
    r *http.Request,
7 unmodified lines

ht.SetBody(r, bytes.NewReader(encoded), contentType)
    return nil
}

func encodeUpdateMeRequest(
    req *UpdateMeInputBody,
    r *http.Request,
) error {
    const contentType = "application/json"
    e := new(jx.Encoder)
    {
        req.Encode(e)
    }
    encoded := e.Bytes()
    ht.SetBody(r, bytes.NewReader(encoded), contentType)
    return nil
}

Minternal/coreapi/oas_request_encoders_gen.go+28/-14

8 unmodified lines

9
10
11
12
13
14
15
16
17
172 unmodified lines

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
418 unmodified lines

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
128 unmodified lines

891
892
893
749
894
895
751
752
753
896
897
898
899
900
901
244 unmodified lines

1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
45 unmodified lines

1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
178 unmodified lines

1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
510 unmodified lines

2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
1163 unmodified lines

3384
3385
3386
2924
3387
3388
3389
3390
26 unmodified lines

3417
3418
3419
2957
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
310 unmodified lines

3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
537 unmodified lines

4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
474 unmodified lines

5055
5056
5057
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379

8 unmodified lines

"github.com/go-faster/errors"
    "github.com/go-faster/jx"
    "github.com/ogen-go/ogen/conv"
    "github.com/ogen-go/ogen/ogenerrors"
    "github.com/ogen-go/ogen/uri"
    "github.com/ogen-go/ogen/validate"
)

172 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeCancelDeletionResponse(resp *http.Response) (res *CancelDeletionOK, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        return &CancelDeletionOK{}, nil
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response ErrorModel
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            return &ErrorModelStatusCode{
                StatusCode: resp.StatusCode,
                Response:   response,
            }, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }()
    if err != nil {
        return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode)
    }
    return res, errors.Wrap(defRes, "error")
}

func decodeCreateBindingResponse(resp *http.Response) (res *Binding, _ error) {
    switch resp.StatusCode {
    case 201:
418 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeCreateRepoCIWebhookResponse(resp *http.Response) (res *CIWebhookView, _ error) {
    switch resp.StatusCode {
    case 201:
        // Code 201.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response CIWebhookView
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            // Validate response.
            if err := func() error {
                if err := response.Validate(); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return res, errors.Wrap(err, "validate")
            }
            return &response, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeCreateServiceAccountResponse(resp *http.Response) (res *ServiceAccount, _ error) {
    switch resp.StatusCode {
    case 201:
128 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeDeleteMeResponse(resp *http.Response) (res *DeleteMeNoContent, _ error) {
func decodeDeleteMeResponse(resp *http.Response) (res *DeleteMeAccepted, _ error) {
    switch resp.StatusCode {
    case 204:
        // Code 204.
        return &DeleteMeNoContent{}, nil
    case 202:
        // Code 202.
        return &DeleteMeAccepted{}, nil
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
244 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeDeleteRepoCIWebhookResponse(resp *http.Response) (res *DeleteRepoCIWebhookNoContent, _ error) {
    switch resp.StatusCode {
    case 204:
        // Code 204.
        return &DeleteRepoCIWebhookNoContent{}, nil
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeDeleteServiceAccountResponse(resp *http.Response) (res *DeleteServiceAccountNoContent, _ error) {
    switch resp.StatusCode {
    case 204:
45 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeGetDeletionPreviewResponse(resp *http.Response) (res *GetDeletionPreviewOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response GetDeletionPreviewOutputBody
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            // Validate response.
            if err := func() error {
                if err := response.Validate(); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return res, errors.Wrap(err, "validate")
            }
            return &response, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeGetMeResponse(resp *http.Response) (res *GetMeOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
178 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeGetOnboardingStatusResponse(resp *http.Response) (res *GetOnboardingStatusOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response GetOnboardingStatusOutputBody
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            return &response, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeGetOrgResponse(resp *http.Response) (res *Org, _ error) {
    switch resp.StatusCode {
    case 200:
510 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeGetTopologyResponse(resp *http.Response) (res *GetTopologyOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response GetTopologyOutputBody
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            // Validate response.
            if err := func() error {
                if err := response.Validate(); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return res, errors.Wrap(err, "validate")
            }
            return &response, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeGetVersionResponse(resp *http.Response) (res *GetVersionOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
1163 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeListOrgsResponse(resp *http.Response) (res *ListOrgsOutputBody, _ error) {
func decodeListOrgsResponse(resp *http.Response) (res *ListOrgsOutputBodyHeaders, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
26 unmodified lines

}
                return res, err
            }
            return &response, nil
            var wrapper ListOrgsOutputBodyHeaders
            wrapper.Response = response
            h := uri.NewHeaderDecoder(resp.Header)
            // Parse "Cache-Control" header.
            {
                cfg := uri.HeaderParameterDecodingConfig{
                    Name:    "Cache-Control",
                    Explode: false,
                }
                if err := func() error {
                    if err := h.HasParam(cfg); err == nil {
                        if err := h.DecodeParam(cfg, func(d uri.Decoder) error {
                            var wrapperDotCacheControlVal string
                            if err := func() error {
                                val, err := d.DecodeValue()
                                if err != nil {
                                    return err
                                }

c, err := conv.ToString(val)
                                if err != nil {
                                    return err
                                }

wrapperDotCacheControlVal = c
                                return nil
                            }(); err != nil {
                                return err
                            }
                            wrapper.CacheControl.SetTo(wrapperDotCacheControlVal)
                            return nil
                        }); err != nil {
                            return err
                        }
                    }
                    return nil
                }(); err != nil {
                    return res, errors.Wrap(err, "parse Cache-Control header")
                }
            }
            // Parse "ETag" header.
            {
                cfg := uri.HeaderParameterDecodingConfig{
                    Name:    "ETag",
                    Explode: false,
                }
                if err := func() error {
                    if err := h.HasParam(cfg); err == nil {
                        if err := h.DecodeParam(cfg, func(d uri.Decoder) error {
                            var wrapperDotETagVal string
                            if err := func() error {
                                val, err := d.DecodeValue()
                                if err != nil {
                                    return err
                                }

c, err := conv.ToString(val)
                                if err != nil {
                                    return err
                                }

wrapperDotETagVal = c
                                return nil
                            }(); err != nil {
                                return err
                            }
                            wrapper.ETag.SetTo(wrapperDotETagVal)
                            return nil
                        }); err != nil {
                            return err
                        }
                    }
                    return nil
                }(); err != nil {
                    return res, errors.Wrap(err, "parse ETag header")
                }
            }
            // Parse "Vary" header.
            {
                cfg := uri.HeaderParameterDecodingConfig{
                    Name:    "Vary",
                    Explode: false,
                }
                if err := func() error {
                    if err := h.HasParam(cfg); err == nil {
                        if err := h.DecodeParam(cfg, func(d uri.Decoder) error {
                            var wrapperDotVaryVal string
                            if err := func() error {
                                val, err := d.DecodeValue()
                                if err != nil {
                                    return err
                                }

c, err := conv.ToString(val)
                                if err != nil {
                                    return err
                                }

wrapperDotVaryVal = c
                                return nil
                            }(); err != nil {
                                return err
                            }
                            wrapper.Vary.SetTo(wrapperDotVaryVal)
                            return nil
                        }); err != nil {
                            return err
                        }
                    }
                    return nil
                }(); err != nil {
                    return res, errors.Wrap(err, "parse Vary header")
                }
            }
            return &wrapper, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
310 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodeListRepoCIWebhooksResponse(resp *http.Response) (res *ListRepoCIWebhooksOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response ListRepoCIWebhooksOutputBody
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            // Validate response.
            if err := func() error {
                if err := response.Validate(); err != nil {
                    return err
                }
                return nil
            }(); err != nil {
                return res, errors.Wrap(err, "validate")
            }
            return &response, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeListRepoGrantsResponse(resp *http.Response) (res *ListRepoGrantsOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
537 unmodified lines

return res, errors.Wrap(defRes, "error")
}

func decodePatchRepoCIWebhookResponse(resp *http.Response) (res *CIWebhookView, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

func decodeRemoveOrgMemberResponse(resp *http.Response) (res *RemoveOrgMemberNoContent, _ error) {
    switch resp.StatusCode {
    case 204:
474 unmodified lines

}
    return res, errors.Wrap(defRes, "error")
}

func decodeUpdateMeResponse(resp *http.Response) (res *UpdateMeOutputBody, _ error) {
    switch resp.StatusCode {
    case 200:
        // Code 200.
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

var response UpdateMeOutputBody
            if err := func() error {
                if err := response.Decode(d); err != nil {
                    return err
                }
                if err := d.Skip(); err != io.EOF {
                    return errors.New("unexpected trailing data")
                }
                return nil
            }(); err != nil {
                err = &ogenerrors.DecodeBodyError{
                    ContentType: ct,
                    Body:        buf,
                    Err:         err,
                }
                return res, err
            }
            return &response, nil
        default:
            return res, validate.InvalidContentType(ct)
        }
    }
    // Convenient error response.
    defRes, err := func() (res *ErrorModelStatusCode, err error) {
        ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
        if err != nil {
            return res, errors.Wrap(err, "parse media type")
        }
        switch {
        case ct == "application/problem+json":
            buf, err := io.ReadAll(resp.Body)
            if err != nil {
                return res, err
            }
            d := jx.DecodeBytes(buf)

Minternal/coreapi/oas\_response\_decoders\_gen.go+767/-89

649 unmodified lines

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 438 unmodified lines

1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 187 unmodified lines

1598 1599 1600 1290 1601 1602 1603 1604 1605 97 unmodified lines

1703 1704 1705 1394 1395 1706 1707 1708 1709 1710 38 unmodified lines

1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 193 unmodified lines

2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 1648 1649 2410 2411 2412 2413 2414 2415 2416 12 unmodified lines

2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 34 unmodified lines

2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 83 unmodified lines

2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 177 unmodified lines

2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 437 unmodified lines

3293 3294 3295 2423 2424 2425 3296 3297 3298 3299 3300 3301 3302 2 unmodified lines

3305 3306 3307 3308 3309 3310 3311 6 unmodified lines

3318 3319 3320 3321 3322 3323 3324 3325 11 unmodified lines

3337 3338 3339 3340 3341 3342 3343 3344 3345 887 unmodified lines

4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 199 unmodified lines

4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 115 unmodified lines

4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 544 unmodified lines

5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 4234 4235 5303 5304 5305 5306 5307 5308 5309 10 unmodified lines

5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 24 unmodified lines

5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 1327 unmodified lines

6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 40 unmodified lines

6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 270 unmodified lines

7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 179 unmodified lines

7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 229 unmodified lines

7655 7656 7657 7658 7659 7660 7661 3 unmodified lines

7665 7666 7667 7668 7669 7670 7671 14 unmodified lines

7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 39 unmodified lines

7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 24 unmodified lines

7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 39 unmodified lines

7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 20 unmodified lines

7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 77 unmodified lines

8031 8032 8033 6615 6616 6617 6618 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 1 unmodified line

8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 39 unmodified lines

8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 52 unmodified lines

8159 8160 8161 6729 6730 6731 6732 8162 8163 8164 8165 8166 8167 8168 8169 8170 2 unmodified lines

8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 9 unmodified lines

8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 4 unmodified lines

8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 9 unmodified lines

8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 10 unmodified lines

8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 662 unmodified lines

8972 8973 8974 7465 7466 7467 7468 7469 7470 7471 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 7474 7475 7476 8987 8988 8989 8990 8991 7479 7480 7481 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 7485 9013 9014 9015 9016 7489 7490 7491 9017 9018 9019 9020 9021 7494 7495 7496 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 7500 9043 9044 9045 9046 7504 9047 9048 7506 9049 9050 9051 9052 2 unmodified lines

9055 9056 9057 7515 7516 7517 7518 7519 7520 9058 9059 9060 9061 9062 9063 9064 9065 9066 7523 7524 7525 9067 9068 9069 9070 9071 7528 7529 7530 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 7534 9083 9084 9085 9086 7538 7539 7540 9087 9088 9089 9090 9091 7543 7544 7545 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 7549 9103 9104 9105 9106 7553 9107 9108 7555 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274

649 unmodified lines

return m }

// Ref: #/components/schemas/CIWebhookView type CIWebhookView struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" BkOrganization string json:"bk_organization" BkPipeline string json:"bk_pipeline" CreatedAt time.Time json:"created_at" DisplayName string json:"display_name" Enabled bool json:"enabled" Events []string json:"events" ID string json:"id" Provider string json:"provider" RefFilter string json:"ref_filter" RepoID string json:"repo_id" UpdatedAt time.Time json:"updated_at" AdditionalProps CIWebhookViewAdditional }

// GetSchema returns the value of Schema. func (s *CIWebhookView) GetSchema() OptURI { return s.Schema }

// GetBkOrganization returns the value of BkOrganization. func (s *CIWebhookView) GetBkOrganization() string { return s.BkOrganization }

// GetBkPipeline returns the value of BkPipeline. func (s *CIWebhookView) GetBkPipeline() string { return s.BkPipeline }

// GetCreatedAt returns the value of CreatedAt. func (s *CIWebhookView) GetCreatedAt() time.Time { return s.CreatedAt }

// GetDisplayName returns the value of DisplayName. func (s *CIWebhookView) GetDisplayName() string { return s.DisplayName }

// GetEnabled returns the value of Enabled. func (s *CIWebhookView) GetEnabled() bool { return s.Enabled }

// GetEvents returns the value of Events. func (s *CIWebhookView) GetEvents() []string { return s.Events }

// GetID returns the value of ID. func (s *CIWebhookView) GetID() string { return s.ID }

// GetProvider returns the value of Provider. func (s *CIWebhookView) GetProvider() string { return s.Provider }

// GetRefFilter returns the value of RefFilter. func (s *CIWebhookView) GetRefFilter() string { return s.RefFilter }

// GetRepoID returns the value of RepoID. func (s *CIWebhookView) GetRepoID() string { return s.RepoID }

// GetUpdatedAt returns the value of UpdatedAt. func (s *CIWebhookView) GetUpdatedAt() time.Time { return s.UpdatedAt }

// GetAdditionalProps returns the value of AdditionalProps. func (s *CIWebhookView) GetAdditionalProps() CIWebhookViewAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *CIWebhookView) SetSchema(val OptURI) { s.Schema = val }

// SetBkOrganization sets the value of BkOrganization. func (s *CIWebhookView) SetBkOrganization(val string) { s.BkOrganization = val }

// SetBkPipeline sets the value of BkPipeline. func (s *CIWebhookView) SetBkPipeline(val string) { s.BkPipeline = val }

// SetCreatedAt sets the value of CreatedAt. func (s *CIWebhookView) SetCreatedAt(val time.Time) { s.CreatedAt = val }

// SetDisplayName sets the value of DisplayName. func (s *CIWebhookView) SetDisplayName(val string) { s.DisplayName = val }

// SetEnabled sets the value of Enabled. func (s *CIWebhookView) SetEnabled(val bool) { s.Enabled = val }

// SetEvents sets the value of Events. func (s *CIWebhookView) SetEvents(val []string) { s.Events = val }

// SetID sets the value of ID. func (s *CIWebhookView) SetID(val string) { s.ID = val }

// SetProvider sets the value of Provider. func (s *CIWebhookView) SetProvider(val string) { s.Provider = val }

// SetRefFilter sets the value of RefFilter. func (s *CIWebhookView) SetRefFilter(val string) { s.RefFilter = val }

// SetRepoID sets the value of RepoID. func (s *CIWebhookView) SetRepoID(val string) { s.RepoID = val }

// SetUpdatedAt sets the value of UpdatedAt. func (s *CIWebhookView) SetUpdatedAt(val time.Time) { s.UpdatedAt = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *CIWebhookView) SetAdditionalProps(val CIWebhookViewAdditional) { s.AdditionalProps = val }

type CIWebhookViewAdditional map[string]jx.Raw

func (s *CIWebhookViewAdditional) init() CIWebhookViewAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// CancelDeletionOK is response for CancelDeletion operation. type CancelDeletionOK struct{}

// Ref: #/components/schemas/Cluster type Cluster struct { ApiUrl OptString json:"apiUrl" 438 unmodified lines

} }

// Ref: #/components/schemas/CreateRepoCIWebhookInputBody type CreateRepoCIWebhookInputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" BkClusterID string json:"bk_cluster_id" BkOrganization string json:"bk_organization" BkPipeline OptString json:"bk_pipeline" DisplayName OptString json:"display_name" Events []string json:"events" Provider CreateRepoCIWebhookInputBodyProvider json:"provider" RefFilter OptString json:"ref_filter" AdditionalProps CreateRepoCIWebhookInputBodyAdditional }

// GetSchema returns the value of Schema. func (s *CreateRepoCIWebhookInputBody) GetSchema() OptURI { return s.Schema }

// GetBkClusterID returns the value of BkClusterID. func (s *CreateRepoCIWebhookInputBody) GetBkClusterID() string { return s.BkClusterID }

// GetBkOrganization returns the value of BkOrganization. func (s *CreateRepoCIWebhookInputBody) GetBkOrganization() string { return s.BkOrganization }

// GetBkPipeline returns the value of BkPipeline. func (s *CreateRepoCIWebhookInputBody) GetBkPipeline() OptString { return s.BkPipeline }

// GetDisplayName returns the value of DisplayName. func (s *CreateRepoCIWebhookInputBody) GetDisplayName() OptString { return s.DisplayName }

// GetEvents returns the value of Events. func (s *CreateRepoCIWebhookInputBody) GetEvents() []string { return s.Events }

// GetProvider returns the value of Provider. func (s *CreateRepoCIWebhookInputBody) GetProvider() CreateRepoCIWebhookInputBodyProvider { return s.Provider }

// GetRefFilter returns the value of RefFilter. func (s *CreateRepoCIWebhookInputBody) GetRefFilter() OptString { return s.RefFilter }

// GetAdditionalProps returns the value of AdditionalProps. func (s *CreateRepoCIWebhookInputBody) GetAdditionalProps() CreateRepoCIWebhookInputBodyAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *CreateRepoCIWebhookInputBody) SetSchema(val OptURI) { s.Schema = val }

// SetBkClusterID sets the value of BkClusterID. func (s *CreateRepoCIWebhookInputBody) SetBkClusterID(val string) { s.BkClusterID = val }

// SetBkOrganization sets the value of BkOrganization. func (s *CreateRepoCIWebhookInputBody) SetBkOrganization(val string) { s.BkOrganization = val }

// SetBkPipeline sets the value of BkPipeline. func (s *CreateRepoCIWebhookInputBody) SetBkPipeline(val OptString) { s.BkPipeline = val }

// SetDisplayName sets the value of DisplayName. func (s *CreateRepoCIWebhookInputBody) SetDisplayName(val OptString) { s.DisplayName = val }

// SetEvents sets the value of Events. func (s *CreateRepoCIWebhookInputBody) SetEvents(val []string) { s.Events = val }

// SetProvider sets the value of Provider. func (s *CreateRepoCIWebhookInputBody) SetProvider(val CreateRepoCIWebhookInputBodyProvider) { s.Provider = val }

// SetRefFilter sets the value of RefFilter. func (s *CreateRepoCIWebhookInputBody) SetRefFilter(val OptString) { s.RefFilter = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *CreateRepoCIWebhookInputBody) SetAdditionalProps(val CreateRepoCIWebhookInputBodyAdditional) { s.AdditionalProps = val }

type CreateRepoCIWebhookInputBodyAdditional map[string]jx.Raw

func (s *CreateRepoCIWebhookInputBodyAdditional) init() CreateRepoCIWebhookInputBodyAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

type CreateRepoCIWebhookInputBodyProvider string

const ( CreateRepoCIWebhookInputBodyProviderBuildkite CreateRepoCIWebhookInputBodyProvider = "buildkite" )

// AllValues returns all CreateRepoCIWebhookInputBodyProvider values. func (CreateRepoCIWebhookInputBodyProvider) AllValues() []CreateRepoCIWebhookInputBodyProvider { return []CreateRepoCIWebhookInputBodyProvider{ CreateRepoCIWebhookInputBodyProviderBuildkite, } }

// MarshalText implements encoding.TextMarshaler. func (s CreateRepoCIWebhookInputBodyProvider) MarshalText() ([]byte, error) { switch s { case CreateRepoCIWebhookInputBodyProviderBuildkite: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } }

// UnmarshalText implements encoding.TextUnmarshaler. func (s *CreateRepoCIWebhookInputBodyProvider) UnmarshalText(data []byte) error { switch CreateRepoCIWebhookInputBodyProvider(data) { case CreateRepoCIWebhookInputBodyProviderBuildkite: *s = CreateRepoCIWebhookInputBodyProviderBuildkite return nil default: return errors.Errorf("invalid value: %q", data) } }

// Ref: #/components/schemas/CreateRepoInputBody type CreateRepoInputBody struct { // A URL to the JSON Schema for this object. 187 unmodified lines

Schema OptURI json:"$schema" // True on fresh creation; false when an existing mirror was returned. Created bool json:"created" // True when the upstream has no refs to clone. // Deprecated: always false. Poll the mirror status instead — an empty upstream still reaches // 'ready'. Empty bool json:"empty" MirrorId string json:"mirrorId" MirrorUrl string json:"mirrorUrl" 97 unmodified lines

// DeleteBindingNoContent is response for DeleteBinding operation. type DeleteBindingNoContent struct{}

// DeleteMeNoContent is response for DeleteMe operation. type DeleteMeNoContent struct{} // DeleteMeAccepted is response for DeleteMe operation. type DeleteMeAccepted struct{}

// DeleteMirrorNoContent is response for DeleteMirror operation. type DeleteMirrorNoContent struct{} 38 unmodified lines

// DeleteProjectNoContent is response for DeleteProject operation. type DeleteProjectNoContent struct{}

// DeleteRepoCIWebhookNoContent is response for DeleteRepoCIWebhook operation. type DeleteRepoCIWebhookNoContent struct{}

// DeleteRepoNoContent is response for DeleteRepo operation. type DeleteRepoNoContent struct{}

// DeleteServiceAccountNoContent is response for DeleteServiceAccount operation. type DeleteServiceAccountNoContent struct{}

// Ref: #/components/schemas/DeletionBlocker type DeletionBlocker struct { // True when the account can self-serve delete this org (it is the only member and the org has no // projects). When false, the org has other members or data and must be transferred/removed via // support. The UI should offer a delete action only when this is true. Deletable bool json:"deletable" // Resource ID (org ULID). ID string json:"id" // Blocker kind. Currently always 'owned_org'. Kind DeletionBlockerKind json:"kind" // Copy explaining how to clear the blocker. Message string json:"message" // Human-readable resource name. Name string json:"name" AdditionalProps DeletionBlockerAdditional }

// GetDeletable returns the value of Deletable. func (s *DeletionBlocker) GetDeletable() bool { return s.Deletable }

// GetID returns the value of ID. func (s *DeletionBlocker) GetID() string { return s.ID }

// GetKind returns the value of Kind. func (s *DeletionBlocker) GetKind() DeletionBlockerKind { return s.Kind }

// GetMessage returns the value of Message. func (s *DeletionBlocker) GetMessage() string { return s.Message }

// GetName returns the value of Name. func (s *DeletionBlocker) GetName() string { return s.Name }

// GetAdditionalProps returns the value of AdditionalProps. func (s *DeletionBlocker) GetAdditionalProps() DeletionBlockerAdditional { return s.AdditionalProps }

// SetDeletable sets the value of Deletable. func (s *DeletionBlocker) SetDeletable(val bool) { s.Deletable = val }

// SetID sets the value of ID. func (s *DeletionBlocker) SetID(val string) { s.ID = val }

// SetKind sets the value of Kind. func (s *DeletionBlocker) SetKind(val DeletionBlockerKind) { s.Kind = val }

// SetMessage sets the value of Message. func (s *DeletionBlocker) SetMessage(val string) { s.Message = val }

// SetName sets the value of Name. func (s *DeletionBlocker) SetName(val string) { s.Name = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *DeletionBlocker) SetAdditionalProps(val DeletionBlockerAdditional) { s.AdditionalProps = val }

type DeletionBlockerAdditional map[string]jx.Raw

func (s *DeletionBlockerAdditional) init() DeletionBlockerAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Blocker kind. Currently always 'owned_org'. type DeletionBlockerKind string

const ( DeletionBlockerKindOwnedOrg DeletionBlockerKind = "owned_org" )

// AllValues returns all DeletionBlockerKind values. func (DeletionBlockerKind) AllValues() []DeletionBlockerKind { return []DeletionBlockerKind{ DeletionBlockerKindOwnedOrg, } }

// MarshalText implements encoding.TextMarshaler. func (s DeletionBlockerKind) MarshalText() ([]byte, error) { switch s { case DeletionBlockerKindOwnedOrg: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } }

// UnmarshalText implements encoding.TextUnmarshaler. func (s *DeletionBlockerKind) UnmarshalText(data []byte) error { switch DeletionBlockerKind(data) { case DeletionBlockerKindOwnedOrg: *s = DeletionBlockerKindOwnedOrg return nil default: return errors.Errorf("invalid value: %q", data) } }

// Ref: #/components/schemas/DeletionGrant type DeletionGrant struct { // Region the repo lives in (us/eu/au); empty for project grants. Jurisdiction OptString json:"jurisdiction" // Granted resource ULID. ResourceId string json:"resourceId" // Granted resource name. ResourceName string json:"resourceName" // Granted resource type. ResourceType DeletionGrantResourceType json:"resourceType" // Granted role. Role string json:"role" AdditionalProps DeletionGrantAdditional }

// GetJurisdiction returns the value of Jurisdiction. func (s *DeletionGrant) GetJurisdiction() OptString { return s.Jurisdiction }

// GetResourceId returns the value of ResourceId. func (s *DeletionGrant) GetResourceId() string { return s.ResourceId }

// GetResourceName returns the value of ResourceName. func (s *DeletionGrant) GetResourceName() string { return s.ResourceName }

// GetResourceType returns the value of ResourceType. func (s *DeletionGrant) GetResourceType() DeletionGrantResourceType { return s.ResourceType }

// GetRole returns the value of Role. func (s *DeletionGrant) GetRole() string { return s.Role }

// GetAdditionalProps returns the value of AdditionalProps. func (s *DeletionGrant) GetAdditionalProps() DeletionGrantAdditional { return s.AdditionalProps }

// SetJurisdiction sets the value of Jurisdiction. func (s *DeletionGrant) SetJurisdiction(val OptString) { s.Jurisdiction = val }

// SetResourceId sets the value of ResourceId. func (s *DeletionGrant) SetResourceId(val string) { s.ResourceId = val }

// SetResourceName sets the value of ResourceName. func (s *DeletionGrant) SetResourceName(val string) { s.ResourceName = val }

// SetResourceType sets the value of ResourceType. func (s *DeletionGrant) SetResourceType(val DeletionGrantResourceType) { s.ResourceType = val }

// SetRole sets the value of Role. func (s *DeletionGrant) SetRole(val string) { s.Role = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *DeletionGrant) SetAdditionalProps(val DeletionGrantAdditional) { s.AdditionalProps = val }

type DeletionGrantAdditional map[string]jx.Raw

func (s *DeletionGrantAdditional) init() DeletionGrantAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Granted resource type. type DeletionGrantResourceType string

const ( DeletionGrantResourceTypeProject DeletionGrantResourceType = "project" DeletionGrantResourceTypeRepo DeletionGrantResourceType = "repo" )

// AllValues returns all DeletionGrantResourceType values. func (DeletionGrantResourceType) AllValues() []DeletionGrantResourceType { return []DeletionGrantResourceType{ DeletionGrantResourceTypeProject, DeletionGrantResourceTypeRepo, } }

// MarshalText implements encoding.TextMarshaler. func (s DeletionGrantResourceType) MarshalText() ([]byte, error) { switch s { case DeletionGrantResourceTypeProject: return []byte(s), nil case DeletionGrantResourceTypeRepo: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } }

// UnmarshalText implements encoding.TextUnmarshaler. func (s *DeletionGrantResourceType) UnmarshalText(data []byte) error { switch DeletionGrantResourceType(data) { case DeletionGrantResourceTypeProject: *s = DeletionGrantResourceTypeProject return nil case DeletionGrantResourceTypeRepo: *s = DeletionGrantResourceTypeRepo return nil default: return errors.Errorf("invalid value: %q", data) } }

// Ref: #/components/schemas/DeletionMembership type DeletionMembership struct { // Org name. Name string json:"name" // Org ULID. OrgId string json:"orgId" AdditionalProps DeletionMembershipAdditional }

// GetName returns the value of Name. func (s *DeletionMembership) GetName() string { return s.Name }

// GetOrgId returns the value of OrgId. func (s *DeletionMembership) GetOrgId() string { return s.OrgId }

// GetAdditionalProps returns the value of AdditionalProps. func (s *DeletionMembership) GetAdditionalProps() DeletionMembershipAdditional { return s.AdditionalProps }

// SetName sets the value of Name. func (s *DeletionMembership) SetName(val string) { s.Name = val }

// SetOrgId sets the value of OrgId. func (s *DeletionMembership) SetOrgId(val string) { s.OrgId = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *DeletionMembership) SetAdditionalProps(val DeletionMembershipAdditional) { s.AdditionalProps = val }

type DeletionMembershipAdditional map[string]jx.Raw

func (s *DeletionMembershipAdditional) init() DeletionMembershipAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/DeletionRepo type DeletionRepo struct { // Cluster slug the repo is placed on, if known. Cluster OptString json:"cluster" // Repo ULID. ID string json:"id" // Repo name. Name string json:"name" AdditionalProps DeletionRepoAdditional }

// GetCluster returns the value of Cluster. func (s *DeletionRepo) GetCluster() OptString { return s.Cluster }

// GetID returns the value of ID. func (s *DeletionRepo) GetID() string { return s.ID }

// GetName returns the value of Name. func (s *DeletionRepo) GetName() string { return s.Name }

// GetAdditionalProps returns the value of AdditionalProps. func (s *DeletionRepo) GetAdditionalProps() DeletionRepoAdditional { return s.AdditionalProps }

// SetCluster sets the value of Cluster. func (s *DeletionRepo) SetCluster(val OptString) { s.Cluster = val }

// SetID sets the value of ID. func (s *DeletionRepo) SetID(val string) { s.ID = val }

// SetName sets the value of Name. func (s *DeletionRepo) SetName(val string) { s.Name = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *DeletionRepo) SetAdditionalProps(val DeletionRepoAdditional) { s.AdditionalProps = val }

type DeletionRepoAdditional map[string]jx.Raw

func (s *DeletionRepoAdditional) init() DeletionRepoAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/ErrorDetail type ErrorDetail struct { // Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'. 193 unmodified lines

s.Response = val }

// Ref: #/components/schemas/GetDeletionPreviewOutputBody type GetDeletionPreviewOutputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" // True when Blockers is non-empty: DELETE /me will be refused with 409. Blocked bool json:"blocked" // Resources that must be resolved before deletion (owned orgs). Blockers []DeletionBlocker json:"blockers" WillDelete WillDeleteStruct json:"willDelete" WillUnlink WillUnlinkStruct json:"willUnlink" AdditionalProps GetDeletionPreviewOutputBodyAdditional }

// GetSchema returns the value of Schema. func (s *GetDeletionPreviewOutputBody) GetSchema() OptURI { return s.Schema }

// GetBlocked returns the value of Blocked. func (s *GetDeletionPreviewOutputBody) GetBlocked() bool { return s.Blocked }

// GetBlockers returns the value of Blockers. func (s *GetDeletionPreviewOutputBody) GetBlockers() []DeletionBlocker { return s.Blockers }

// GetWillDelete returns the value of WillDelete. func (s *GetDeletionPreviewOutputBody) GetWillDelete() WillDeleteStruct { return s.WillDelete }

// GetWillUnlink returns the value of WillUnlink. func (s *GetDeletionPreviewOutputBody) GetWillUnlink() WillUnlinkStruct { return s.WillUnlink }

// GetAdditionalProps returns the value of AdditionalProps. func (s *GetDeletionPreviewOutputBody) GetAdditionalProps() GetDeletionPreviewOutputBodyAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *GetDeletionPreviewOutputBody) SetSchema(val OptURI) { s.Schema = val }

// SetBlocked sets the value of Blocked. func (s *GetDeletionPreviewOutputBody) SetBlocked(val bool) { s.Blocked = val }

// SetBlockers sets the value of Blockers. func (s *GetDeletionPreviewOutputBody) SetBlockers(val []DeletionBlocker) { s.Blockers = val }

// SetWillDelete sets the value of WillDelete. func (s *GetDeletionPreviewOutputBody) SetWillDelete(val WillDeleteStruct) { s.WillDelete = val }

// SetWillUnlink sets the value of WillUnlink. func (s *GetDeletionPreviewOutputBody) SetWillUnlink(val WillUnlinkStruct) { s.WillUnlink = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *GetDeletionPreviewOutputBody) SetAdditionalProps(val GetDeletionPreviewOutputBodyAdditional) { s.AdditionalProps = val }

type GetDeletionPreviewOutputBodyAdditional map[string]jx.Raw

func (s *GetDeletionPreviewOutputBodyAdditional) init() GetDeletionPreviewOutputBodyAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/GetMeOutputBody type GetMeOutputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" Auth MeAuth json:"auth" Schema OptURI json:"$schema" Auth MeAuth json:"auth" // Present only when a deletion is pending; carries the cooldown window. Deletion OptMeDeletion json:"deletion" Global MeGlobal json:"global" Jurisdiction OptString json:"jurisdiction" Mode OptGetMeOutputBodyMode json:"mode" 12 unmodified lines

return s.Auth }

// GetDeletion returns the value of Deletion. func (s *GetMeOutputBody) GetDeletion() OptMeDeletion { return s.Deletion }

// GetGlobal returns the value of Global. func (s *GetMeOutputBody) GetGlobal() MeGlobal { return s.Global 34 unmodified lines

s.Auth = val }

// SetDeletion sets the value of Deletion. func (s *GetMeOutputBody) SetDeletion(val OptMeDeletion) { s.Deletion = val }

// SetGlobal sets the value of Global. func (s *GetMeOutputBody) SetGlobal(val MeGlobal) { s.Global = val 83 unmodified lines

} }

// Ref: #/components/schemas/GetOnboardingStatusOutputBody type GetOnboardingStatusOutputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" // True when the account has no mirrored repo yet and should be sent through onboarding. NeedsOnboarding bool json:"needsOnboarding" AdditionalProps GetOnboardingStatusOutputBodyAdditional }

// GetSchema returns the value of Schema. func (s *GetOnboardingStatusOutputBody) GetSchema() OptURI { return s.Schema }

// GetNeedsOnboarding returns the value of NeedsOnboarding. func (s *GetOnboardingStatusOutputBody) GetNeedsOnboarding() bool { return s.NeedsOnboarding }

// GetAdditionalProps returns the value of AdditionalProps. func (s *GetOnboardingStatusOutputBody) GetAdditionalProps() GetOnboardingStatusOutputBodyAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *GetOnboardingStatusOutputBody) SetSchema(val OptURI) { s.Schema = val }

// SetNeedsOnboarding sets the value of NeedsOnboarding. func (s *GetOnboardingStatusOutputBody) SetNeedsOnboarding(val bool) { s.NeedsOnboarding = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *GetOnboardingStatusOutputBody) SetAdditionalProps(val GetOnboardingStatusOutputBodyAdditional) { s.AdditionalProps = val }

type GetOnboardingStatusOutputBodyAdditional map[string]jx.Raw

func (s *GetOnboardingStatusOutputBodyAdditional) init() GetOnboardingStatusOutputBodyAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/GetPermissionsOutputBody type GetPermissionsOutputBody struct { // A URL to the JSON Schema for this object. 177 unmodified lines

} }

// Ref: #/components/schemas/GetTopologyOutputBody type GetTopologyOutputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" Jurisdictions []TopologyJurisdiction json:"jurisdictions" AdditionalProps GetTopologyOutputBodyAdditional }

// GetSchema returns the value of Schema. func (s *GetTopologyOutputBody) GetSchema() OptURI { return s.Schema }

// GetJurisdictions returns the value of Jurisdictions. func (s *GetTopologyOutputBody) GetJurisdictions() []TopologyJurisdiction { return s.Jurisdictions }

// GetAdditionalProps returns the value of AdditionalProps. func (s *GetTopologyOutputBody) GetAdditionalProps() GetTopologyOutputBodyAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *GetTopologyOutputBody) SetSchema(val OptURI) { s.Schema = val }

// SetJurisdictions sets the value of Jurisdictions. func (s *GetTopologyOutputBody) SetJurisdictions(val []TopologyJurisdiction) { s.Jurisdictions = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *GetTopologyOutputBody) SetAdditionalProps(val GetTopologyOutputBodyAdditional) { s.AdditionalProps = val }

type GetTopologyOutputBodyAdditional map[string]jx.Raw

func (s *GetTopologyOutputBodyAdditional) init() GetTopologyOutputBodyAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/GetVersionOutputBody type GetVersionOutputBody struct { // A URL to the JSON Schema for this object. 437 unmodified lines

type GrantRepoAccessInputBodyRole string

const ( GrantRepoAccessInputBodyRoleReader GrantRepoAccessInputBodyRole = "reader" GrantRepoAccessInputBodyRoleWriter GrantRepoAccessInputBodyRole = "writer" GrantRepoAccessInputBodyRoleAdmin GrantRepoAccessInputBodyRole = "admin" GrantRepoAccessInputBodyRoleReader GrantRepoAccessInputBodyRole = "reader" GrantRepoAccessInputBodyRoleWriter GrantRepoAccessInputBodyRole = "writer" GrantRepoAccessInputBodyRoleAdmin GrantRepoAccessInputBodyRole = "admin" GrantRepoAccessInputBodyRoleCiManager GrantRepoAccessInputBodyRole = "ci_manager" )

// AllValues returns all GrantRepoAccessInputBodyRole values. 2 unmodified lines

GrantRepoAccessInputBodyRoleReader, GrantRepoAccessInputBodyRoleWriter, GrantRepoAccessInputBodyRoleAdmin, GrantRepoAccessInputBodyRoleCiManager, } }

6 unmodified lines

return []byte(s), nil case GrantRepoAccessInputBodyRoleAdmin: return []byte(s), nil case GrantRepoAccessInputBodyRoleCiManager: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } 11 unmodified lines

case GrantRepoAccessInputBodyRoleAdmin: *s = GrantRepoAccessInputBodyRoleAdmin return nil case GrantRepoAccessInputBodyRoleCiManager: *s = GrantRepoAccessInputBodyRoleCiManager return nil default: return errors.Errorf("invalid value: %q", data) } 887 unmodified lines

return m }

// ListOrgsOutputBodyHeaders wraps ListOrgsOutputBody with response headers. type ListOrgsOutputBodyHeaders struct { CacheControl OptString ETag OptString Vary OptString Response ListOrgsOutputBody }

// GetCacheControl returns the value of CacheControl. func (s *ListOrgsOutputBodyHeaders) GetCacheControl() OptString { return s.CacheControl }

// GetETag returns the value of ETag. func (s *ListOrgsOutputBodyHeaders) GetETag() OptString { return s.ETag }

// GetVary returns the value of Vary. func (s *ListOrgsOutputBodyHeaders) GetVary() OptString { return s.Vary }

// GetResponse returns the value of Response. func (s *ListOrgsOutputBodyHeaders) GetResponse() ListOrgsOutputBody { return s.Response }

// SetCacheControl sets the value of CacheControl. func (s *ListOrgsOutputBodyHeaders) SetCacheControl(val OptString) { s.CacheControl = val }

// SetETag sets the value of ETag. func (s *ListOrgsOutputBodyHeaders) SetETag(val OptString) { s.ETag = val }

// SetVary sets the value of Vary. func (s *ListOrgsOutputBodyHeaders) SetVary(val OptString) { s.Vary = val }

// SetResponse sets the value of Response. func (s *ListOrgsOutputBodyHeaders) SetResponse(val ListOrgsOutputBody) { s.Response = val }

// Ref: #/components/schemas/ListProjectMembersOutputBody type ListProjectMembersOutputBody struct { // A URL to the JSON Schema for this object. 199 unmodified lines

return m }

// Ref: #/components/schemas/ListRepoCIWebhooksOutputBody type ListRepoCIWebhooksOutputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" Subscriptions []CIWebhookView json:"subscriptions" AdditionalProps ListRepoCIWebhooksOutputBodyAdditional }

// GetSchema returns the value of Schema. func (s *ListRepoCIWebhooksOutputBody) GetSchema() OptURI { return s.Schema }

// GetSubscriptions returns the value of Subscriptions. func (s *ListRepoCIWebhooksOutputBody) GetSubscriptions() []CIWebhookView { return s.Subscriptions }

// GetAdditionalProps returns the value of AdditionalProps. func (s *ListRepoCIWebhooksOutputBody) GetAdditionalProps() ListRepoCIWebhooksOutputBodyAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *ListRepoCIWebhooksOutputBody) SetSchema(val OptURI) { s.Schema = val }

// SetSubscriptions sets the value of Subscriptions. func (s *ListRepoCIWebhooksOutputBody) SetSubscriptions(val []CIWebhookView) { s.Subscriptions = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *ListRepoCIWebhooksOutputBody) SetAdditionalProps(val ListRepoCIWebhooksOutputBodyAdditional) { s.AdditionalProps = val }

type ListRepoCIWebhooksOutputBodyAdditional map[string]jx.Raw

func (s *ListRepoCIWebhooksOutputBodyAdditional) init() ListRepoCIWebhooksOutputBodyAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/ListRepoGrantsOutputBody type ListRepoGrantsOutputBody struct { // A URL to the JSON Schema for this object. 115 unmodified lines

return m }

// Onboarded (default): repos in Entire; all: also include onboardable GitHub candidates. type ListReposScope string

const ( ListReposScopeOnboarded ListReposScope = "onboarded" ListReposScopeAll ListReposScope = "all" )

// AllValues returns all ListReposScope values. func (ListReposScope) AllValues() []ListReposScope { return []ListReposScope{ ListReposScopeOnboarded, ListReposScopeAll, } }

// MarshalText implements encoding.TextMarshaler. func (s ListReposScope) MarshalText() ([]byte, error) { switch s { case ListReposScopeOnboarded: return []byte(s), nil case ListReposScopeAll: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } }

// UnmarshalText implements encoding.TextUnmarshaler. func (s *ListReposScope) UnmarshalText(data []byte) error { switch ListReposScope(data) { case ListReposScopeOnboarded: *s = ListReposScopeOnboarded return nil case ListReposScopeAll: *s = ListReposScopeAll return nil default: return errors.Errorf("invalid value: %q", data) } }

// Ref: #/components/schemas/ListServiceAccountGrantsOutputBody type ListServiceAccountGrantsOutputBody struct { // A URL to the JSON Schema for this object. 544 unmodified lines

return m }

// Ref: #/components/schemas/MeDeletion type MeDeletion struct { // When the cooldown elapses and the account becomes eligible for irreversible hard-deletion. CooldownEndsAt time.Time json:"cooldownEndsAt" // When deletion was requested (deletion_requested_at). RequestedAt time.Time json:"requestedAt" AdditionalProps MeDeletionAdditional }

// GetCooldownEndsAt returns the value of CooldownEndsAt. func (s *MeDeletion) GetCooldownEndsAt() time.Time { return s.CooldownEndsAt }

// GetRequestedAt returns the value of RequestedAt. func (s *MeDeletion) GetRequestedAt() time.Time { return s.RequestedAt }

// GetAdditionalProps returns the value of AdditionalProps. func (s *MeDeletion) GetAdditionalProps() MeDeletionAdditional { return s.AdditionalProps }

// SetCooldownEndsAt sets the value of CooldownEndsAt. func (s *MeDeletion) SetCooldownEndsAt(val time.Time) { s.CooldownEndsAt = val }

// SetRequestedAt sets the value of RequestedAt. func (s *MeDeletion) SetRequestedAt(val time.Time) { s.RequestedAt = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *MeDeletion) SetAdditionalProps(val MeDeletionAdditional) { s.AdditionalProps = val }

type MeDeletionAdditional map[string]jx.Raw

func (s *MeDeletionAdditional) init() MeDeletionAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/MeGlobal type MeGlobal struct { AccountId string json:"accountId" AvatarUrl OptString json:"avatarUrl" AccountId string json:"accountId" AvatarUrl OptString json:"avatarUrl" // When the account was created (accounts.created_at). CreatedAt time.Time json:"createdAt" Handle OptString json:"handle" Handles []MeIdentityHandle json:"handles" HomeJurisdiction OptString json:"homeJurisdiction" 10 unmodified lines

return s.AvatarUrl }

// GetCreatedAt returns the value of CreatedAt. func (s *MeGlobal) GetCreatedAt() time.Time { return s.CreatedAt }

// GetHandle returns the value of Handle. func (s *MeGlobal) GetHandle() OptString { return s.Handle 24 unmodified lines

s.AvatarUrl = val }

// SetCreatedAt sets the value of CreatedAt. func (s *MeGlobal) SetCreatedAt(val time.Time) { s.CreatedAt = val }

// SetHandle sets the value of Handle. func (s *MeGlobal) SetHandle(val OptString) { s.Handle = val 1327 unmodified lines

return d }

// NewOptListReposScope returns new OptListReposScope with value set to v. func NewOptListReposScope(v ListReposScope) OptListReposScope { return OptListReposScope{ Value: v, Set: true, } }

// OptListReposScope is optional ListReposScope. type OptListReposScope struct { Value ListReposScope Set bool }

// IsSet returns true if OptListReposScope was set. func (o OptListReposScope) IsSet() bool { return o.Set }

// Reset unsets value. func (o *OptListReposScope) Reset() { var v ListReposScope o.Value = v o.Set = false }

// SetTo sets value to v. func (o *OptListReposScope) SetTo(v ListReposScope) { o.Set = true o.Value = v }

// Get returns value and boolean that denotes whether value was set. func (o OptListReposScope) Get() (v ListReposScope, ok bool) { if !o.Set { return v, false } return o.Value, true }

// Or returns value if set, or given parameter if does not. func (o OptListReposScope) Or(d ListReposScope) ListReposScope { if v, ok := o.Get(); ok { return v } return d }

// NewOptLookupRefResultOwnerType returns new OptLookupRefResultOwnerType with value set to v. func NewOptLookupRefResultOwnerType(v LookupRefResultOwnerType) OptLookupRefResultOwnerType { return OptLookupRefResultOwnerType{ 40 unmodified lines

return d }

// NewOptMeDeletion returns new OptMeDeletion with value set to v. func NewOptMeDeletion(v MeDeletion) OptMeDeletion { return OptMeDeletion{ Value: v, Set: true, } }

// OptMeDeletion is optional MeDeletion. type OptMeDeletion struct { Value MeDeletion Set bool }

// IsSet returns true if OptMeDeletion was set. func (o OptMeDeletion) IsSet() bool { return o.Set }

// Reset unsets value. func (o *OptMeDeletion) Reset() { var v MeDeletion o.Value = v o.Set = false }

// SetTo sets value to v. func (o *OptMeDeletion) SetTo(v MeDeletion) { o.Set = true o.Value = v }

// Get returns value and boolean that denotes whether value was set. func (o OptMeDeletion) Get() (v MeDeletion, ok bool) { if !o.Set { return v, false } return o.Value, true }

// Or returns value if set, or given parameter if does not. func (o OptMeDeletion) Or(d MeDeletion) MeDeletion { if v, ok := o.Get(); ok { return v } return d }

// NewOptMeRegional returns new OptMeRegional with value set to v. func NewOptMeRegional(v MeRegional) OptMeRegional { return OptMeRegional{ 270 unmodified lines

return d }

// NewOptRepoCandidate returns new OptRepoCandidate with value set to v. func NewOptRepoCandidate(v RepoCandidate) OptRepoCandidate { return OptRepoCandidate{ Value: v, Set: true, } }

// OptRepoCandidate is optional RepoCandidate. type OptRepoCandidate struct { Value RepoCandidate Set bool }

// IsSet returns true if OptRepoCandidate was set. func (o OptRepoCandidate) IsSet() bool { return o.Set }

// Reset unsets value. func (o *OptRepoCandidate) Reset() { var v RepoCandidate o.Value = v o.Set = false }

// SetTo sets value to v. func (o *OptRepoCandidate) SetTo(v RepoCandidate) { o.Set = true o.Value = v }

// Get returns value and boolean that denotes whether value was set. func (o OptRepoCandidate) Get() (v RepoCandidate, ok bool) { if !o.Set { return v, false } return o.Value, true }

// Or returns value if set, or given parameter if does not. func (o OptRepoCandidate) Or(d RepoCandidate) RepoCandidate { if v, ok := o.Get(); ok { return v } return d }

// NewOptString returns new OptString with value set to v. func NewOptString(v string) OptString { return OptString{ 179 unmodified lines

return m }

// Ref: #/components/schemas/PatchRepoCIWebhookInputBody type PatchRepoCIWebhookInputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" DisplayName OptString json:"display_name" Enabled OptBool json:"enabled" Events []string json:"events" RefFilter OptString json:"ref_filter" AdditionalProps PatchRepoCIWebhookInputBodyAdditional }

// GetSchema returns the value of Schema. func (s *PatchRepoCIWebhookInputBody) GetSchema() OptURI { return s.Schema }

// GetDisplayName returns the value of DisplayName. func (s *PatchRepoCIWebhookInputBody) GetDisplayName() OptString { return s.DisplayName }

// GetEnabled returns the value of Enabled. func (s *PatchRepoCIWebhookInputBody) GetEnabled() OptBool { return s.Enabled }

// GetEvents returns the value of Events. func (s *PatchRepoCIWebhookInputBody) GetEvents() []string { return s.Events }

// GetRefFilter returns the value of RefFilter. func (s *PatchRepoCIWebhookInputBody) GetRefFilter() OptString { return s.RefFilter }

// GetAdditionalProps returns the value of AdditionalProps. func (s *PatchRepoCIWebhookInputBody) GetAdditionalProps() PatchRepoCIWebhookInputBodyAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *PatchRepoCIWebhookInputBody) SetSchema(val OptURI) { s.Schema = val }

// SetDisplayName sets the value of DisplayName. func (s *PatchRepoCIWebhookInputBody) SetDisplayName(val OptString) { s.DisplayName = val }

// SetEnabled sets the value of Enabled. func (s *PatchRepoCIWebhookInputBody) SetEnabled(val OptBool) { s.Enabled = val }

// SetEvents sets the value of Events. func (s *PatchRepoCIWebhookInputBody) SetEvents(val []string) { s.Events = val }

// SetRefFilter sets the value of RefFilter. func (s *PatchRepoCIWebhookInputBody) SetRefFilter(val OptString) { s.RefFilter = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *PatchRepoCIWebhookInputBody) SetAdditionalProps(val PatchRepoCIWebhookInputBodyAdditional) { s.AdditionalProps = val }

type PatchRepoCIWebhookInputBodyAdditional map[string]jx.Raw

func (s *PatchRepoCIWebhookInputBodyAdditional) init() PatchRepoCIWebhookInputBodyAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/Project type Project struct { // A URL to the JSON Schema for this object. 229 unmodified lines

Schema OptURI json:"$schema" ClusterHost OptString json:"clusterHost" Foreign OptBool json:"foreign" FullName OptString json:"fullName" ID string json:"id" MirrorSuspended OptBool json:"mirrorSuspended" MirrorSuspendedAt OptString json:"mirrorSuspendedAt" 3 unmodified lines

Path OptString json:"path" ProvisionAttempts OptInt64 json:"provisionAttempts" ProvisionReason OptString json:"provisionReason" RepoGroupId OptString json:"repoGroupId" State OptString json:"state" Visibility OptString json:"visibility" AdditionalProps RepoAdditional 14 unmodified lines

return s.Foreign }

// GetFullName returns the value of FullName. func (s *Repo) GetFullName() OptString { return s.FullName }

// GetID returns the value of ID. func (s *Repo) GetID() string { return s.ID 39 unmodified lines

return s.ProvisionReason }

// GetRepoGroupId returns the value of RepoGroupId. func (s *Repo) GetRepoGroupId() OptString { return s.RepoGroupId }

// GetState returns the value of State. func (s *Repo) GetState() OptString { return s.State 24 unmodified lines

s.Foreign = val }

// SetFullName sets the value of FullName. func (s *Repo) SetFullName(val OptString) { s.FullName = val }

// SetID sets the value of ID. func (s *Repo) SetID(val string) { s.ID = val 39 unmodified lines

s.ProvisionReason = val }

// SetRepoGroupId sets the value of RepoGroupId. func (s *Repo) SetRepoGroupId(val OptString) { s.RepoGroupId = val }

// SetState sets the value of State. func (s *Repo) SetState(val OptString) { s.State = val 20 unmodified lines

return m }

// Ref: #/components/schemas/RepoCandidate type RepoCandidate struct { Access RepoCandidateAccess json:"access" Onboardable bool json:"onboardable" AdditionalProps RepoCandidateAdditional }

// GetAccess returns the value of Access. func (s *RepoCandidate) GetAccess() RepoCandidateAccess { return s.Access }

// GetOnboardable returns the value of Onboardable. func (s *RepoCandidate) GetOnboardable() bool { return s.Onboardable }

// GetAdditionalProps returns the value of AdditionalProps. func (s *RepoCandidate) GetAdditionalProps() RepoCandidateAdditional { return s.AdditionalProps }

// SetAccess sets the value of Access. func (s *RepoCandidate) SetAccess(val RepoCandidateAccess) { s.Access = val }

// SetOnboardable sets the value of Onboardable. func (s *RepoCandidate) SetOnboardable(val bool) { s.Onboardable = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *RepoCandidate) SetAdditionalProps(val RepoCandidateAdditional) { s.AdditionalProps = val }

type RepoCandidateAccess string

const ( RepoCandidateAccessRead RepoCandidateAccess = "read" RepoCandidateAccessWrite RepoCandidateAccess = "write" RepoCandidateAccessAdmin RepoCandidateAccess = "admin" )

// AllValues returns all RepoCandidateAccess values. func (RepoCandidateAccess) AllValues() []RepoCandidateAccess { return []RepoCandidateAccess{ RepoCandidateAccessRead, RepoCandidateAccessWrite, RepoCandidateAccessAdmin, } }

// MarshalText implements encoding.TextMarshaler. func (s RepoCandidateAccess) MarshalText() ([]byte, error) { switch s { case RepoCandidateAccessRead: return []byte(s), nil case RepoCandidateAccessWrite: return []byte(s), nil case RepoCandidateAccessAdmin: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } }

// UnmarshalText implements encoding.TextUnmarshaler. func (s *RepoCandidateAccess) UnmarshalText(data []byte) error { switch RepoCandidateAccess(data) { case RepoCandidateAccessRead: *s = RepoCandidateAccessRead return nil case RepoCandidateAccessWrite: *s = RepoCandidateAccessWrite return nil case RepoCandidateAccessAdmin: *s = RepoCandidateAccessAdmin return nil default: return errors.Errorf("invalid value: %q", data) } }

type RepoCandidateAdditional map[string]jx.Raw

func (s *RepoCandidateAdditional) init() RepoCandidateAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/RepoGrant type RepoGrant struct { GranteeId string json:"granteeId" 77 unmodified lines

// Ref: #/components/schemas/RepoIndexEntry type RepoIndexEntry struct { Cell string json:"cell" ClusterSlug string json:"clusterSlug" FullName string json:"full_name" ID string json:"id" Candidate OptRepoCandidate json:"candidate" // Deprecated: schema marks this property as deprecated. Cell string json:"cell" // Deprecated: schema marks this property as deprecated. ClusterSlug string json:"clusterSlug" FullName string json:"full_name" ID string json:"id" // Deprecated: schema marks this property as deprecated. Jurisdiction string json:"jurisdiction" Name string json:"name" Placements []RepoPlacement json:"placements" 1 unmodified line

AdditionalProps RepoIndexEntryAdditional }

// GetCandidate returns the value of Candidate. func (s *RepoIndexEntry) GetCandidate() OptRepoCandidate { return s.Candidate }

// GetCell returns the value of Cell. func (s *RepoIndexEntry) GetCell() string { return s.Cell 39 unmodified lines

return s.AdditionalProps }

// SetCandidate sets the value of Candidate. func (s *RepoIndexEntry) SetCandidate(val OptRepoCandidate) { s.Candidate = val }

// SetCell sets the value of Cell. func (s *RepoIndexEntry) SetCell(val string) { s.Cell = val 52 unmodified lines

// Ref: #/components/schemas/RepoPlacement type RepoPlacement struct { Cell string json:"cell" ID string json:"id" Jurisdiction string json:"jurisdiction" Mirror bool json:"mirror" Cell string json:"cell" ClusterSlug string json:"clusterSlug" ID string json:"id" Jurisdiction string json:"jurisdiction" Mirror bool json:"mirror" Status RepoPlacementStatus json:"status" AdditionalProps RepoPlacementAdditional }

2 unmodified lines

return s.Cell }

// GetClusterSlug returns the value of ClusterSlug. func (s *RepoPlacement) GetClusterSlug() string { return s.ClusterSlug }

// GetID returns the value of ID. func (s *RepoPlacement) GetID() string { return s.ID 9 unmodified lines

return s.Mirror }

// GetStatus returns the value of Status. func (s *RepoPlacement) GetStatus() RepoPlacementStatus { return s.Status }

// GetAdditionalProps returns the value of AdditionalProps. func (s *RepoPlacement) GetAdditionalProps() RepoPlacementAdditional { return s.AdditionalProps 4 unmodified lines

s.Cell = val }

// SetClusterSlug sets the value of ClusterSlug. func (s *RepoPlacement) SetClusterSlug(val string) { s.ClusterSlug = val }

// SetID sets the value of ID. func (s *RepoPlacement) SetID(val string) { s.ID = val 9 unmodified lines

s.Mirror = val }

// SetStatus sets the value of Status. func (s *RepoPlacement) SetStatus(val RepoPlacementStatus) { s.Status = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *RepoPlacement) SetAdditionalProps(val RepoPlacementAdditional) { s.AdditionalProps = val 10 unmodified lines

return m }

type RepoPlacementStatus string

const ( RepoPlacementStatusProcessing RepoPlacementStatus = "processing" RepoPlacementStatusReady RepoPlacementStatus = "ready" RepoPlacementStatusFailed RepoPlacementStatus = "failed" RepoPlacementStatusSuspended RepoPlacementStatus = "suspended" )

// AllValues returns all RepoPlacementStatus values. func (RepoPlacementStatus) AllValues() []RepoPlacementStatus { return []RepoPlacementStatus{ RepoPlacementStatusProcessing, RepoPlacementStatusReady, RepoPlacementStatusFailed, RepoPlacementStatusSuspended, } }

// MarshalText implements encoding.TextMarshaler. func (s RepoPlacementStatus) MarshalText() ([]byte, error) { switch s { case RepoPlacementStatusProcessing: return []byte(s), nil case RepoPlacementStatusReady: return []byte(s), nil case RepoPlacementStatusFailed: return []byte(s), nil case RepoPlacementStatusSuspended: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } }

// UnmarshalText implements encoding.TextUnmarshaler. func (s *RepoPlacementStatus) UnmarshalText(data []byte) error { switch RepoPlacementStatus(data) { case RepoPlacementStatusProcessing: *s = RepoPlacementStatusProcessing return nil case RepoPlacementStatusReady: *s = RepoPlacementStatusReady return nil case RepoPlacementStatusFailed: *s = RepoPlacementStatusFailed return nil case RepoPlacementStatusSuspended: *s = RepoPlacementStatusSuspended return nil default: return errors.Errorf("invalid value: %q", data) } }

// Ref: #/components/schemas/ResolvedIdentity type ResolvedIdentity struct { // A URL to the JSON Schema for this object. 662 unmodified lines

} }

// Ref: #/components/schemas/UpdateMeInputBody type UpdateMeInputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" // Contact email. Email string json:"email" AdditionalProps UpdateMeInputBodyAdditional // Ref: #/components/schemas/TopologyCluster type TopologyCluster struct { // DNS host of this cluster; pass verbatim as clusterHost to POST /api/v1/mirrors. Host string json:"host" IsDefault bool json:"isDefault" // Human cluster label (the cluster's display name). Label string json:"label" PublicUrl string json:"publicUrl" Slug string json:"slug" AdditionalProps TopologyClusterAdditional }

// GetSchema returns the value of Schema. func (s *UpdateMeInputBody) GetSchema() OptURI { return s.Schema // GetHost returns the value of Host. func (s *TopologyCluster) GetHost() string { return s.Host }

// GetEmail returns the value of Email. func (s *UpdateMeInputBody) GetEmail() string { return s.Email // GetIsDefault returns the value of IsDefault. func (s *TopologyCluster) GetIsDefault() bool { return s.IsDefault }

// GetLabel returns the value of Label. func (s *TopologyCluster) GetLabel() string { return s.Label }

// GetPublicUrl returns the value of PublicUrl. func (s *TopologyCluster) GetPublicUrl() string { return s.PublicUrl }

// GetSlug returns the value of Slug. func (s *TopologyCluster) GetSlug() string { return s.Slug }

// GetAdditionalProps returns the value of AdditionalProps. func (s *UpdateMeInputBody) GetAdditionalProps() UpdateMeInputBodyAdditional { func (s *TopologyCluster) GetAdditionalProps() TopologyClusterAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *UpdateMeInputBody) SetSchema(val OptURI) { s.Schema = val // SetHost sets the value of Host. func (s *TopologyCluster) SetHost(val string) { s.Host = val }

// SetEmail sets the value of Email. func (s *UpdateMeInputBody) SetEmail(val string) { s.Email = val // SetIsDefault sets the value of IsDefault. func (s *TopologyCluster) SetIsDefault(val bool) { s.IsDefault = val }

// SetLabel sets the value of Label. func (s *TopologyCluster) SetLabel(val string) { s.Label = val }

// SetPublicUrl sets the value of PublicUrl. func (s *TopologyCluster) SetPublicUrl(val string) { s.PublicUrl = val }

// SetSlug sets the value of Slug. func (s *TopologyCluster) SetSlug(val string) { s.Slug = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *UpdateMeInputBody) SetAdditionalProps(val UpdateMeInputBodyAdditional) { func (s *TopologyCluster) SetAdditionalProps(val TopologyClusterAdditional) { s.AdditionalProps = val }

type UpdateMeInputBodyAdditional map[string]jx.Raw type TopologyClusterAdditional map[string]jx.Raw

func (s *UpdateMeInputBodyAdditional) init() UpdateMeInputBodyAdditional { func (s *TopologyClusterAdditional) init() TopologyClusterAdditional { m := *s if m == nil { m = map[string]jx.Raw{} 2 unmodified lines

return m }

// Ref: #/components/schemas/UpdateMeOutputBody type UpdateMeOutputBody struct { // A URL to the JSON Schema for this object. Schema OptURI json:"$schema" Email string json:"email" AdditionalProps UpdateMeOutputBodyAdditional // Ref: #/components/schemas/TopologyJurisdiction type TopologyJurisdiction struct { // Jurisdiction id from the cluster registry (e.g. "us"). ID string json:"id" Label string json:"label" Regions []TopologyRegion json:"regions" AdditionalProps TopologyJurisdictionAdditional }

// GetSchema returns the value of Schema. func (s *UpdateMeOutputBody) GetSchema() OptURI { return s.Schema // GetID returns the value of ID. func (s *TopologyJurisdiction) GetID() string { return s.ID }

// GetEmail returns the value of Email. func (s *UpdateMeOutputBody) GetEmail() string { return s.Email // GetLabel returns the value of Label. func (s *TopologyJurisdiction) GetLabel() string { return s.Label }

// GetRegions returns the value of Regions. func (s *TopologyJurisdiction) GetRegions() []TopologyRegion { return s.Regions }

// GetAdditionalProps returns the value of AdditionalProps. func (s *UpdateMeOutputBody) GetAdditionalProps() UpdateMeOutputBodyAdditional { func (s *TopologyJurisdiction) GetAdditionalProps() TopologyJurisdictionAdditional { return s.AdditionalProps }

// SetSchema sets the value of Schema. func (s *UpdateMeOutputBody) SetSchema(val OptURI) { s.Schema = val // SetID sets the value of ID. func (s *TopologyJurisdiction) SetID(val string) { s.ID = val }

// SetEmail sets the value of Email. func (s *UpdateMeOutputBody) SetEmail(val string) { s.Email = val // SetLabel sets the value of Label. func (s *TopologyJurisdiction) SetLabel(val string) { s.Label = val }

// SetRegions sets the value of Regions. func (s *TopologyJurisdiction) SetRegions(val []TopologyRegion) { s.Regions = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *UpdateMeOutputBody) SetAdditionalProps(val UpdateMeOutputBodyAdditional) { func (s *TopologyJurisdiction) SetAdditionalProps(val TopologyJurisdictionAdditional) { s.AdditionalProps = val }

type UpdateMeOutputBodyAdditional map[string]jx.Raw type TopologyJurisdictionAdditional map[string]jx.Raw

func (s *UpdateMeOutputBodyAdditional) init() UpdateMeOutputBodyAdditional { func (s *TopologyJurisdictionAdditional) init() TopologyJurisdictionAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/TopologyRegion type TopologyRegion struct { Clusters []TopologyCluster json:"clusters" // Region id (the cell id from the cluster registry). ID string json:"id" Label string json:"label" AdditionalProps TopologyRegionAdditional }

// GetClusters returns the value of Clusters. func (s *TopologyRegion) GetClusters() []TopologyCluster { return s.Clusters }

// GetID returns the value of ID. func (s *TopologyRegion) GetID() string { return s.ID }

// GetLabel returns the value of Label. func (s *TopologyRegion) GetLabel() string { return s.Label }

// GetAdditionalProps returns the value of AdditionalProps. func (s *TopologyRegion) GetAdditionalProps() TopologyRegionAdditional { return s.AdditionalProps }

// SetClusters sets the value of Clusters. func (s *TopologyRegion) SetClusters(val []TopologyCluster) { s.Clusters = val }

// SetID sets the value of ID. func (s *TopologyRegion) SetID(val string) { s.ID = val }

// SetLabel sets the value of Label. func (s *TopologyRegion) SetLabel(val string) { s.Label = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *TopologyRegion) SetAdditionalProps(val TopologyRegionAdditional) { s.AdditionalProps = val }

type TopologyRegionAdditional map[string]jx.Raw

func (s *TopologyRegionAdditional) init() TopologyRegionAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/WillDeleteStruct type WillDeleteStruct struct { // Blanket note: profile PII is erased across all regions the account has data in (per-region // residency is not globally tracked). ProfileDataNote string json:"profileDataNote" // Repos in the account's home region that will be permanently deleted (personal + mirror). // Foreign-region repos are also erased by the fan-out but not enumerated here. Repos []DeletionRepo json:"repos" AdditionalProps WillDeleteStructAdditional }

// GetProfileDataNote returns the value of ProfileDataNote. func (s *WillDeleteStruct) GetProfileDataNote() string { return s.ProfileDataNote }

// GetRepos returns the value of Repos. func (s *WillDeleteStruct) GetRepos() []DeletionRepo { return s.Repos }

// GetAdditionalProps returns the value of AdditionalProps. func (s *WillDeleteStruct) GetAdditionalProps() WillDeleteStructAdditional { return s.AdditionalProps }

// SetProfileDataNote sets the value of ProfileDataNote. func (s *WillDeleteStruct) SetProfileDataNote(val string) { s.ProfileDataNote = val }

// SetRepos sets the value of Repos. func (s *WillDeleteStruct) SetRepos(val []DeletionRepo) { s.Repos = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *WillDeleteStruct) SetAdditionalProps(val WillDeleteStructAdditional) { s.AdditionalProps = val }

type WillDeleteStructAdditional map[string]jx.Raw

func (s *WillDeleteStructAdditional) init() WillDeleteStructAdditional { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m }

// Ref: #/components/schemas/WillUnlinkStruct type WillUnlinkStruct struct { // Collaborator grants that will be unlinked. Grants []DeletionGrant json:"grants" // Org memberships that will be dropped (non-owned). Memberships []DeletionMembership json:"memberships" AdditionalProps WillUnlinkStructAdditional }

// GetGrants returns the value of Grants. func (s *WillUnlinkStruct) GetGrants() []DeletionGrant { return s.Grants }

// GetMemberships returns the value of Memberships. func (s *WillUnlinkStruct) GetMemberships() []DeletionMembership { return s.Memberships }

// GetAdditionalProps returns the value of AdditionalProps. func (s *WillUnlinkStruct) GetAdditionalProps() WillUnlinkStructAdditional { return s.AdditionalProps }

// SetGrants sets the value of Grants. func (s *WillUnlinkStruct) SetGrants(val []DeletionGrant) { s.Grants = val }

// SetMemberships sets the value of Memberships. func (s *WillUnlinkStruct) SetMemberships(val []DeletionMembership) { s.Memberships = val }

// SetAdditionalProps sets the value of AdditionalProps. func (s *WillUnlinkStruct) SetAdditionalProps(val WillUnlinkStructAdditional) { s.AdditionalProps = val }

type WillUnlinkStructAdditional map[string]jx.Raw

func (s *WillUnlinkStructAdditional) init() WillUnlinkStructAdditional { m := *s if m == nil { m = map[string]jx.Raw{}


Minternal/coreapi/oas\_schemas\_gen.go+1779/-63

22 unmodified lines

23 24 25 26 27 28 29 30 31 32 33 34 35 1 unmodified line

37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 10 unmodified lines

66 67 68 69 70 71 72 73 74 75 76 77 78 2 unmodified lines

81 82 83 76 84 85 86 21 unmodified lines

108 109 110 111 112 113 114 115 116 117 118 119 120 1 unmodified line

122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 10 unmodified lines

151 152 153 154 155 156 157 158 159 160 161 162 163 2 unmodified lines

166 167 168 154 169 170 171

22 unmodified lines

var operationRolesBearerAuth = map[string][]string{ AddOrgMemberOperation: {}, BatchLookupOperation: {}, CancelDeletionOperation: {}, CreateBindingOperation: {}, CreateMirrorOperation: {}, CreateOrgOperation: {}, CreateProjectOperation: {}, CreateRepoOperation: {}, CreateRepoCIWebhookOperation: {}, CreateServiceAccountOperation: {}, DeleteBindingOperation: {}, DeleteMeOperation: {}, 1 unmodified line

DeleteOrgOperation: {}, DeleteProjectOperation: {}, DeleteRepoOperation: {}, DeleteRepoCIWebhookOperation: {}, DeleteServiceAccountOperation: {}, GetDeletionPreviewOperation: {}, GetMeOperation: {}, GetMirrorOperation: {}, GetOnboardingStatusOperation: {}, GetOrgOperation: {}, GetPermissionsOperation: {}, GetProjectOperation: {}, GetRepoOperation: {}, GetRepoVisibilityOperation: {}, GetServiceAccountOperation: {}, GetTopologyOperation: {}, GrantProjectAccessOperation: {}, GrantRepoAccessOperation: {}, GrantServiceAccountAccessOperation: {}, 10 unmodified lines

ListProjectMembersOperation: {}, ListProjectReposOperation: {}, ListProjectsOperation: {}, ListRepoCIWebhooksOperation: {}, ListRepoGrantsOperation: {}, ListReposOperation: {}, ListServiceAccountGrantsOperation: {}, ListServiceAccountsOperation: {}, LookupResourcesOperation: {}, PatchRepoCIWebhookOperation: {}, RemoveOrgMemberOperation: {}, ResolveHandleOperation: {}, RevokeProjectAccessOperation: {}, 2 unmodified lines

RevokeRepoAccessByProviderOperation: {}, RevokeServiceAccountAccessOperation: {}, SetRepoVisibilityOperation: {}, UpdateMeOperation: {}, }

// GetRolesForBearerAuth returns the required roles for the given operation. 21 unmodified lines

var operationRolesSessionAuth = map[string][]string{ AddOrgMemberOperation: {}, BatchLookupOperation: {}, CancelDeletionOperation: {}, CreateBindingOperation: {}, CreateMirrorOperation: {}, CreateOrgOperation: {}, CreateProjectOperation: {}, CreateRepoOperation: {}, CreateRepoCIWebhookOperation: {}, CreateServiceAccountOperation: {}, DeleteBindingOperation: {}, DeleteMeOperation: {}, 1 unmodified line

RevokeRepoAccessByProviderOperation: {}, RevokeServiceAccountAccessOperation: {}, SetRepoVisibilityOperation: {}, UpdateMeOperation: {}, }

// GetRolesForSessionAuth returns the required roles for the given operation.


Minternal/coreapi/oas\_security\_gen.go+16/-2

245 unmodified lines

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 245 unmodified lines

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 148 unmodified lines

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 100 unmodified lines

986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 250 unmodified lines

1282 1283 1284 1285 1286 1287 1288 1289 440 unmodified lines

1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 57 unmodified lines

1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 327 unmodified lines

2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 7 unmodified lines

2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 119 unmodified lines

2434 2435 2436 2006 2437 2438 2439 2440 2441 2442 2443 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2031 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567

245 unmodified lines

return nil }

func (s *CIWebhookView) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Events == nil { return errors.New("nil is invalid value") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "events", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *CreateBindingInputBody) Validate() error { if s == nil { return validate.ErrNilPointer 245 unmodified lines

} }

func (s *CreateRepoCIWebhookInputBody) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if err := (validate.String{ MinLength: 1, MinLengthSet: true, MaxLength: 0, MaxLengthSet: false, Email: false, Hostname: false, Regex: nil, MinNumeric: 0, MinNumericSet: false, MaxNumeric: 0, MaxNumericSet: false, }).Validate(string(s.BkClusterID)); err != nil { return errors.Wrap(err, "string") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "bk_cluster_id", Error: err, }) } if err := func() error { if err := (validate.String{ MinLength: 1, MinLengthSet: true, MaxLength: 0, MaxLengthSet: false, Email: false, Hostname: false, Regex: nil, MinNumeric: 0, MinNumericSet: false, MaxNumeric: 0, MaxNumericSet: false, }).Validate(string(s.BkOrganization)); err != nil { return errors.Wrap(err, "string") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "bk_organization", Error: err, }) } if err := func() error { if err := s.Provider.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "provider", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s CreateRepoCIWebhookInputBodyProvider) Validate() error { switch s { case "buildkite": return nil default: return errors.Errorf("invalid value: %v", s) } }

func (s *CreateRepoInputBody) Validate() error { if s == nil { return validate.ErrNilPointer 148 unmodified lines

} }

func (s *DeletionBlocker) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if err := s.Kind.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "kind", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s DeletionBlockerKind) Validate() error { switch s { case "owned_org": return nil default: return errors.Errorf("invalid value: %v", s) } }

func (s *DeletionGrant) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if err := s.ResourceType.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "resourceType", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s DeletionGrantResourceType) Validate() error { switch s { case "project": return nil case "repo": return nil default: return errors.Errorf("invalid value: %v", s) } }

func (s *GetDeletionPreviewOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Blockers == nil { return errors.New("nil is invalid value") } var failures []validate.FieldError for i, elem := range s.Blockers { if err := func() error { if err := elem.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: fmt.Sprintf("[%d]", i), Error: err, }) } } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "blockers", Error: err, }) } if err := func() error { if err := s.WillDelete.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "willDelete", Error: err, }) } if err := func() error { if err := s.WillUnlink.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "willUnlink", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *GetMeOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer 100 unmodified lines

} }

func (s *GetTopologyOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Jurisdictions == nil { return errors.New("nil is invalid value") } var failures []validate.FieldError for i, elem := range s.Jurisdictions { if err := func() error { if err := elem.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: fmt.Sprintf("[%d]", i), Error: err, }) } } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "jurisdictions", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *GetVersionOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer 250 unmodified lines

return nil case "admin": return nil case "ci_manager": return nil default: return errors.Errorf("invalid value: %v", s) } 440 unmodified lines

return nil }

func (s *ListRepoCIWebhooksOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Subscriptions == nil { return errors.New("nil is invalid value") } var failures []validate.FieldError for i, elem := range s.Subscriptions { if err := func() error { if err := elem.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: fmt.Sprintf("[%d]", i), Error: err, }) } } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "subscriptions", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *ListRepoGrantsOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer 57 unmodified lines

return nil }

func (s ListReposScope) Validate() error { switch s { case "onboarded": return nil case "all": return nil default: return errors.Errorf("invalid value: %v", s) } }

func (s *ListServiceAccountGrantsOutputBody) Validate() error { if s == nil { return validate.ErrNilPointer 327 unmodified lines

} }

func (s *RepoCandidate) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if err := s.Access.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "access", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s RepoCandidateAccess) Validate() error { switch s { case "read": return nil case "write": return nil case "admin": return nil default: return errors.Errorf("invalid value: %v", s) } }

func (s *RepoIndexEntry) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if value, ok := s.Candidate.Get(); ok { if err := func() error { if err := value.Validate(); err != nil { return err } return nil }(); err != nil { return err } } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "candidate", Error: err, }) } if err := func() error { if s.Placements == nil { return errors.New("nil is invalid value") } var failures []validate.FieldError for i, elem := range s.Placements { if err := func() error { if err := elem.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: fmt.Sprintf("[%d]", i), Error: err, }) } } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }(); err != nil { failures = append(failures, validate.FieldError{ 7 unmodified lines

return nil }

func (s *RepoPlacement) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if err := s.Status.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "status", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s RepoPlacementStatus) Validate() error { switch s { case "processing": return nil case "ready": return nil case "failed": return nil case "suspended": return nil default: return errors.Errorf("invalid value: %v", s) } }

func (s *ResourceAccess) Validate() error { if s == nil { return validate.ErrNilPointer 119 unmodified lines

} }

func (s *UpdateMeInputBody) Validate() error { func (s *TopologyJurisdiction) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if err := (validate.String{ MinLength: 5, MinLengthSet: true, MaxLength: 254, MaxLengthSet: true, Email: true, Hostname: false, Regex: nil, MinNumeric: 0, MinNumericSet: false, MaxNumeric: 0, MaxNumericSet: false, }).Validate(string(s.Email)); err != nil { return errors.Wrap(err, "string") if s.Regions == nil { return errors.New("nil is invalid value") } var failures []validate.FieldError for i, elem := range s.Regions { if err := func() error { if err := elem.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: fmt.Sprintf("[%d]", i), Error: err, }) } } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "email", Name: "regions", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *TopologyRegion) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Clusters == nil { return errors.New("nil is invalid value") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "clusters", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *WillDeleteStruct) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Repos == nil { return errors.New("nil is invalid value") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "repos", Error: err, }) } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }

func (s *WillUnlinkStruct) Validate() error { if s == nil { return validate.ErrNilPointer }

var failures []validate.FieldError if err := func() error { if s.Grants == nil { return errors.New("nil is invalid value") } var failures []validate.FieldError for i, elem := range s.Grants { if err := func() error { if err := elem.Validate(); err != nil { return err } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: fmt.Sprintf("[%d]", i), Error: err, }) } } if len(failures) > 0 { return &validate.Error{Fields: failures} } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "grants", Error: err, }) } if err := func() error { if s.Memberships == nil { return errors.New("nil is invalid value") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ Name: "memberships", Error: err, }) }


Minternal/coreapi/oas\_validators\_gen.go+549/-16

198 unmodified lines

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 153 unmodified lines

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 77 unmodified lines

556 557 558 444 559 560 561 562 20 unmodified lines

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 72 unmodified lines

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 9 unmodified lines

826 827 828 829 830 831 832 833 834 835 21 unmodified lines

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 54 unmodified lines

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 120 unmodified lines

1089 1090 1091 777 1092 1093 1094 1095 1096 438 unmodified lines

1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 253 unmodified lines

1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 3 unmodified lines

1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 9 unmodified lines

1867 1868 1869 1870 1871 1872 1873 273 unmodified lines

2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 85 unmodified lines

2268 2269 2270 2271 2272 2273 2274 2275 2276 22 unmodified lines

2299 2300 2301 2302 2303 2304 2305 2306 2307 8 unmodified lines

2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 24 unmodified lines

2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 3 unmodified lines

2385 2386 2387 2388 2389 2390 2391 27 unmodified lines

2419 2420 2421 2422 2423 2424 2425 2426 2427 2 unmodified lines

2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2007 2448 2449 2450 2451 2452 2453 204 unmodified lines

2658 2659 2660 2218 2661 2662 2663 2221 2222 2223 2224 2225 2226 2227 2664 2665 2666 2667 2230 2231 2232 2233 2234 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2239 2683 2684 2685 2686 2687 2688 2689 2690 2243 2691 2692 2693 2246 2247 2248 2249 2250 2251 2252 2694 2695 2696 2697 2255 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2260 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 393 unmodified lines

3177 3178 3179 2660 2661 3180 3181 3182 3183 3184 14 unmodified lines

3199 3200 3201 2682 3202 3203 3204 3205 34 unmodified lines

3240 3241 3242 2723 2724 2725 2726 2727 2728 2729 2730 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 2732 3259 3260 3261 3262 3263 3264 3265 3266 2734 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 2741 3324 3325 3326 3327 18 unmodified lines

3346 3347 3348 2766 3349 3350 3351 3352 502 unmodified lines

3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 5 unmodified lines

3873 3874 3875 3286 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 986 unmodified lines

4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 212 unmodified lines

5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 945 unmodified lines

6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346

198 unmodified lines

], "type": "object" }, "CIWebhookView": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/CIWebhookView.json"
], "format": "uri", "readOnly": true, "type": "string" }, "bk_organization": { "type": "string" }, "bk_pipeline": { "type": "string" }, "created_at": { "format": "date-time", "type": "string" }, "display_name": { "type": "string" }, "enabled": { "type": "boolean" }, "events": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "provider": { "type": "string" }, "ref_filter": { "type": "string" }, "repo_id": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" } }, "required": [
"id",
"repo_id",
"provider",
"display_name",
"bk_organization",
"bk_pipeline",
"ref_filter",
"events",
"enabled",
"created_at",
"updated_at"
], "type": "object" }, "Cluster": { "additionalProperties": true, "properties": { 153 unmodified lines

], "type": "object" }, "CreateRepoCIWebhookInputBody": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/CreateRepoCIWebhookInputBody.json"
], "format": "uri", "readOnly": true, "type": "string" }, "bk_cluster_id": { "minLength": 1, "type": "string" }, "bk_organization": { "minLength": 1, "type": "string" }, "bk_pipeline": { "type": "string" }, "display_name": { "type": "string" }, "events": { "items": { "type": "string" }, "type": "array" }, "provider": { "enum": [
"buildkite"
], "type": "string" }, "ref_filter": { "type": "string" } }, "required": [
"provider",
"bk_organization",
"bk_cluster_id"
], "type": "object" }, "CreateRepoInputBody": { "additionalProperties": true, "properties": { 77 unmodified lines

"type": "boolean" }, "empty": { "description": "true when the upstream has no refs to clone.", "description": "Deprecated: always false. Poll the mirror status instead — an empty upstream still reaches 'ready'.", "type": "boolean" }, "mirrorId": { 20 unmodified lines

], "type": "object" }, "DeletionBlocker": { "additionalProperties": true, "properties": { "deletable": { "description": "True when the account can self-serve delete this org (it is the only member and the org has no projects). When false, the org has other members or data and must be transferred/removed via support. The UI should offer a delete action only when this is true.", "type": "boolean" }, "id": { "description": "Resource ID (org ULID).", "type": "string" }, "kind": { "description": "Blocker kind. Currently always 'owned_org'.", "enum": [
"owned_org"
], "type": "string" }, "message": { "description": "Copy explaining how to clear the blocker.", "type": "string" }, "name": { "description": "Human-readable resource name.", "type": "string" } }, "required": [
"kind",
"id",
"name",
"deletable",
"message"
], "type": "object" }, "DeletionGrant": { "additionalProperties": true, "properties": { "jurisdiction": { "description": "Region the repo lives in (us/eu/au); empty for project grants.", "type": "string" }, "resourceId": { "description": "Granted resource ULID.", "type": "string" }, "resourceName": { "description": "Granted resource name.", "type": "string" }, "resourceType": { "description": "Granted resource type.", "enum": [
"project",
"repo"
], "type": "string" }, "role": { "description": "Granted role.", "type": "string" } }, "required": [
"resourceType",
"resourceId",
"resourceName",
"role"
], "type": "object" }, "DeletionMembership": { "additionalProperties": true, "properties": { "name": { "description": "Org name.", "type": "string" }, "orgId": { "description": "Org ULID.", "type": "string" } }, "required": [
"orgId",
"name"
], "type": "object" }, "DeletionRepo": { "additionalProperties": true, "properties": { "cluster": { "description": "Cluster slug the repo is placed on, if known.", "type": "string" }, "id": { "description": "Repo ULID.", "type": "string" }, "name": { "description": "Repo name.", "type": "string" } }, "required": [
"id",
"name"
], "type": "object" }, "ErrorDetail": { "additionalProperties": true, "properties": { 72 unmodified lines

}, "type": "object" }, "GetDeletionPreviewOutputBody": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/GetDeletionPreviewOutputBody.json"
], "format": "uri", "readOnly": true, "type": "string" }, "blocked": { "description": "True when Blockers is non-empty: DELETE /me will be refused with 409.", "type": "boolean" }, "blockers": { "description": "Resources that must be resolved before deletion (owned orgs).", "items": { "$ref": "#/components/schemas/DeletionBlocker" }, "type": "array" }, "willDelete": { "$ref": "#/components/schemas/WillDeleteStruct" }, "willUnlink": { "$ref": "#/components/schemas/WillUnlinkStruct" } }, "required": [
"blocked",
"blockers",
"willDelete",
"willUnlink"
], "type": "object" }, "GetMeOutputBody": { "additionalProperties": true, "properties": { 9 unmodified lines

"auth": { "$ref": "#/components/schemas/MeAuth" }, "deletion": { "$ref": "#/components/schemas/MeDeletion", "description": "Present only when a deletion is pending; carries the cooldown window." }, "global": { "$ref": "#/components/schemas/MeGlobal" }, 21 unmodified lines

], "type": "object" }, "GetOnboardingStatusOutputBody": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/GetOnboardingStatusOutputBody.json"
], "format": "uri", "readOnly": true, "type": "string" }, "needsOnboarding": { "description": "True when the account has no mirrored repo yet and should be sent through onboarding.", "type": "boolean" } }, "required": [
"needsOnboarding"
], "type": "object" }, "GetPermissionsOutputBody": { "additionalProperties": true, "properties": { 54 unmodified lines

], "type": "object" }, "GetTopologyOutputBody": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/GetTopologyOutputBody.json"
], "format": "uri", "readOnly": true, "type": "string" }, "jurisdictions": { "items": { "$ref": "#/components/schemas/TopologyJurisdiction" }, "type": "array" } }, "required": [
"jurisdictions"
], "type": "object" }, "GetVersionOutputBody": { "additionalProperties": true, "properties": { 120 unmodified lines

"enum": [
"reader",
"writer",
"admin"
"admin",
"ci_manager"
], "type": "string" } 438 unmodified lines

}, "type": "object" }, "ListRepoCIWebhooksOutputBody": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/ListRepoCIWebhooksOutputBody.json"
], "format": "uri", "readOnly": true, "type": "string" }, "subscriptions": { "items": { "$ref": "#/components/schemas/CIWebhookView" }, "type": "array" } }, "required": [
"subscriptions"
], "type": "object" }, "ListRepoGrantsOutputBody": { "additionalProperties": true, "properties": { 253 unmodified lines

], "type": "object" }, "MeDeletion": { "additionalProperties": true, "properties": { "cooldownEndsAt": { "description": "When the cooldown elapses and the account becomes eligible for irreversible hard-deletion.", "format": "date-time", "type": "string" }, "requestedAt": { "description": "When deletion was requested (deletion_requested_at).", "format": "date-time", "type": "string" } }, "required": [
"requestedAt",
"cooldownEndsAt"
], "type": "object" }, "MeGlobal": { "additionalProperties": true, "properties": { 3 unmodified lines

"avatarUrl": { "type": "string" }, "createdAt": { "description": "When the account was created (accounts.created_at).", "format": "date-time", "type": "string" }, "handle": { "type": "string" }, 9 unmodified lines

}, "required": [
"accountId",
"createdAt",
"handles"
], "type": "object" 273 unmodified lines

], "type": "object" }, "PatchRepoCIWebhookInputBody": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/PatchRepoCIWebhookInputBody.json"
], "format": "uri", "readOnly": true, "type": "string" }, "display_name": { "type": "string" }, "enabled": { "type": "boolean" }, "events": { "items": { "type": "string" }, "type": "array" }, "ref_filter": { "type": "string" } }, "type": "object" }, "Project": { "additionalProperties": true, "properties": { 85 unmodified lines

"foreign": { "type": "boolean" }, "fullName": { "type": "string" }, "id": { "type": "string" }, 22 unmodified lines

"provisionReason": { "type": "string" }, "repoGroupId": { "type": "string" }, "state": { "type": "string" }, 8 unmodified lines

], "type": "object" }, "RepoCandidate": { "additionalProperties": true, "properties": { "access": { "enum": [
"read",
"write",
"admin"
], "type": "string" }, "onboardable": { "type": "boolean" } }, "required": [
"access",
"onboardable"
], "type": "object" }, "RepoGrant": { "additionalProperties": true, "properties": { 24 unmodified lines

"RepoIndexEntry": { "additionalProperties": true, "properties": { "candidate": { "$ref": "#/components/schemas/RepoCandidate" }, "cell": { "deprecated": true, "type": "string" }, "clusterSlug": { "deprecated": true, "type": "string" }, "full_name": { 3 unmodified lines

"type": "string" }, "jurisdiction": { "deprecated": true, "type": "string" }, "name": { 27 unmodified lines

"cell": { "type": "string" }, "clusterSlug": { "type": "string" }, "id": { "type": "string" }, 2 unmodified lines

}, "mirror": { "type": "boolean" }, "status": { "enum": [
"processing",
"ready",
"failed",
"suspended"
], "type": "string" } }, "required": [
"id",
"jurisdiction",
"cell",
"mirror"
"clusterSlug",
"mirror",
"status"
], "type": "object" }, 204 unmodified lines

], "type": "object" }, "UpdateMeInputBody": { "TopologyCluster": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/UpdateMeInputBody.json"
], "format": "uri", "readOnly": true, "host": { "description": "DNS host of this cluster; pass verbatim as clusterHost to POST /api/v1/mirrors.", "type": "string" }, "email": { "description": "Contact email.", "format": "email", "maxLength": 254, "minLength": 5, "isDefault": { "type": "boolean" }, "label": { "description": "Human cluster label (the cluster's display name).", "type": "string" }, "publicUrl": { "type": "string" }, "slug": { "type": "string" } }, "required": [
"email"
"slug",
"label",
"host",
"publicUrl",
"isDefault"
], "type": "object" }, "UpdateMeOutputBody": { "TopologyJurisdiction": { "additionalProperties": true, "properties": { "$schema": { "description": "A URL to the JSON Schema for this object.", "examples": [
"/api/v1/schemas/UpdateMeOutputBody.json"
], "format": "uri", "readOnly": true, "id": { "description": "Jurisdiction id from the cluster registry (e.g. "us").", "type": "string" }, "email": { "label": { "type": "string" }, "regions": { "items": { "$ref": "#/components/schemas/TopologyRegion" }, "type": "array" } }, "required": [
"email"
"id",
"label",
"regions"
], "type": "object" }, "TopologyRegion": { "additionalProperties": true, "properties": { "clusters": { "items": { "$ref": "#/components/schemas/TopologyCluster" }, "type": "array" }, "id": { "description": "Region id (the cell id from the cluster registry).", "type": "string" }, "label": { "type": "string" } }, "required": [
"id",
"label",
"clusters"
], "type": "object" }, "WillDeleteStruct": { "additionalProperties": true, "properties": { "profileDataNote": { "description": "Blanket note: profile PII is erased across all regions the account has data in (per-region residency is not globally tracked).", "type": "string" }, "repos": { "description": "Repos in the account's home region that will be permanently deleted (personal + mirror). Foreign-region repos are also erased by the fan-out but not enumerated here.", "items": { "$ref": "#/components/schemas/DeletionRepo" }, "type": "array" } }, "required": [
"repos",
"profileDataNote"
], "type": "object" }, "WillUnlinkStruct": { "additionalProperties": true, "properties": { "grants": { "description": "Collaborator grants that will be unlinked.", "items": { "$ref": "#/components/schemas/DeletionGrant" }, "type": "array" }, "memberships": { "description": "Org memberships that will be dropped (non-owned).", "items": { "$ref": "#/components/schemas/DeletionMembership" }, "type": "array" } }, "required": [
"grants",
"memberships"
], "type": "object" } 393 unmodified lines

"delete": { "operationId": "deleteMe", "responses": { "204": { "description": "No Content" "202": { "description": "Accepted" }, "default": { "content": { 14 unmodified lines

"sessionAuth": [] } ], "summary": "Request deletion of the calling account (7-day cooldown; login cancels)", "summary": "Request deletion of the calling account (7-day cooldown; cancel via POST /me/cancel-deletion)", "tags": [
"identity"
] 34 unmodified lines

"tags": [
"identity"
] }, "patch": { "operationId": "updateMe", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMeInputBody" } }, "/me/cancel-deletion": { "post": { "operationId": "cancelDeletion", "responses": { "200": { "description": "OK" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
"required": true
{
"sessionAuth": []
}
], "summary": "Cancel a pending deletion request for the calling account", "tags": [
"identity"
] } }, "/me/deletion-preview": { "get": { "operationId": "getDeletionPreview", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDeletionPreviewOutputBody" } } }, "description": "OK" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Preview what deleting the calling account will erase, unlink, and block on", "tags": [
"identity"
] } }, "/me/onboarding": { "get": { "operationId": "getOnboardingStatus", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMeOutputBody" "$ref": "#/components/schemas/GetOnboardingStatusOutputBody" } } }, 18 unmodified lines

"sessionAuth": [] } ], "summary": "Update the calling account's contact email", "summary": "Report whether the calling account still needs to onboard (has no mirror yet)", "tags": [
"identity"
] 502 unmodified lines

"description": "Optional: exact-match org name (case-insensitive).", "type": "string" } }, { "in": "header", "name": "If-None-Match", "schema": { "type": "string" } } ], "responses": { 5 unmodified lines

} } }, "description": "OK" "description": "OK", "headers": { "Cache-Control": { "schema": { "type": "string" } }, "ETag": { "schema": { "type": "string" } }, "Vary": { "schema": { "type": "string" } } } }, "default": { "content": { 986 unmodified lines

"/repos": { "get": { "operationId": "listRepos", "parameters": [
{
"description": "onboarded (default): repos in Entire; all: also include onboardable GitHub candidates.",
"explode": false,
"in": "query",
"name": "scope",
"schema": {
"default": "onboarded",
"description": "onboarded (default): repos in Entire; all: also include onboardable GitHub candidates.",
"enum": [
"onboarded",
"all"
],
"type": "string"
}
}
], "responses": { "200": { "content": { 212 unmodified lines

] } }, "/repos/{repoId}/ci-webhooks": { "get": { "operationId": "listRepoCIWebhooks", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
}
], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListRepoCIWebhooksOutputBody" } } }, "description": "OK" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "List a repo's CI webhooks", "tags": [
"ci-webhooks"
] }, "post": { "operationId": "createRepoCIWebhook", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
}
], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRepoCIWebhookInputBody" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CIWebhookView" } } }, "description": "Created" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Enroll a repo into a CI webhook (Buildkite)", "tags": [
"ci-webhooks"
] } }, "/repos/{repoId}/ci-webhooks/{id}": { "delete": { "operationId": "deleteRepoCIWebhook", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
},
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
},
{
"explode": false,
"in": "query",
"name": "teardown",
"schema": {
"type": "boolean"
}
}
], "responses": { "204": { "description": "No Content" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Delete a repo's CI webhook", "tags": [
"ci-webhooks"
] }, "patch": { "operationId": "patchRepoCIWebhook", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
},
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
}
], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchRepoCIWebhookInputBody" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CIWebhookView" } } }, "description": "OK" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Update a repo's CI webhook", "tags": [
"ci-webhooks"
] } }, "/repos/{repoId}/grants": { "get": { "operationId": "listRepoGrants", 945 unmodified lines

] } }, "/topology": { "get": { "operationId": "getTopology", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTopologyOutputBody" } } }, "description": "OK" }, "default": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Get the cluster topology as a jurisdiction → region → cluster tree", "tags": [
"clusters"
] } }, "/version": { "get": { "operationId": "getVersion",


Minternal/coreapi/spec/core.gen.json+939/-43

198 unmodified lines

556 557 558 444 559 560 561 562 20 unmodified lines

826 827 828 829 830 831 832 833 834 835 21 unmodified lines

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 54 unmodified lines

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 120 unmodified lines

1089 1090 1091 777 1092 1093 1094 1095 1096 438 unmodified lines

1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 3 unmodified lines

1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 9 unmodified lines

1867 1868 1869 1870 1871 1872 1873 273 unmodified lines

2268 2269 2270 2271 2272 2273 2274 2275 2276 26 unmodified lines

2303 2304 2305 2306 2307 2308 2309 2310 2311 17 unmodified lines

2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 24 unmodified lines

2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 3 unmodified lines

2398 2399 2400 2401 2402 2403 2404 27 unmodified lines

2432 2433 2434 2435 2436 2437 2438 2439 2440 2 unmodified lines

2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2020 2461 2462 2463 2464 2465 2466 204 unmodified lines

2671 2672 2673 2231 2674 2675 2676 2234 2235 2236 2237 2238 2239 2240 2677 2678 2679 2680 2243 2244 2245 2246 2247 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2252 2696 2697 2698 2699 2700 2701 2702 2703 2256 2704 2705 2706 2259 2260 2261 2262 2263 2264 2265 2707 2708 2709 2710 2268 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2273 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 633 unmodified lines

3430 3431 3432 2913 2914 3433 3434 3435 3436 3437 25 unmodified lines

3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3 unmodified lines

3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 4 unmodified lines

3502 3503 3504 2965 3505 3506 3507 3508 64 unmodified lines

3573 3574 3575 3036 3037 3038 3039 3040 3041 3042 3043 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3045 3592 3593 3594 3047 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3054 3658 3659 3660 3661 29 unmodified lines

3691 3692 3693 3090 3694 3695 3696 3697 1 unmodified line

3699 3700 3701 3098 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 13 unmodified lines

3789 3790 3791 3119 3792 3793 3794 3795 962 unmodified lines

4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 5 unmodified lines

4776 4777 4778 4099 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 574 unmodified lines

5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 105 unmodified lines

5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 800 unmodified lines

6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 105 unmodified lines

6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 288 unmodified lines

6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 35 unmodified lines

6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 431 unmodified lines

7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 1915 unmodified lines

9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749

198 unmodified lines

"enum": [
"reader",
"writer",
"admin"
"admin",
"ci_manager"
], "type": "string" } 438 unmodified lines

}, "required": [
"accountId",
"createdAt",
"handles"
], "type": "object" 273 unmodified lines

"foreign": { "type": "boolean" }, "fullName": { "type": "string" }, "id": { "type": "string" }, 26 unmodified lines

"provisionReason": { "type": "string" }, "repoGroupId": { "type": "string" }, "state": { "enum": [
"provisioning",
17 unmodified lines

], "type": "object" }, "RepoCandidate": { "additionalProperties": true, "properties": { "access": { "enum": [
"read",
"write",
"admin"
], "type": "string" }, "onboardable": { "type": "boolean" } }, "required": [
"access",
"onboardable"
], "type": "object" }, "RepoGrant": { "additionalProperties": true, "properties": { 24 unmodified lines

"type": "string" }, "jurisdiction": { "deprecated": true, "type": "string" }, "name": { 27 unmodified lines

"cell": { "type": "string" }, "clusterSlug": { "type": "string" }, "id": { "type": "string" }, 2 unmodified lines

"delete": { "operationId": "deleteMe", "responses": { "204": { "description": "No Content" "202": { "description": "Accepted" }, "400": { "content": { 25 unmodified lines

}, "description": "Forbidden" }, "409": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Conflict" }, "500": { "content": { "application/problem+json": { 3 unmodified lines

} }, "description": "Internal Server Error" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
4 unmodified lines

"sessionAuth": []
}
], "summary": "Request deletion of the calling account (7-day cooldown; login cancels)", "summary": "Request deletion of the calling account (7-day cooldown; cancel via POST /me/cancel-deletion)", "tags": [
"identity"
] 64 unmodified lines

"tags": [
"identity"
] }, "patch": { "operationId": "updateMe", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMeInputBody" } }, "/me/cancel-deletion": { "post": { "operationId": "cancelDeletion", "responses": { "200": { "description": "OK" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } } }, "description": "Bad Request" }, "required": true "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "500": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Internal Server Error" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Cancel a pending deletion request for the calling account", "tags": [
"identity"
] } }, "/me/deletion-preview": { "get": { "operationId": "getDeletionPreview", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMeOutputBody" "$ref": "#/components/schemas/GetDeletionPreviewOutputBody" } } }, 29 unmodified lines

}, "description": "Forbidden" }, "422": { "500": { "content": { "application/problem+json": { "schema": { 1 unmodified line

} } }, "description": "Unprocessable Entity" "description": "Internal Server Error" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Preview what deleting the calling account will erase, unlink, and block on", "tags": [
"identity"
] } }, "/me/onboarding": { "get": { "operationId": "getOnboardingStatus", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOnboardingStatusOutputBody" } } }, "description": "OK" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Request" }, "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "500": { "content": { "application/problem+json": { 13 unmodified lines

"sessionAuth": [] } ], "summary": "Update the calling account's contact email", "summary": "Report whether the calling account still needs to onboard (has no mirror yet)", "tags": [
"identity"
] 962 unmodified lines

} } }, "description": "OK" "description": "OK", "headers": { "Cache-Control": { "schema": { "type": "string" } }, "ETag": { "schema": { "type": "string" } }, "Vary": { "schema": { "type": "string" } } } }, "400": { "content": { 574 unmodified lines

}, "description": "Not Found" }, "409": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Conflict" }, "422": { "content": { "application/problem+json": { 105 unmodified lines

}, "description": "Not Found" }, "409": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Conflict" }, "422": { "content": { "application/problem+json": { 800 unmodified lines

}, "description": "Not Found" }, "409": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Conflict" }, "422": { "content": { "application/problem+json": { 288 unmodified lines

"/repos": { "get": { "operationId": "listRepos", "parameters": [
{
"description": "onboarded (default): repos in Entire; all: also include onboardable GitHub candidates.",
"explode": false,
"in": "query",
"name": "scope",
"schema": {
"default": "onboarded",
"description": "onboarded (default): repos in Entire; all: also include onboardable GitHub candidates.",
"enum": [
"onboarded",
"all"
],
"type": "string"
}
}
], "responses": { "200": { "content": { 35 unmodified lines

}, "description": "Forbidden" }, "422": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unprocessable Entity" }, "500": { "content": { "application/problem+json": { 431 unmodified lines

] } }, "/repos/{repoId}/ci-webhooks": { "get": { "operationId": "listRepoCIWebhooks", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
}
], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListRepoCIWebhooksOutputBody" } } }, "description": "OK" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Request" }, "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "404": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Not Found" }, "422": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unprocessable Entity" }, "500": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Internal Server Error" }, "502": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Gateway" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "List a repo's CI webhooks", "tags": [
"ci-webhooks"
] }, "post": { "operationId": "createRepoCIWebhook", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
}
], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRepoCIWebhookInputBody" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CIWebhookView" } } }, "description": "Created" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Request" }, "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "404": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Not Found" }, "422": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unprocessable Entity" }, "500": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Internal Server Error" }, "502": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Gateway" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Enroll a repo into a CI webhook (Buildkite)", "tags": [
"ci-webhooks"
] } }, "/repos/{repoId}/ci-webhooks/{id}": { "delete": { "operationId": "deleteRepoCIWebhook", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
},
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
},
{
"explode": false,
"in": "query",
"name": "teardown",
"schema": {
"type": "boolean"
}
}
], "responses": { "204": { "description": "No Content" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Request" }, "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "404": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Not Found" }, "422": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unprocessable Entity" }, "500": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Internal Server Error" }, "502": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Gateway" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Delete a repo's CI webhook", "tags": [
"ci-webhooks"
] }, "patch": { "operationId": "patchRepoCIWebhook", "parameters": [
{
"in": "path",
"name": "repoId",
"required": true,
"schema": {
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"type": "string"
}
},
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
}
], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchRepoCIWebhookInputBody" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CIWebhookView" } } }, "description": "OK" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Request" }, "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "404": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Not Found" }, "422": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unprocessable Entity" }, "500": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Internal Server Error" }, "502": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Gateway" }, "503": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Service Unavailable" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Update a repo's CI webhook", "tags": [
"ci-webhooks"
] } }, "/repos/{repoId}/grants": { "get": { "operationId": "listRepoGrants", 1915 unmodified lines

] } }, "/topology": { "get": { "operationId": "getTopology", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTopologyOutputBody" } } }, "description": "OK" }, "400": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Bad Request" }, "401": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Unauthorized" }, "403": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Forbidden" }, "500": { "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } }, "description": "Internal Server Error" } }, "security": [
{
"bearerAuth": []
},
{
"sessionAuth": []
}
], "summary": "Get the cluster topology as a jurisdiction → region → cluster tree", "tags": [
"clusters"
] } }, "/version": { "get": { "operationId": "getVersion",


Minternal/coreapi/spec/core.openapi.json+1391/-45