-
Notifications
You must be signed in to change notification settings - Fork 59
/
zz_bucketobject_types.go
executable file
·363 lines (270 loc) · 18.2 KB
/
zz_bucketobject_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
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// Code generated by upjet. DO NOT EDIT.
package v1beta2
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 BucketObjectInitParameters struct {
// The name of the containing bucket.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/storage/v1beta2.Bucket
Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"`
// Reference to a Bucket in storage to populate bucket.
// +kubebuilder:validation:Optional
BucketRef *v1.Reference `json:"bucketRef,omitempty" tf:"-"`
// Selector for a Bucket in storage to populate bucket.
// +kubebuilder:validation:Optional
BucketSelector *v1.Selector `json:"bucketSelector,omitempty" tf:"-"`
// Cache-Control
// directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
CacheControl *string `json:"cacheControl,omitempty" tf:"cache_control,omitempty"`
// Data as string to be uploaded. Must be defined if source is not. Note: The content field is marked as sensitive. To view the raw contents of the object, please define an output.
Content *string `json:"content,omitempty" tf:"content,omitempty"`
// Content-Disposition of the object data.
ContentDisposition *string `json:"contentDisposition,omitempty" tf:"content_disposition,omitempty"`
// Content-Encoding of the object data.
ContentEncoding *string `json:"contentEncoding,omitempty" tf:"content_encoding,omitempty"`
// Content-Language of the object data.
ContentLanguage *string `json:"contentLanguage,omitempty" tf:"content_language,omitempty"`
// Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
ContentType *string `json:"contentType,omitempty" tf:"content_type,omitempty"`
// Enables object encryption with Customer-Supplied Encryption Key (CSEK). [Google documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
// Structure is documented below.
CustomerEncryption *CustomerEncryptionInitParameters `json:"customerEncryption,omitempty" tf:"customer_encryption,omitempty"`
// MD5 hash of the data, encoded using base64. This field is not present for composite objects. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
DetectMd5Hash *string `json:"detectMd5Hash,omitempty" tf:"detect_md5hash,omitempty"`
// Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
EventBasedHold *bool `json:"eventBasedHold,omitempty" tf:"event_based_hold,omitempty"`
// The resource name of the Cloud KMS key that will be used to encrypt the object.
KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"`
// User-provided metadata, in key/value pairs.
// +mapType=granular
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// The name of the object. If you're interpolating the name of this object, see output_name instead.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
Retention *RetentionInitParameters `json:"retention,omitempty" tf:"retention,omitempty"`
// A path to the data you want to upload. Must be defined
// if content is not.
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// The StorageClass of the new bucket object.
// Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE. If not provided, this defaults to the bucket's default
// storage class or to a standard class.
StorageClass *string `json:"storageClass,omitempty" tf:"storage_class,omitempty"`
// Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
TemporaryHold *bool `json:"temporaryHold,omitempty" tf:"temporary_hold,omitempty"`
}
type BucketObjectObservation struct {
// The name of the containing bucket.
Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"`
// Cache-Control
// directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
CacheControl *string `json:"cacheControl,omitempty" tf:"cache_control,omitempty"`
// Data as string to be uploaded. Must be defined if source is not. Note: The content field is marked as sensitive. To view the raw contents of the object, please define an output.
Content *string `json:"content,omitempty" tf:"content,omitempty"`
// Content-Disposition of the object data.
ContentDisposition *string `json:"contentDisposition,omitempty" tf:"content_disposition,omitempty"`
// Content-Encoding of the object data.
ContentEncoding *string `json:"contentEncoding,omitempty" tf:"content_encoding,omitempty"`
// Content-Language of the object data.
ContentLanguage *string `json:"contentLanguage,omitempty" tf:"content_language,omitempty"`
// Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
ContentType *string `json:"contentType,omitempty" tf:"content_type,omitempty"`
// (Computed) Base 64 CRC32 hash of the uploaded data.
Crc32C *string `json:"crc32c,omitempty" tf:"crc32c,omitempty"`
// Enables object encryption with Customer-Supplied Encryption Key (CSEK). [Google documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
// Structure is documented below.
CustomerEncryption *CustomerEncryptionObservation `json:"customerEncryption,omitempty" tf:"customer_encryption,omitempty"`
// MD5 hash of the data, encoded using base64. This field is not present for composite objects. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
DetectMd5Hash *string `json:"detectMd5Hash,omitempty" tf:"detect_md5hash,omitempty"`
// Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
EventBasedHold *bool `json:"eventBasedHold,omitempty" tf:"event_based_hold,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The resource name of the Cloud KMS key that will be used to encrypt the object.
KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"`
// (Computed) Base 64 MD5 hash of the uploaded data.
Md5Hash *string `json:"md5hash,omitempty" tf:"md5hash,omitempty"`
// (Computed) A url reference to download this object.
MediaLink *string `json:"mediaLink,omitempty" tf:"media_link,omitempty"`
// User-provided metadata, in key/value pairs.
// +mapType=granular
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// The name of the object. If you're interpolating the name of this object, see output_name instead.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// (Computed) The name of the object. Use this field in interpolations with google_storage_object_acl to recreate
// google_storage_object_acl resources when your google_storage_bucket_object is recreated.
OutputName *string `json:"outputName,omitempty" tf:"output_name,omitempty"`
// The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
Retention *RetentionObservation `json:"retention,omitempty" tf:"retention,omitempty"`
// (Computed) A url reference to this object.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// A path to the data you want to upload. Must be defined
// if content is not.
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// The StorageClass of the new bucket object.
// Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE. If not provided, this defaults to the bucket's default
// storage class or to a standard class.
StorageClass *string `json:"storageClass,omitempty" tf:"storage_class,omitempty"`
// Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
TemporaryHold *bool `json:"temporaryHold,omitempty" tf:"temporary_hold,omitempty"`
}
type BucketObjectParameters struct {
// The name of the containing bucket.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/storage/v1beta2.Bucket
// +kubebuilder:validation:Optional
Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"`
// Reference to a Bucket in storage to populate bucket.
// +kubebuilder:validation:Optional
BucketRef *v1.Reference `json:"bucketRef,omitempty" tf:"-"`
// Selector for a Bucket in storage to populate bucket.
// +kubebuilder:validation:Optional
BucketSelector *v1.Selector `json:"bucketSelector,omitempty" tf:"-"`
// Cache-Control
// directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
// +kubebuilder:validation:Optional
CacheControl *string `json:"cacheControl,omitempty" tf:"cache_control,omitempty"`
// Data as string to be uploaded. Must be defined if source is not. Note: The content field is marked as sensitive. To view the raw contents of the object, please define an output.
// +kubebuilder:validation:Optional
Content *string `json:"content,omitempty" tf:"content,omitempty"`
// Content-Disposition of the object data.
// +kubebuilder:validation:Optional
ContentDisposition *string `json:"contentDisposition,omitempty" tf:"content_disposition,omitempty"`
// Content-Encoding of the object data.
// +kubebuilder:validation:Optional
ContentEncoding *string `json:"contentEncoding,omitempty" tf:"content_encoding,omitempty"`
// Content-Language of the object data.
// +kubebuilder:validation:Optional
ContentLanguage *string `json:"contentLanguage,omitempty" tf:"content_language,omitempty"`
// Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
// +kubebuilder:validation:Optional
ContentType *string `json:"contentType,omitempty" tf:"content_type,omitempty"`
// Enables object encryption with Customer-Supplied Encryption Key (CSEK). [Google documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
// Structure is documented below.
// +kubebuilder:validation:Optional
CustomerEncryption *CustomerEncryptionParameters `json:"customerEncryption,omitempty" tf:"customer_encryption,omitempty"`
// MD5 hash of the data, encoded using base64. This field is not present for composite objects. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
// +kubebuilder:validation:Optional
DetectMd5Hash *string `json:"detectMd5Hash,omitempty" tf:"detect_md5hash,omitempty"`
// Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
// +kubebuilder:validation:Optional
EventBasedHold *bool `json:"eventBasedHold,omitempty" tf:"event_based_hold,omitempty"`
// The resource name of the Cloud KMS key that will be used to encrypt the object.
// +kubebuilder:validation:Optional
KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"`
// User-provided metadata, in key/value pairs.
// +kubebuilder:validation:Optional
// +mapType=granular
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// The name of the object. If you're interpolating the name of this object, see output_name instead.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
// +kubebuilder:validation:Optional
Retention *RetentionParameters `json:"retention,omitempty" tf:"retention,omitempty"`
// A path to the data you want to upload. Must be defined
// if content is not.
// +kubebuilder:validation:Optional
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// The StorageClass of the new bucket object.
// Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE. If not provided, this defaults to the bucket's default
// storage class or to a standard class.
// +kubebuilder:validation:Optional
StorageClass *string `json:"storageClass,omitempty" tf:"storage_class,omitempty"`
// Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
// +kubebuilder:validation:Optional
TemporaryHold *bool `json:"temporaryHold,omitempty" tf:"temporary_hold,omitempty"`
}
type CustomerEncryptionInitParameters struct {
// Encryption algorithm. Default: AES256
EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty" tf:"encryption_algorithm,omitempty"`
// Base64 encoded Customer-Supplied Encryption Key.
EncryptionKeySecretRef v1.SecretKeySelector `json:"encryptionKeySecretRef" tf:"-"`
}
type CustomerEncryptionObservation struct {
// Encryption algorithm. Default: AES256
EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty" tf:"encryption_algorithm,omitempty"`
}
type CustomerEncryptionParameters struct {
// Encryption algorithm. Default: AES256
// +kubebuilder:validation:Optional
EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty" tf:"encryption_algorithm,omitempty"`
// Base64 encoded Customer-Supplied Encryption Key.
// +kubebuilder:validation:Optional
EncryptionKeySecretRef v1.SecretKeySelector `json:"encryptionKeySecretRef" tf:"-"`
}
type RetentionInitParameters struct {
// The retention policy mode. Either Locked or Unlocked.
Mode *string `json:"mode,omitempty" tf:"mode,omitempty"`
// The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
RetainUntilTime *string `json:"retainUntilTime,omitempty" tf:"retain_until_time,omitempty"`
}
type RetentionObservation struct {
// The retention policy mode. Either Locked or Unlocked.
Mode *string `json:"mode,omitempty" tf:"mode,omitempty"`
// The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
RetainUntilTime *string `json:"retainUntilTime,omitempty" tf:"retain_until_time,omitempty"`
}
type RetentionParameters struct {
// The retention policy mode. Either Locked or Unlocked.
// +kubebuilder:validation:Optional
Mode *string `json:"mode" tf:"mode,omitempty"`
// The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
// +kubebuilder:validation:Optional
RetainUntilTime *string `json:"retainUntilTime" tf:"retain_until_time,omitempty"`
}
// BucketObjectSpec defines the desired state of BucketObject
type BucketObjectSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider BucketObjectParameters `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 BucketObjectInitParameters `json:"initProvider,omitempty"`
}
// BucketObjectStatus defines the observed state of BucketObject.
type BucketObjectStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider BucketObjectObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// BucketObject is the Schema for the BucketObjects API. Creates a new object inside a specified bucket
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].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,gcp}
type BucketObject 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.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter"
Spec BucketObjectSpec `json:"spec"`
Status BucketObjectStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// BucketObjectList contains a list of BucketObjects
type BucketObjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BucketObject `json:"items"`
}
// Repository type metadata.
var (
BucketObject_Kind = "BucketObject"
BucketObject_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: BucketObject_Kind}.String()
BucketObject_KindAPIVersion = BucketObject_Kind + "." + CRDGroupVersion.String()
BucketObject_GroupVersionKind = CRDGroupVersion.WithKind(BucketObject_Kind)
)
func init() {
SchemeBuilder.Register(&BucketObject{}, &BucketObjectList{})
}