generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
zz_mysql_types.go
executable file
·243 lines (189 loc) · 11.1 KB
/
zz_mysql_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
/*
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 MySQLObservation struct {
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode_database_access_controls to manage your allow list separately.
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format.
AllowList []*string `json:"allowList,omitempty" tf:"allow_list,omitempty"`
// The number of Linode Instance nodes deployed to the Managed Database. (default 1)
// The number of Linode Instance nodes deployed to the Managed Database. Defaults to 1.
ClusterSize *float64 `json:"clusterSize,omitempty" tf:"cluster_size,omitempty"`
// When this Managed Database was created.
// When this Managed Database was created.
Created *string `json:"created,omitempty" tf:"created,omitempty"`
// Whether the Managed Databases is encrypted. (default false)
// Whether the Managed Databases is encrypted.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// The Managed Database engine. (e.g. mysql)
// The Managed Database engine.
Engine *string `json:"engine,omitempty" tf:"engine,omitempty"`
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.26)
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.26)
EngineID *string `json:"engineId,omitempty" tf:"engine_id,omitempty"`
// The primary host for the Managed Database.
// The primary host for the Managed Database.
HostPrimary *string `json:"hostPrimary,omitempty" tf:"host_primary,omitempty"`
// The secondary/private network host for the Managed Database.
// The secondary host for the Managed Database.
HostSecondary *string `json:"hostSecondary,omitempty" tf:"host_secondary,omitempty"`
// The ID of the Managed Database.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// A unique, user-defined string referring to the Managed Database.
// A unique, user-defined string referring to the Managed Database.
Label *string `json:"label,omitempty" tf:"label,omitempty"`
// The region to use for the Managed Database.
// The region to use for the Managed Database.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The replication method used for the Managed Database. (none, asynch, semi_synch; default none)
// The replication method used for the Managed Database.
ReplicationType *string `json:"replicationType,omitempty" tf:"replication_type,omitempty"`
// Whether to require SSL credentials to establish a connection to the Managed Database. (default false)
// Whether to require SSL credentials to establish a connection to the Managed Database.
SSLConnection *bool `json:"sslConnection,omitempty" tf:"ssl_connection,omitempty"`
// The operating status of the Managed Database.
// The operating status of the Managed Database.
Status *string `json:"status,omitempty" tf:"status,omitempty"`
// The Linode Instance type used for the nodes of the Managed Database instance.
// The Linode Instance type used by the Managed Database for its nodes.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
// When this Managed Database was last updated.
// When this Managed Database was last updated.
Updated *string `json:"updated,omitempty" tf:"updated,omitempty"`
// Configuration settings for automated patch update maintenance for the Managed Database.
Updates []UpdatesObservation `json:"updates,omitempty" tf:"updates,omitempty"`
// The Managed Database engine version. (e.g. v8.0.26)
// The Managed Database engine version.
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type MySQLParameters struct {
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode_database_access_controls to manage your allow list separately.
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format.
// +kubebuilder:validation:Optional
AllowList []*string `json:"allowList,omitempty" tf:"allow_list,omitempty"`
// The number of Linode Instance nodes deployed to the Managed Database. (default 1)
// The number of Linode Instance nodes deployed to the Managed Database. Defaults to 1.
// +kubebuilder:validation:Optional
ClusterSize *float64 `json:"clusterSize,omitempty" tf:"cluster_size,omitempty"`
// Whether the Managed Databases is encrypted. (default false)
// Whether the Managed Databases is encrypted.
// +kubebuilder:validation:Optional
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.26)
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.26)
// +kubebuilder:validation:Optional
EngineID *string `json:"engineId,omitempty" tf:"engine_id,omitempty"`
// A unique, user-defined string referring to the Managed Database.
// A unique, user-defined string referring to the Managed Database.
// +kubebuilder:validation:Optional
Label *string `json:"label,omitempty" tf:"label,omitempty"`
// The region to use for the Managed Database.
// The region to use for the Managed Database.
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The replication method used for the Managed Database. (none, asynch, semi_synch; default none)
// The replication method used for the Managed Database.
// +kubebuilder:validation:Optional
ReplicationType *string `json:"replicationType,omitempty" tf:"replication_type,omitempty"`
// Whether to require SSL credentials to establish a connection to the Managed Database. (default false)
// Whether to require SSL credentials to establish a connection to the Managed Database.
// +kubebuilder:validation:Optional
SSLConnection *bool `json:"sslConnection,omitempty" tf:"ssl_connection,omitempty"`
// The Linode Instance type used for the nodes of the Managed Database instance.
// The Linode Instance type used by the Managed Database for its nodes.
// +kubebuilder:validation:Optional
Type *string `json:"type,omitempty" tf:"type,omitempty"`
// Configuration settings for automated patch update maintenance for the Managed Database.
// +kubebuilder:validation:Optional
Updates []UpdatesParameters `json:"updates,omitempty" tf:"updates,omitempty"`
}
type UpdatesObservation struct {
// The day to perform maintenance. (monday, tuesday, ...)
// The day to perform maintenance.
DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"`
// The maximum maintenance window time in hours. (1..3)
// The maximum maintenance window time in hours.
Duration *float64 `json:"duration,omitempty" tf:"duration,omitempty"`
// Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)
// Whether maintenance occurs on a weekly or monthly basis.
Frequency *string `json:"frequency,omitempty" tf:"frequency,omitempty"`
// The hour to begin maintenance based in UTC time. (0..23)
// The hour to begin maintenance based in UTC time.
HourOfDay *float64 `json:"hourOfDay,omitempty" tf:"hour_of_day,omitempty"`
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
WeekOfMonth *float64 `json:"weekOfMonth,omitempty" tf:"week_of_month,omitempty"`
}
type UpdatesParameters struct {
// The day to perform maintenance. (monday, tuesday, ...)
// The day to perform maintenance.
// +kubebuilder:validation:Required
DayOfWeek *string `json:"dayOfWeek" tf:"day_of_week,omitempty"`
// The maximum maintenance window time in hours. (1..3)
// The maximum maintenance window time in hours.
// +kubebuilder:validation:Required
Duration *float64 `json:"duration" tf:"duration,omitempty"`
// Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)
// Whether maintenance occurs on a weekly or monthly basis.
// +kubebuilder:validation:Required
Frequency *string `json:"frequency" tf:"frequency,omitempty"`
// The hour to begin maintenance based in UTC time. (0..23)
// The hour to begin maintenance based in UTC time.
// +kubebuilder:validation:Required
HourOfDay *float64 `json:"hourOfDay" tf:"hour_of_day,omitempty"`
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
// +kubebuilder:validation:Optional
WeekOfMonth *float64 `json:"weekOfMonth,omitempty" tf:"week_of_month,omitempty"`
}
// MySQLSpec defines the desired state of MySQL
type MySQLSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider MySQLParameters `json:"forProvider"`
}
// MySQLStatus defines the observed state of MySQL.
type MySQLStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider MySQLObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// MySQL is the Schema for the MySQLs API. Manages a Linode MySQL Database.
// +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,linode}
type MySQL struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.engineId)",message="engineId is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.label)",message="label is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.type)",message="type is a required parameter"
Spec MySQLSpec `json:"spec"`
Status MySQLStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// MySQLList contains a list of MySQLs
type MySQLList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MySQL `json:"items"`
}
// Repository type metadata.
var (
MySQL_Kind = "MySQL"
MySQL_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: MySQL_Kind}.String()
MySQL_KindAPIVersion = MySQL_Kind + "." + CRDGroupVersion.String()
MySQL_GroupVersionKind = CRDGroupVersion.WithKind(MySQL_Kind)
)
func init() {
SchemeBuilder.Register(&MySQL{}, &MySQLList{})
}