generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 12
/
zz_organizationruleset_types.go
executable file
·869 lines (614 loc) · 41.6 KB
/
zz_organizationruleset_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
// SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type BranchNamePatternInitParameters struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type BranchNamePatternObservation struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type BranchNamePatternParameters struct {
// How this rule will appear to users.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
// +kubebuilder:validation:Optional
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
// +kubebuilder:validation:Optional
Operator *string `json:"operator" tf:"operator,omitempty"`
// The pattern to match with.
// +kubebuilder:validation:Optional
Pattern *string `json:"pattern" tf:"pattern,omitempty"`
}
type BypassActorsInitParameters struct {
// The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.
ActorID *float64 `json:"actorId,omitempty" tf:"actor_id,omitempty"`
// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.
ActorType *string `json:"actorType,omitempty" tf:"actor_type,omitempty"`
// When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`.
BypassMode *string `json:"bypassMode,omitempty" tf:"bypass_mode,omitempty"`
}
type BypassActorsObservation struct {
// The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.
ActorID *float64 `json:"actorId,omitempty" tf:"actor_id,omitempty"`
// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.
ActorType *string `json:"actorType,omitempty" tf:"actor_type,omitempty"`
// When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`.
BypassMode *string `json:"bypassMode,omitempty" tf:"bypass_mode,omitempty"`
}
type BypassActorsParameters struct {
// The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.
// +kubebuilder:validation:Optional
ActorID *float64 `json:"actorId" tf:"actor_id,omitempty"`
// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.
// +kubebuilder:validation:Optional
ActorType *string `json:"actorType" tf:"actor_type,omitempty"`
// When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`.
// +kubebuilder:validation:Optional
BypassMode *string `json:"bypassMode" tf:"bypass_mode,omitempty"`
}
type CommitAuthorEmailPatternInitParameters struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type CommitAuthorEmailPatternObservation struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type CommitAuthorEmailPatternParameters struct {
// How this rule will appear to users.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
// +kubebuilder:validation:Optional
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
// +kubebuilder:validation:Optional
Operator *string `json:"operator" tf:"operator,omitempty"`
// The pattern to match with.
// +kubebuilder:validation:Optional
Pattern *string `json:"pattern" tf:"pattern,omitempty"`
}
type CommitMessagePatternInitParameters struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type CommitMessagePatternObservation struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type CommitMessagePatternParameters struct {
// How this rule will appear to users.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
// +kubebuilder:validation:Optional
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
// +kubebuilder:validation:Optional
Operator *string `json:"operator" tf:"operator,omitempty"`
// The pattern to match with.
// +kubebuilder:validation:Optional
Pattern *string `json:"pattern" tf:"pattern,omitempty"`
}
type CommitterEmailPatternInitParameters struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type CommitterEmailPatternObservation struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type CommitterEmailPatternParameters struct {
// How this rule will appear to users.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
// +kubebuilder:validation:Optional
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
// +kubebuilder:validation:Optional
Operator *string `json:"operator" tf:"operator,omitempty"`
// The pattern to match with.
// +kubebuilder:validation:Optional
Pattern *string `json:"pattern" tf:"pattern,omitempty"`
}
type ConditionsInitParameters struct {
RefName []RefNameInitParameters `json:"refName,omitempty" tf:"ref_name,omitempty"`
// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.
RepositoryID []*float64 `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
RepositoryName []RepositoryNameInitParameters `json:"repositoryName,omitempty" tf:"repository_name,omitempty"`
}
type ConditionsObservation struct {
RefName []RefNameObservation `json:"refName,omitempty" tf:"ref_name,omitempty"`
// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.
RepositoryID []*float64 `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
RepositoryName []RepositoryNameObservation `json:"repositoryName,omitempty" tf:"repository_name,omitempty"`
}
type ConditionsParameters struct {
// +kubebuilder:validation:Optional
RefName []RefNameParameters `json:"refName" tf:"ref_name,omitempty"`
// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.
// +kubebuilder:validation:Optional
RepositoryID []*float64 `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
// +kubebuilder:validation:Optional
RepositoryName []RepositoryNameParameters `json:"repositoryName,omitempty" tf:"repository_name,omitempty"`
}
type OrganizationRulesetInitParameters struct {
// The actors that can bypass the rules in this ruleset.
BypassActors []BypassActorsInitParameters `json:"bypassActors,omitempty" tf:"bypass_actors,omitempty"`
// Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`.
Conditions []ConditionsInitParameters `json:"conditions,omitempty" tf:"conditions,omitempty"`
// Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
Enforcement *string `json:"enforcement,omitempty" tf:"enforcement,omitempty"`
// The name of the ruleset.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Rules within the ruleset.
Rules []RulesInitParameters `json:"rules,omitempty" tf:"rules,omitempty"`
// Possible values are `branch` and `tag`.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type OrganizationRulesetObservation struct {
// The actors that can bypass the rules in this ruleset.
BypassActors []BypassActorsObservation `json:"bypassActors,omitempty" tf:"bypass_actors,omitempty"`
// Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`.
Conditions []ConditionsObservation `json:"conditions,omitempty" tf:"conditions,omitempty"`
// Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
Enforcement *string `json:"enforcement,omitempty" tf:"enforcement,omitempty"`
Etag *string `json:"etag,omitempty" tf:"etag,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The name of the ruleset.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// GraphQL global node id for use with v4 API.
NodeID *string `json:"nodeId,omitempty" tf:"node_id,omitempty"`
// Rules within the ruleset.
Rules []RulesObservation `json:"rules,omitempty" tf:"rules,omitempty"`
// GitHub ID for the ruleset.
RulesetID *float64 `json:"rulesetId,omitempty" tf:"ruleset_id,omitempty"`
// Possible values are `branch` and `tag`.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type OrganizationRulesetParameters struct {
// The actors that can bypass the rules in this ruleset.
// +kubebuilder:validation:Optional
BypassActors []BypassActorsParameters `json:"bypassActors,omitempty" tf:"bypass_actors,omitempty"`
// Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`.
// +kubebuilder:validation:Optional
Conditions []ConditionsParameters `json:"conditions,omitempty" tf:"conditions,omitempty"`
// Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
// +kubebuilder:validation:Optional
Enforcement *string `json:"enforcement,omitempty" tf:"enforcement,omitempty"`
// The name of the ruleset.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Rules within the ruleset.
// +kubebuilder:validation:Optional
Rules []RulesParameters `json:"rules,omitempty" tf:"rules,omitempty"`
// Possible values are `branch` and `tag`.
// +kubebuilder:validation:Optional
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type PullRequestInitParameters struct {
// New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.
DismissStaleReviewsOnPush *bool `json:"dismissStaleReviewsOnPush,omitempty" tf:"dismiss_stale_reviews_on_push,omitempty"`
// Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`.
RequireCodeOwnerReview *bool `json:"requireCodeOwnerReview,omitempty" tf:"require_code_owner_review,omitempty"`
// Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`.
RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"`
// The number of approving reviews that are required before a pull request can be merged. Defaults to `0`.
RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"`
// All conversations on code must be resolved before a pull request can be merged. Defaults to `false`.
RequiredReviewThreadResolution *bool `json:"requiredReviewThreadResolution,omitempty" tf:"required_review_thread_resolution,omitempty"`
}
type PullRequestObservation struct {
// New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.
DismissStaleReviewsOnPush *bool `json:"dismissStaleReviewsOnPush,omitempty" tf:"dismiss_stale_reviews_on_push,omitempty"`
// Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`.
RequireCodeOwnerReview *bool `json:"requireCodeOwnerReview,omitempty" tf:"require_code_owner_review,omitempty"`
// Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`.
RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"`
// The number of approving reviews that are required before a pull request can be merged. Defaults to `0`.
RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"`
// All conversations on code must be resolved before a pull request can be merged. Defaults to `false`.
RequiredReviewThreadResolution *bool `json:"requiredReviewThreadResolution,omitempty" tf:"required_review_thread_resolution,omitempty"`
}
type PullRequestParameters struct {
// New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.
// +kubebuilder:validation:Optional
DismissStaleReviewsOnPush *bool `json:"dismissStaleReviewsOnPush,omitempty" tf:"dismiss_stale_reviews_on_push,omitempty"`
// Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`.
// +kubebuilder:validation:Optional
RequireCodeOwnerReview *bool `json:"requireCodeOwnerReview,omitempty" tf:"require_code_owner_review,omitempty"`
// Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`.
// +kubebuilder:validation:Optional
RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"`
// The number of approving reviews that are required before a pull request can be merged. Defaults to `0`.
// +kubebuilder:validation:Optional
RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"`
// All conversations on code must be resolved before a pull request can be merged. Defaults to `false`.
// +kubebuilder:validation:Optional
RequiredReviewThreadResolution *bool `json:"requiredReviewThreadResolution,omitempty" tf:"required_review_thread_resolution,omitempty"`
}
type RefNameInitParameters struct {
// Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
}
type RefNameObservation struct {
// Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
}
type RefNameParameters struct {
// Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
// +kubebuilder:validation:Optional
Exclude []*string `json:"exclude" tf:"exclude,omitempty"`
// Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.
// +kubebuilder:validation:Optional
Include []*string `json:"include" tf:"include,omitempty"`
}
type RepositoryNameInitParameters struct {
// Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
// Whether renaming of target repositories is prevented.
Protected *bool `json:"protected,omitempty" tf:"protected,omitempty"`
}
type RepositoryNameObservation struct {
// Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
// Whether renaming of target repositories is prevented.
Protected *bool `json:"protected,omitempty" tf:"protected,omitempty"`
}
type RepositoryNameParameters struct {
// Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.
// +kubebuilder:validation:Optional
Exclude []*string `json:"exclude" tf:"exclude,omitempty"`
// Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.
// +kubebuilder:validation:Optional
Include []*string `json:"include" tf:"include,omitempty"`
// Whether renaming of target repositories is prevented.
// +kubebuilder:validation:Optional
Protected *bool `json:"protected,omitempty" tf:"protected,omitempty"`
}
type RequiredCheckInitParameters struct {
// The status check context name that must be present on the commit.
Context *string `json:"context,omitempty" tf:"context,omitempty"`
// The optional integration ID that this status check must originate from.
IntegrationID *float64 `json:"integrationId,omitempty" tf:"integration_id,omitempty"`
}
type RequiredCheckObservation struct {
// The status check context name that must be present on the commit.
Context *string `json:"context,omitempty" tf:"context,omitempty"`
// The optional integration ID that this status check must originate from.
IntegrationID *float64 `json:"integrationId,omitempty" tf:"integration_id,omitempty"`
}
type RequiredCheckParameters struct {
// The status check context name that must be present on the commit.
// +kubebuilder:validation:Optional
Context *string `json:"context" tf:"context,omitempty"`
// The optional integration ID that this status check must originate from.
// +kubebuilder:validation:Optional
IntegrationID *float64 `json:"integrationId,omitempty" tf:"integration_id,omitempty"`
}
type RequiredStatusChecksInitParameters struct {
// Status checks that are required. Several can be defined.
RequiredCheck []RequiredCheckInitParameters `json:"requiredCheck,omitempty" tf:"required_check,omitempty"`
// Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.
StrictRequiredStatusChecksPolicy *bool `json:"strictRequiredStatusChecksPolicy,omitempty" tf:"strict_required_status_checks_policy,omitempty"`
}
type RequiredStatusChecksObservation struct {
// Status checks that are required. Several can be defined.
RequiredCheck []RequiredCheckObservation `json:"requiredCheck,omitempty" tf:"required_check,omitempty"`
// Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.
StrictRequiredStatusChecksPolicy *bool `json:"strictRequiredStatusChecksPolicy,omitempty" tf:"strict_required_status_checks_policy,omitempty"`
}
type RequiredStatusChecksParameters struct {
// Status checks that are required. Several can be defined.
// +kubebuilder:validation:Optional
RequiredCheck []RequiredCheckParameters `json:"requiredCheck" tf:"required_check,omitempty"`
// Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.
// +kubebuilder:validation:Optional
StrictRequiredStatusChecksPolicy *bool `json:"strictRequiredStatusChecksPolicy,omitempty" tf:"strict_required_status_checks_policy,omitempty"`
}
type RequiredWorkflowInitParameters struct {
// The path to the workflow YAML definition file.
Path *string `json:"path,omitempty" tf:"path,omitempty"`
// The ref (branch or tag) of the workflow file to use.
Ref *string `json:"ref,omitempty" tf:"ref,omitempty"`
// The repository in which the workflow is defined.
RepositoryID *float64 `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
}
type RequiredWorkflowObservation struct {
// The path to the workflow YAML definition file.
Path *string `json:"path,omitempty" tf:"path,omitempty"`
// The ref (branch or tag) of the workflow file to use.
Ref *string `json:"ref,omitempty" tf:"ref,omitempty"`
// The repository in which the workflow is defined.
RepositoryID *float64 `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
}
type RequiredWorkflowParameters struct {
// The path to the workflow YAML definition file.
// +kubebuilder:validation:Optional
Path *string `json:"path" tf:"path,omitempty"`
// The ref (branch or tag) of the workflow file to use.
// +kubebuilder:validation:Optional
Ref *string `json:"ref,omitempty" tf:"ref,omitempty"`
// The repository in which the workflow is defined.
// +kubebuilder:validation:Optional
RepositoryID *float64 `json:"repositoryId" tf:"repository_id,omitempty"`
}
type RequiredWorkflowsInitParameters struct {
// Actions workflows that are required. Several can be defined.
RequiredWorkflow []RequiredWorkflowInitParameters `json:"requiredWorkflow,omitempty" tf:"required_workflow,omitempty"`
}
type RequiredWorkflowsObservation struct {
// Actions workflows that are required. Several can be defined.
RequiredWorkflow []RequiredWorkflowObservation `json:"requiredWorkflow,omitempty" tf:"required_workflow,omitempty"`
}
type RequiredWorkflowsParameters struct {
// Actions workflows that are required. Several can be defined.
// +kubebuilder:validation:Optional
RequiredWorkflow []RequiredWorkflowParameters `json:"requiredWorkflow" tf:"required_workflow,omitempty"`
}
type RulesInitParameters struct {
// Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`.
BranchNamePattern []BranchNamePatternInitParameters `json:"branchNamePattern,omitempty" tf:"branch_name_pattern,omitempty"`
// Parameters to be used for the commit_author_email_pattern rule.
CommitAuthorEmailPattern []CommitAuthorEmailPatternInitParameters `json:"commitAuthorEmailPattern,omitempty" tf:"commit_author_email_pattern,omitempty"`
// Parameters to be used for the commit_message_pattern rule.
CommitMessagePattern []CommitMessagePatternInitParameters `json:"commitMessagePattern,omitempty" tf:"commit_message_pattern,omitempty"`
// Parameters to be used for the committer_email_pattern rule.
CommitterEmailPattern []CommitterEmailPatternInitParameters `json:"committerEmailPattern,omitempty" tf:"committer_email_pattern,omitempty"`
// Only allow users with bypass permission to create matching refs.
Creation *bool `json:"creation,omitempty" tf:"creation,omitempty"`
// Only allow users with bypass permissions to delete matching refs.
Deletion *bool `json:"deletion,omitempty" tf:"deletion,omitempty"`
// Prevent users with push access from force pushing to branches.
NonFastForward *bool `json:"nonFastForward,omitempty" tf:"non_fast_forward,omitempty"`
// Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.
PullRequest []PullRequestInitParameters `json:"pullRequest,omitempty" tf:"pull_request,omitempty"`
// Prevent merge commits from being pushed to matching branches.
RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"`
// Commits pushed to matching branches must have verified signatures.
RequiredSignatures *bool `json:"requiredSignatures,omitempty" tf:"required_signatures,omitempty"`
// Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed.
RequiredStatusChecks []RequiredStatusChecksInitParameters `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"`
// Choose which Actions workflows must pass before branches can be merged into a branch that matches this rule.
RequiredWorkflows []RequiredWorkflowsInitParameters `json:"requiredWorkflows,omitempty" tf:"required_workflows,omitempty"`
// Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`.
TagNamePattern []TagNamePatternInitParameters `json:"tagNamePattern,omitempty" tf:"tag_name_pattern,omitempty"`
// Only allow users with bypass permission to update matching refs.
Update *bool `json:"update,omitempty" tf:"update,omitempty"`
}
type RulesObservation struct {
// Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`.
BranchNamePattern []BranchNamePatternObservation `json:"branchNamePattern,omitempty" tf:"branch_name_pattern,omitempty"`
// Parameters to be used for the commit_author_email_pattern rule.
CommitAuthorEmailPattern []CommitAuthorEmailPatternObservation `json:"commitAuthorEmailPattern,omitempty" tf:"commit_author_email_pattern,omitempty"`
// Parameters to be used for the commit_message_pattern rule.
CommitMessagePattern []CommitMessagePatternObservation `json:"commitMessagePattern,omitempty" tf:"commit_message_pattern,omitempty"`
// Parameters to be used for the committer_email_pattern rule.
CommitterEmailPattern []CommitterEmailPatternObservation `json:"committerEmailPattern,omitempty" tf:"committer_email_pattern,omitempty"`
// Only allow users with bypass permission to create matching refs.
Creation *bool `json:"creation,omitempty" tf:"creation,omitempty"`
// Only allow users with bypass permissions to delete matching refs.
Deletion *bool `json:"deletion,omitempty" tf:"deletion,omitempty"`
// Prevent users with push access from force pushing to branches.
NonFastForward *bool `json:"nonFastForward,omitempty" tf:"non_fast_forward,omitempty"`
// Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.
PullRequest []PullRequestObservation `json:"pullRequest,omitempty" tf:"pull_request,omitempty"`
// Prevent merge commits from being pushed to matching branches.
RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"`
// Commits pushed to matching branches must have verified signatures.
RequiredSignatures *bool `json:"requiredSignatures,omitempty" tf:"required_signatures,omitempty"`
// Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed.
RequiredStatusChecks []RequiredStatusChecksObservation `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"`
// Choose which Actions workflows must pass before branches can be merged into a branch that matches this rule.
RequiredWorkflows []RequiredWorkflowsObservation `json:"requiredWorkflows,omitempty" tf:"required_workflows,omitempty"`
// Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`.
TagNamePattern []TagNamePatternObservation `json:"tagNamePattern,omitempty" tf:"tag_name_pattern,omitempty"`
// Only allow users with bypass permission to update matching refs.
Update *bool `json:"update,omitempty" tf:"update,omitempty"`
}
type RulesParameters struct {
// Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`.
// +kubebuilder:validation:Optional
BranchNamePattern []BranchNamePatternParameters `json:"branchNamePattern,omitempty" tf:"branch_name_pattern,omitempty"`
// Parameters to be used for the commit_author_email_pattern rule.
// +kubebuilder:validation:Optional
CommitAuthorEmailPattern []CommitAuthorEmailPatternParameters `json:"commitAuthorEmailPattern,omitempty" tf:"commit_author_email_pattern,omitempty"`
// Parameters to be used for the commit_message_pattern rule.
// +kubebuilder:validation:Optional
CommitMessagePattern []CommitMessagePatternParameters `json:"commitMessagePattern,omitempty" tf:"commit_message_pattern,omitempty"`
// Parameters to be used for the committer_email_pattern rule.
// +kubebuilder:validation:Optional
CommitterEmailPattern []CommitterEmailPatternParameters `json:"committerEmailPattern,omitempty" tf:"committer_email_pattern,omitempty"`
// Only allow users with bypass permission to create matching refs.
// +kubebuilder:validation:Optional
Creation *bool `json:"creation,omitempty" tf:"creation,omitempty"`
// Only allow users with bypass permissions to delete matching refs.
// +kubebuilder:validation:Optional
Deletion *bool `json:"deletion,omitempty" tf:"deletion,omitempty"`
// Prevent users with push access from force pushing to branches.
// +kubebuilder:validation:Optional
NonFastForward *bool `json:"nonFastForward,omitempty" tf:"non_fast_forward,omitempty"`
// Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.
// +kubebuilder:validation:Optional
PullRequest []PullRequestParameters `json:"pullRequest,omitempty" tf:"pull_request,omitempty"`
// Prevent merge commits from being pushed to matching branches.
// +kubebuilder:validation:Optional
RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"`
// Commits pushed to matching branches must have verified signatures.
// +kubebuilder:validation:Optional
RequiredSignatures *bool `json:"requiredSignatures,omitempty" tf:"required_signatures,omitempty"`
// Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed.
// +kubebuilder:validation:Optional
RequiredStatusChecks []RequiredStatusChecksParameters `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"`
// Choose which Actions workflows must pass before branches can be merged into a branch that matches this rule.
// +kubebuilder:validation:Optional
RequiredWorkflows []RequiredWorkflowsParameters `json:"requiredWorkflows,omitempty" tf:"required_workflows,omitempty"`
// Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`.
// +kubebuilder:validation:Optional
TagNamePattern []TagNamePatternParameters `json:"tagNamePattern,omitempty" tf:"tag_name_pattern,omitempty"`
// Only allow users with bypass permission to update matching refs.
// +kubebuilder:validation:Optional
Update *bool `json:"update,omitempty" tf:"update,omitempty"`
}
type TagNamePatternInitParameters struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type TagNamePatternObservation struct {
// How this rule will appear to users.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Operator *string `json:"operator,omitempty" tf:"operator,omitempty"`
// The pattern to match with.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
}
type TagNamePatternParameters struct {
// How this rule will appear to users.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// If true, the rule will fail if the pattern matches.
// +kubebuilder:validation:Optional
Negate *bool `json:"negate,omitempty" tf:"negate,omitempty"`
// The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
// +kubebuilder:validation:Optional
Operator *string `json:"operator" tf:"operator,omitempty"`
// The pattern to match with.
// +kubebuilder:validation:Optional
Pattern *string `json:"pattern" tf:"pattern,omitempty"`
}
// OrganizationRulesetSpec defines the desired state of OrganizationRuleset
type OrganizationRulesetSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider OrganizationRulesetParameters `json:"forProvider"`
// THIS IS A BETA FIELD. It will be honored
// unless the Management Policies feature flag is disabled.
// InitProvider holds the same fields as ForProvider, with the exception
// of Identifier and other resource reference fields. The fields that are
// in InitProvider are merged into ForProvider when the resource is created.
// The same fields are also added to the terraform ignore_changes hook, to
// avoid updating them after creation. This is useful for fields that are
// required on creation, but we do not desire to update them after creation,
// for example because of an external controller is managing them, like an
// autoscaler.
InitProvider OrganizationRulesetInitParameters `json:"initProvider,omitempty"`
}
// OrganizationRulesetStatus defines the observed state of OrganizationRuleset.
type OrganizationRulesetStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider OrganizationRulesetObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// OrganizationRuleset is the Schema for the OrganizationRulesets API. <no value>
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github}
type OrganizationRuleset struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.enforcement) || (has(self.initProvider) && has(self.initProvider.enforcement))",message="spec.forProvider.enforcement is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.rules) || (has(self.initProvider) && has(self.initProvider.rules))",message="spec.forProvider.rules is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.target) || (has(self.initProvider) && has(self.initProvider.target))",message="spec.forProvider.target is a required parameter"
Spec OrganizationRulesetSpec `json:"spec"`
Status OrganizationRulesetStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// OrganizationRulesetList contains a list of OrganizationRulesets
type OrganizationRulesetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OrganizationRuleset `json:"items"`
}
// Repository type metadata.
var (
OrganizationRuleset_Kind = "OrganizationRuleset"
OrganizationRuleset_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: OrganizationRuleset_Kind}.String()
OrganizationRuleset_KindAPIVersion = OrganizationRuleset_Kind + "." + CRDGroupVersion.String()
OrganizationRuleset_GroupVersionKind = CRDGroupVersion.WithKind(OrganizationRuleset_Kind)
)
func init() {
SchemeBuilder.Register(&OrganizationRuleset{}, &OrganizationRulesetList{})
}