generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
zz_branchprotection_types.go
executable file
·444 lines (348 loc) · 27.1 KB
/
zz_branchprotection_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
// 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 BranchProtectionInitParameters struct {
// Boolean, setting this to true to allow the branch to be deleted.
// Setting this to 'true' to allow the branch to be deleted.
AllowsDeletions *bool `json:"allowsDeletions,omitempty" tf:"allows_deletions,omitempty"`
// Boolean, setting this to true to allow force pushes on the branch.
// Setting this to 'true' to allow force pushes on the branch.
AllowsForcePushes *bool `json:"allowsForcePushes,omitempty" tf:"allows_force_pushes,omitempty"`
// Boolean, setting this to true to block creating the branch.
// Setting this to 'true' to block creating the branch.
BlocksCreations *bool `json:"blocksCreations,omitempty" tf:"blocks_creations,omitempty"`
// Boolean, setting this to true enforces status checks for repository administrators.
// Setting this to 'true' enforces status checks for repository administrators.
EnforceAdmins *bool `json:"enforceAdmins,omitempty" tf:"enforce_admins,omitempty"`
// The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
ForcePushBypassers []*string `json:"forcePushBypassers,omitempty" tf:"force_push_bypassers,omitempty"`
// Boolean, Setting this to true will make the branch read-only and preventing any pushes to it. Defaults to false
// Setting this to 'true' will make the branch read-only and preventing any pushes to it.
LockBranch *bool `json:"lockBranch,omitempty" tf:"lock_branch,omitempty"`
// Identifies the protection rule pattern.
// Identifies the protection rule pattern.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
// The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that may push to the branch. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"`
// The name or node ID of the repository associated with this branch protection rule.
// The name or node ID of the repository associated with this branch protection rule.
// +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository
RepositoryID *string `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
// Reference to a Repository in repo to populate repositoryId.
// +kubebuilder:validation:Optional
RepositoryIDRef *v1.Reference `json:"repositoryIdRef,omitempty" tf:"-"`
// Selector for a Repository in repo to populate repositoryId.
// +kubebuilder:validation:Optional
RepositoryIDSelector *v1.Selector `json:"repositoryIdSelector,omitempty" tf:"-"`
// Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged.
// Setting this to 'true' requires all conversations on code must be resolved before a pull request can be merged.
RequireConversationResolution *bool `json:"requireConversationResolution,omitempty" tf:"require_conversation_resolution,omitempty"`
// Boolean, setting this to true requires all commits to be signed with GPG.
// Setting this to 'true' requires all commits to be signed with GPG.
RequireSignedCommits *bool `json:"requireSignedCommits,omitempty" tf:"require_signed_commits,omitempty"`
// Boolean, setting this to true enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch
// Setting this to 'true' enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch.
RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"`
// Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
// Enforce restrictions for pull request reviews.
RequiredPullRequestReviews []RequiredPullRequestReviewsInitParameters `json:"requiredPullRequestReviews,omitempty" tf:"required_pull_request_reviews,omitempty"`
// Enforce restrictions for required status checks. See Required Status Checks below for details.
// Enforce restrictions for required status checks.
RequiredStatusChecks []RequiredStatusChecksInitParameters `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"`
}
type BranchProtectionObservation struct {
// Boolean, setting this to true to allow the branch to be deleted.
// Setting this to 'true' to allow the branch to be deleted.
AllowsDeletions *bool `json:"allowsDeletions,omitempty" tf:"allows_deletions,omitempty"`
// Boolean, setting this to true to allow force pushes on the branch.
// Setting this to 'true' to allow force pushes on the branch.
AllowsForcePushes *bool `json:"allowsForcePushes,omitempty" tf:"allows_force_pushes,omitempty"`
// Boolean, setting this to true to block creating the branch.
// Setting this to 'true' to block creating the branch.
BlocksCreations *bool `json:"blocksCreations,omitempty" tf:"blocks_creations,omitempty"`
// Boolean, setting this to true enforces status checks for repository administrators.
// Setting this to 'true' enforces status checks for repository administrators.
EnforceAdmins *bool `json:"enforceAdmins,omitempty" tf:"enforce_admins,omitempty"`
// The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
ForcePushBypassers []*string `json:"forcePushBypassers,omitempty" tf:"force_push_bypassers,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Boolean, Setting this to true will make the branch read-only and preventing any pushes to it. Defaults to false
// Setting this to 'true' will make the branch read-only and preventing any pushes to it.
LockBranch *bool `json:"lockBranch,omitempty" tf:"lock_branch,omitempty"`
// Identifies the protection rule pattern.
// Identifies the protection rule pattern.
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
// The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that may push to the branch. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"`
// The name or node ID of the repository associated with this branch protection rule.
// The name or node ID of the repository associated with this branch protection rule.
RepositoryID *string `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
// Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged.
// Setting this to 'true' requires all conversations on code must be resolved before a pull request can be merged.
RequireConversationResolution *bool `json:"requireConversationResolution,omitempty" tf:"require_conversation_resolution,omitempty"`
// Boolean, setting this to true requires all commits to be signed with GPG.
// Setting this to 'true' requires all commits to be signed with GPG.
RequireSignedCommits *bool `json:"requireSignedCommits,omitempty" tf:"require_signed_commits,omitempty"`
// Boolean, setting this to true enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch
// Setting this to 'true' enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch.
RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"`
// Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
// Enforce restrictions for pull request reviews.
RequiredPullRequestReviews []RequiredPullRequestReviewsObservation `json:"requiredPullRequestReviews,omitempty" tf:"required_pull_request_reviews,omitempty"`
// Enforce restrictions for required status checks. See Required Status Checks below for details.
// Enforce restrictions for required status checks.
RequiredStatusChecks []RequiredStatusChecksObservation `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"`
}
type BranchProtectionParameters struct {
// Boolean, setting this to true to allow the branch to be deleted.
// Setting this to 'true' to allow the branch to be deleted.
// +kubebuilder:validation:Optional
AllowsDeletions *bool `json:"allowsDeletions,omitempty" tf:"allows_deletions,omitempty"`
// Boolean, setting this to true to allow force pushes on the branch.
// Setting this to 'true' to allow force pushes on the branch.
// +kubebuilder:validation:Optional
AllowsForcePushes *bool `json:"allowsForcePushes,omitempty" tf:"allows_force_pushes,omitempty"`
// Boolean, setting this to true to block creating the branch.
// Setting this to 'true' to block creating the branch.
// +kubebuilder:validation:Optional
BlocksCreations *bool `json:"blocksCreations,omitempty" tf:"blocks_creations,omitempty"`
// Boolean, setting this to true enforces status checks for repository administrators.
// Setting this to 'true' enforces status checks for repository administrators.
// +kubebuilder:validation:Optional
EnforceAdmins *bool `json:"enforceAdmins,omitempty" tf:"enforce_admins,omitempty"`
// The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +kubebuilder:validation:Optional
// +listType=set
ForcePushBypassers []*string `json:"forcePushBypassers,omitempty" tf:"force_push_bypassers,omitempty"`
// Boolean, Setting this to true will make the branch read-only and preventing any pushes to it. Defaults to false
// Setting this to 'true' will make the branch read-only and preventing any pushes to it.
// +kubebuilder:validation:Optional
LockBranch *bool `json:"lockBranch,omitempty" tf:"lock_branch,omitempty"`
// Identifies the protection rule pattern.
// Identifies the protection rule pattern.
// +kubebuilder:validation:Optional
Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"`
// The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that may push to the branch. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +kubebuilder:validation:Optional
// +listType=set
PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"`
// The name or node ID of the repository associated with this branch protection rule.
// The name or node ID of the repository associated with this branch protection rule.
// +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository
// +kubebuilder:validation:Optional
RepositoryID *string `json:"repositoryId,omitempty" tf:"repository_id,omitempty"`
// Reference to a Repository in repo to populate repositoryId.
// +kubebuilder:validation:Optional
RepositoryIDRef *v1.Reference `json:"repositoryIdRef,omitempty" tf:"-"`
// Selector for a Repository in repo to populate repositoryId.
// +kubebuilder:validation:Optional
RepositoryIDSelector *v1.Selector `json:"repositoryIdSelector,omitempty" tf:"-"`
// Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged.
// Setting this to 'true' requires all conversations on code must be resolved before a pull request can be merged.
// +kubebuilder:validation:Optional
RequireConversationResolution *bool `json:"requireConversationResolution,omitempty" tf:"require_conversation_resolution,omitempty"`
// Boolean, setting this to true requires all commits to be signed with GPG.
// Setting this to 'true' requires all commits to be signed with GPG.
// +kubebuilder:validation:Optional
RequireSignedCommits *bool `json:"requireSignedCommits,omitempty" tf:"require_signed_commits,omitempty"`
// Boolean, setting this to true enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch
// Setting this to 'true' enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch.
// +kubebuilder:validation:Optional
RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"`
// Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
// Enforce restrictions for pull request reviews.
// +kubebuilder:validation:Optional
RequiredPullRequestReviews []RequiredPullRequestReviewsParameters `json:"requiredPullRequestReviews,omitempty" tf:"required_pull_request_reviews,omitempty"`
// Enforce restrictions for required status checks. See Required Status Checks below for details.
// Enforce restrictions for required status checks.
// +kubebuilder:validation:Optional
RequiredStatusChecks []RequiredStatusChecksParameters `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"`
}
type RequiredPullRequestReviewsInitParameters struct {
// : Dismiss approved reviews automatically when a new commit is pushed. Defaults to false.
// Dismiss approved reviews automatically when a new commit is pushed.
DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"`
// : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs with dismissal access. If not empty, 'restrict_dismissals' is ignored. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"`
// : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"`
// : Require an approved review in pull requests including files with a designated code owner. Defaults to false.
// Require an approved review in pull requests including files with a designated code owner.
RequireCodeOwnerReviews *bool `json:"requireCodeOwnerReviews,omitempty" tf:"require_code_owner_reviews,omitempty"`
// : Require that The most recent push must be approved by someone other than the last pusher. Defaults to false
// Require that The most recent push must be approved by someone other than the last pusher.
RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"`
// 6. This requirement matches GitHub's API, see the upstream documentation for more information.
// (https://developer.github.com/v3/repos/branches/#parameters-1) for more information.
// Require 'x' number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6.
RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"`
// : Restrict pull request review dismissals.
// Restrict pull request review dismissals.
RestrictDismissals *bool `json:"restrictDismissals,omitempty" tf:"restrict_dismissals,omitempty"`
}
type RequiredPullRequestReviewsObservation struct {
// : Dismiss approved reviews automatically when a new commit is pushed. Defaults to false.
// Dismiss approved reviews automatically when a new commit is pushed.
DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"`
// : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs with dismissal access. If not empty, 'restrict_dismissals' is ignored. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"`
// : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +listType=set
PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"`
// : Require an approved review in pull requests including files with a designated code owner. Defaults to false.
// Require an approved review in pull requests including files with a designated code owner.
RequireCodeOwnerReviews *bool `json:"requireCodeOwnerReviews,omitempty" tf:"require_code_owner_reviews,omitempty"`
// : Require that The most recent push must be approved by someone other than the last pusher. Defaults to false
// Require that The most recent push must be approved by someone other than the last pusher.
RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"`
// 6. This requirement matches GitHub's API, see the upstream documentation for more information.
// (https://developer.github.com/v3/repos/branches/#parameters-1) for more information.
// Require 'x' number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6.
RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"`
// : Restrict pull request review dismissals.
// Restrict pull request review dismissals.
RestrictDismissals *bool `json:"restrictDismissals,omitempty" tf:"restrict_dismissals,omitempty"`
}
type RequiredPullRequestReviewsParameters struct {
// : Dismiss approved reviews automatically when a new commit is pushed. Defaults to false.
// Dismiss approved reviews automatically when a new commit is pushed.
// +kubebuilder:validation:Optional
DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"`
// : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs with dismissal access. If not empty, 'restrict_dismissals' is ignored. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +kubebuilder:validation:Optional
// +listType=set
DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"`
// : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams.
// The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a '/' for users or the organization name followed by a '/' for teams.
// +kubebuilder:validation:Optional
// +listType=set
PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"`
// : Require an approved review in pull requests including files with a designated code owner. Defaults to false.
// Require an approved review in pull requests including files with a designated code owner.
// +kubebuilder:validation:Optional
RequireCodeOwnerReviews *bool `json:"requireCodeOwnerReviews,omitempty" tf:"require_code_owner_reviews,omitempty"`
// : Require that The most recent push must be approved by someone other than the last pusher. Defaults to false
// Require that The most recent push must be approved by someone other than the last pusher.
// +kubebuilder:validation:Optional
RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"`
// 6. This requirement matches GitHub's API, see the upstream documentation for more information.
// (https://developer.github.com/v3/repos/branches/#parameters-1) for more information.
// Require 'x' number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6.
// +kubebuilder:validation:Optional
RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"`
// : Restrict pull request review dismissals.
// Restrict pull request review dismissals.
// +kubebuilder:validation:Optional
RestrictDismissals *bool `json:"restrictDismissals,omitempty" tf:"restrict_dismissals,omitempty"`
}
type RequiredStatusChecksInitParameters struct {
// : The list of status checks to require in order to merge into this branch. No status checks are required by default.
// The list of status checks to require in order to merge into this branch. No status checks are required by default.
// +listType=set
Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"`
// : Require branches to be up to date before merging. Defaults to false.
// Require branches to be up to date before merging.
Strict *bool `json:"strict,omitempty" tf:"strict,omitempty"`
}
type RequiredStatusChecksObservation struct {
// : The list of status checks to require in order to merge into this branch. No status checks are required by default.
// The list of status checks to require in order to merge into this branch. No status checks are required by default.
// +listType=set
Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"`
// : Require branches to be up to date before merging. Defaults to false.
// Require branches to be up to date before merging.
Strict *bool `json:"strict,omitempty" tf:"strict,omitempty"`
}
type RequiredStatusChecksParameters struct {
// : The list of status checks to require in order to merge into this branch. No status checks are required by default.
// The list of status checks to require in order to merge into this branch. No status checks are required by default.
// +kubebuilder:validation:Optional
// +listType=set
Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"`
// : Require branches to be up to date before merging. Defaults to false.
// Require branches to be up to date before merging.
// +kubebuilder:validation:Optional
Strict *bool `json:"strict,omitempty" tf:"strict,omitempty"`
}
// BranchProtectionSpec defines the desired state of BranchProtection
type BranchProtectionSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider BranchProtectionParameters `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 BranchProtectionInitParameters `json:"initProvider,omitempty"`
}
// BranchProtectionStatus defines the observed state of BranchProtection.
type BranchProtectionStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider BranchProtectionObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// BranchProtection is the Schema for the BranchProtections API. Protects a GitHub branch.
// +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 BranchProtection 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.pattern) || (has(self.initProvider) && has(self.initProvider.pattern))",message="spec.forProvider.pattern is a required parameter"
Spec BranchProtectionSpec `json:"spec"`
Status BranchProtectionStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// BranchProtectionList contains a list of BranchProtections
type BranchProtectionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BranchProtection `json:"items"`
}
// Repository type metadata.
var (
BranchProtection_Kind = "BranchProtection"
BranchProtection_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: BranchProtection_Kind}.String()
BranchProtection_KindAPIVersion = BranchProtection_Kind + "." + CRDGroupVersion.String()
BranchProtection_GroupVersionKind = CRDGroupVersion.WithKind(BranchProtection_Kind)
)
func init() {
SchemeBuilder.Register(&BranchProtection{}, &BranchProtectionList{})
}