generated from crossplane/upjet-provider-template
/
zz_project_types.go
executable file
·293 lines (226 loc) · 17 KB
/
zz_project_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
/*
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 ApprovalSettingsObservation struct {
// Set to true if changes can be applied as long as the min_num_approvals is met, regardless of whether any reviewers have declined a request. Defaults to true.
// Whether changes can be applied as long as minNumApprovals is met, regardless of whether any reviewers have declined a request. Defaults to true
CanApplyDeclinedChanges *bool `json:"canApplyDeclinedChanges,omitempty" tf:"can_apply_declined_changes,omitempty"`
// Set to true if requesters can approve or decline their own request. They may always comment. Defaults to false.
// Whether requesters can approve or decline their own request. They may always comment.
CanReviewOwnRequest *bool `json:"canReviewOwnRequest,omitempty" tf:"can_review_own_request,omitempty"`
// The number of approvals required before an approval request can be applied. This number must be between 1 and 5. Defaults to 1.
// The number of approvals required before an approval request can be applied.
MinNumApprovals *float64 `json:"minNumApprovals,omitempty" tf:"min_num_approvals,omitempty"`
// Set to true for changes to flags in this environment to require approval. You may only set required to true if required_approval_tags is not set and vice versa. Defaults to false.
// Whether any changes to flags in this environment will require approval. You may only set required or requiredApprovalTags, not both.
Required *bool `json:"required,omitempty" tf:"required,omitempty"`
// An array of tags used to specify which flags with those tags require approval. You may only set required_approval_tags if required is not set to true and vice versa.
// An array of tags used to specify which flags with those tags require approval. You may only set requiredApprovalTags or required, not both.
RequiredApprovalTags []*string `json:"requiredApprovalTags,omitempty" tf:"required_approval_tags,omitempty"`
}
type ApprovalSettingsParameters struct {
// Set to true if changes can be applied as long as the min_num_approvals is met, regardless of whether any reviewers have declined a request. Defaults to true.
// Whether changes can be applied as long as minNumApprovals is met, regardless of whether any reviewers have declined a request. Defaults to true
// +kubebuilder:validation:Optional
CanApplyDeclinedChanges *bool `json:"canApplyDeclinedChanges,omitempty" tf:"can_apply_declined_changes,omitempty"`
// Set to true if requesters can approve or decline their own request. They may always comment. Defaults to false.
// Whether requesters can approve or decline their own request. They may always comment.
// +kubebuilder:validation:Optional
CanReviewOwnRequest *bool `json:"canReviewOwnRequest,omitempty" tf:"can_review_own_request,omitempty"`
// The number of approvals required before an approval request can be applied. This number must be between 1 and 5. Defaults to 1.
// The number of approvals required before an approval request can be applied.
// +kubebuilder:validation:Optional
MinNumApprovals *float64 `json:"minNumApprovals,omitempty" tf:"min_num_approvals,omitempty"`
// Set to true for changes to flags in this environment to require approval. You may only set required to true if required_approval_tags is not set and vice versa. Defaults to false.
// Whether any changes to flags in this environment will require approval. You may only set required or requiredApprovalTags, not both.
// +kubebuilder:validation:Optional
Required *bool `json:"required,omitempty" tf:"required,omitempty"`
// An array of tags used to specify which flags with those tags require approval. You may only set required_approval_tags if required is not set to true and vice versa.
// An array of tags used to specify which flags with those tags require approval. You may only set requiredApprovalTags or required, not both.
// +kubebuilder:validation:Optional
RequiredApprovalTags []*string `json:"requiredApprovalTags,omitempty" tf:"required_approval_tags,omitempty"`
}
type DefaultClientSideAvailabilityObservation struct {
// Whether feature flags created under the project are available to JavaScript SDKs using the client-side ID by default. Defaults to false when not using default_client_side_availability.
UsingEnvironmentID *bool `json:"usingEnvironmentId,omitempty" tf:"using_environment_id,omitempty"`
// Whether feature flags created under the project are available to mobile SDKs, and other non-JavaScript SDKs, using a mobile key by default. Defaults to true when not using default_client_side_availability.
UsingMobileKey *bool `json:"usingMobileKey,omitempty" tf:"using_mobile_key,omitempty"`
}
type DefaultClientSideAvailabilityParameters struct {
// Whether feature flags created under the project are available to JavaScript SDKs using the client-side ID by default. Defaults to false when not using default_client_side_availability.
// +kubebuilder:validation:Required
UsingEnvironmentID *bool `json:"usingEnvironmentId" tf:"using_environment_id,omitempty"`
// Whether feature flags created under the project are available to mobile SDKs, and other non-JavaScript SDKs, using a mobile key by default. Defaults to true when not using default_client_side_availability.
// +kubebuilder:validation:Required
UsingMobileKey *bool `json:"usingMobileKey" tf:"using_mobile_key,omitempty"`
}
type EnvironmentsObservation struct {
// A nested block describing the environment approval settings. To learn more about this feature, read Approvals.
ApprovalSettings []ApprovalSettingsObservation `json:"approvalSettings,omitempty" tf:"approval_settings,omitempty"`
// The color swatch as an RGB hex value with no leading #. For example: 000000.
// A color swatch (as an RGB hex value with no leading '#', e.g. C8C8C8)
Color *string `json:"color,omitempty" tf:"color,omitempty"`
// Set to true if this environment requires confirmation for flag and segment changes. This field will default to false when not set.
// Whether or not to require confirmation for flag and segment changes in this environment
ConfirmChanges *bool `json:"confirmChanges,omitempty" tf:"confirm_changes,omitempty"`
// The TTL for the environment. This must be between 0 and 60 minutes. The TTL setting only applies to environments using the PHP SDK. This field will default to 0 when not set. To learn more, read TTL settings.
// The TTL for the environment. This must be between 0 and 60 minutes. The TTL setting only applies to environments using the PHP SDK
DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"`
// Set to true to enable data export for every flag created in this environment after you configure this argument. This field will default to false when not set. To learn more, read Data Export.
// Whether or not to default to sending data export events for flags created in the environment
DefaultTrackEvents *bool `json:"defaultTrackEvents,omitempty" tf:"default_track_events,omitempty"`
// The project-unique key for the environment. A change in this field will force the destruction of the existing environment and the creation of a new one.
// A project-unique key for the new environment
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// The name of the environment.
// The name of the new environment
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Set to true if this environment requires comments for flag and segment changes. This field will default to false when not set.
// Whether or not to require comments for flag and segment changes in this environment
RequireComments *bool `json:"requireComments,omitempty" tf:"require_comments,omitempty"`
// Set to true to ensure a user of the client-side SDK cannot impersonate another user. This field will default to false when not set.
// Whether or not to use secure mode. Secure mode ensures a user of the client-side SDK cannot impersonate another user
SecureMode *bool `json:"secureMode,omitempty" tf:"secure_mode,omitempty"`
// The project's set of tags.
// Tags associated with your resource
Tags []*string `json:"tags,omitempty" tf:"tags,omitempty"`
}
type EnvironmentsParameters struct {
// A nested block describing the environment approval settings. To learn more about this feature, read Approvals.
// +kubebuilder:validation:Optional
ApprovalSettings []ApprovalSettingsParameters `json:"approvalSettings,omitempty" tf:"approval_settings,omitempty"`
// The color swatch as an RGB hex value with no leading #. For example: 000000.
// A color swatch (as an RGB hex value with no leading '#', e.g. C8C8C8)
// +kubebuilder:validation:Required
Color *string `json:"color" tf:"color,omitempty"`
// Set to true if this environment requires confirmation for flag and segment changes. This field will default to false when not set.
// Whether or not to require confirmation for flag and segment changes in this environment
// +kubebuilder:validation:Optional
ConfirmChanges *bool `json:"confirmChanges,omitempty" tf:"confirm_changes,omitempty"`
// The TTL for the environment. This must be between 0 and 60 minutes. The TTL setting only applies to environments using the PHP SDK. This field will default to 0 when not set. To learn more, read TTL settings.
// The TTL for the environment. This must be between 0 and 60 minutes. The TTL setting only applies to environments using the PHP SDK
// +kubebuilder:validation:Optional
DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"`
// Set to true to enable data export for every flag created in this environment after you configure this argument. This field will default to false when not set. To learn more, read Data Export.
// Whether or not to default to sending data export events for flags created in the environment
// +kubebuilder:validation:Optional
DefaultTrackEvents *bool `json:"defaultTrackEvents,omitempty" tf:"default_track_events,omitempty"`
// The project-unique key for the environment. A change in this field will force the destruction of the existing environment and the creation of a new one.
// A project-unique key for the new environment
// +kubebuilder:validation:Required
Key *string `json:"key" tf:"key,omitempty"`
// The name of the environment.
// The name of the new environment
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Set to true if this environment requires comments for flag and segment changes. This field will default to false when not set.
// Whether or not to require comments for flag and segment changes in this environment
// +kubebuilder:validation:Optional
RequireComments *bool `json:"requireComments,omitempty" tf:"require_comments,omitempty"`
// Set to true to ensure a user of the client-side SDK cannot impersonate another user. This field will default to false when not set.
// Whether or not to use secure mode. Secure mode ensures a user of the client-side SDK cannot impersonate another user
// +kubebuilder:validation:Optional
SecureMode *bool `json:"secureMode,omitempty" tf:"secure_mode,omitempty"`
// The project's set of tags.
// Tags associated with your resource
// +kubebuilder:validation:Optional
Tags []*string `json:"tags,omitempty" tf:"tags,omitempty"`
}
type ProjectObservation struct {
// A block describing which client-side SDKs can use new flags by default. To learn more, read Nested Client Side Availability Block.
// List determining which SDKs have access to new flags created under the project by default
DefaultClientSideAvailability []DefaultClientSideAvailabilityObservation `json:"defaultClientSideAvailability,omitempty" tf:"default_client_side_availability,omitempty"`
// List of nested environments blocks describing LaunchDarkly environments that belong to the project. To learn more, read Nested Environments Blocks.
// List of nested `environments` blocks describing LaunchDarkly environments that belong to the project
Environments []EnvironmentsObservation `json:"environments,omitempty" tf:"environments,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Deprecated Whether feature flags created under the project should be available to client-side SDKs by default. Please migrate to default_client_side_availability to maintain future compatibility.
// Whether feature flags created under the project should be available to client-side SDKs by default
IncludeInSnippet *bool `json:"includeInSnippet,omitempty" tf:"include_in_snippet,omitempty"`
// The project's unique key. A change in this field will force the destruction of the existing resource and the creation of a new one.
// The project's unique key
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// The project's name.
// A human-readable name for your project
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The project's set of tags.
// Tags associated with your resource
Tags []*string `json:"tags,omitempty" tf:"tags,omitempty"`
}
type ProjectParameters struct {
// A block describing which client-side SDKs can use new flags by default. To learn more, read Nested Client Side Availability Block.
// List determining which SDKs have access to new flags created under the project by default
// +kubebuilder:validation:Optional
DefaultClientSideAvailability []DefaultClientSideAvailabilityParameters `json:"defaultClientSideAvailability,omitempty" tf:"default_client_side_availability,omitempty"`
// List of nested environments blocks describing LaunchDarkly environments that belong to the project. To learn more, read Nested Environments Blocks.
// List of nested `environments` blocks describing LaunchDarkly environments that belong to the project
// +kubebuilder:validation:Optional
Environments []EnvironmentsParameters `json:"environments,omitempty" tf:"environments,omitempty"`
// Deprecated Whether feature flags created under the project should be available to client-side SDKs by default. Please migrate to default_client_side_availability to maintain future compatibility.
// Whether feature flags created under the project should be available to client-side SDKs by default
// +kubebuilder:validation:Optional
IncludeInSnippet *bool `json:"includeInSnippet,omitempty" tf:"include_in_snippet,omitempty"`
// The project's unique key. A change in this field will force the destruction of the existing resource and the creation of a new one.
// The project's unique key
// +kubebuilder:validation:Optional
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// The project's name.
// A human-readable name for your project
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The project's set of tags.
// Tags associated with your resource
// +kubebuilder:validation:Optional
Tags []*string `json:"tags,omitempty" tf:"tags,omitempty"`
}
// ProjectSpec defines the desired state of Project
type ProjectSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ProjectParameters `json:"forProvider"`
}
// ProjectStatus defines the observed state of Project.
type ProjectStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ProjectObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Project is the Schema for the Projects API. Create and manage LaunchDarkly projects.
// +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:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,launchdarkly}
type Project struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.environments)",message="environments is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.key)",message="key is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter"
Spec ProjectSpec `json:"spec"`
Status ProjectStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ProjectList contains a list of Projects
type ProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Project `json:"items"`
}
// Repository type metadata.
var (
Project_Kind = "Project"
Project_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Project_Kind}.String()
Project_KindAPIVersion = Project_Kind + "." + CRDGroupVersion.String()
Project_GroupVersionKind = CRDGroupVersion.WithKind(Project_Kind)
)
func init() {
SchemeBuilder.Register(&Project{}, &ProjectList{})
}