-
Notifications
You must be signed in to change notification settings - Fork 64
/
zz_device_types.go
executable file
·377 lines (282 loc) · 14.4 KB
/
zz_device_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
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
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 ConfigInitParameters struct {
}
type ConfigObservation struct {
// The device configuration data.
BinaryData *string `json:"binaryData,omitempty" tf:"binary_data,omitempty"`
// (Output)
// The time at which this configuration version was updated in Cloud IoT Core.
CloudUpdateTime *string `json:"cloudUpdateTime,omitempty" tf:"cloud_update_time,omitempty"`
// (Output)
// The time at which Cloud IoT Core received the acknowledgment from the device,
// indicating that the device has received this configuration version.
DeviceAckTime *string `json:"deviceAckTime,omitempty" tf:"device_ack_time,omitempty"`
// (Output)
// The version of this update.
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type ConfigParameters struct {
}
type CredentialsInitParameters struct {
// The time at which this credential becomes invalid.
ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"`
// A public key used to verify the signature of JSON Web Tokens (JWTs).
// Structure is documented below.
PublicKey []PublicKeyInitParameters `json:"publicKey,omitempty" tf:"public_key,omitempty"`
}
type CredentialsObservation struct {
// The time at which this credential becomes invalid.
ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"`
// A public key used to verify the signature of JSON Web Tokens (JWTs).
// Structure is documented below.
PublicKey []PublicKeyObservation `json:"publicKey,omitempty" tf:"public_key,omitempty"`
}
type CredentialsParameters struct {
// The time at which this credential becomes invalid.
// +kubebuilder:validation:Optional
ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"`
// A public key used to verify the signature of JSON Web Tokens (JWTs).
// Structure is documented below.
// +kubebuilder:validation:Optional
PublicKey []PublicKeyParameters `json:"publicKey,omitempty" tf:"public_key,omitempty"`
}
type DeviceInitParameters struct {
// If a device is blocked, connections or requests from this device will fail.
Blocked *bool `json:"blocked,omitempty" tf:"blocked,omitempty"`
// The credentials used to authenticate this device.
// Structure is documented below.
Credentials []CredentialsInitParameters `json:"credentials,omitempty" tf:"credentials,omitempty"`
// Gateway-related configuration and state.
// Structure is documented below.
GatewayConfig []GatewayConfigInitParameters `json:"gatewayConfig,omitempty" tf:"gateway_config,omitempty"`
// The logging verbosity for device activity.
// Possible values are: NONE, ERROR, INFO, DEBUG.
LogLevel *string `json:"logLevel,omitempty" tf:"log_level,omitempty"`
// The metadata key-value pairs assigned to the device.
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
}
type DeviceObservation struct {
// If a device is blocked, connections or requests from this device will fail.
Blocked *bool `json:"blocked,omitempty" tf:"blocked,omitempty"`
// The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.
// Structure is documented below.
Config []ConfigObservation `json:"config,omitempty" tf:"config,omitempty"`
// The credentials used to authenticate this device.
// Structure is documented below.
Credentials []CredentialsObservation `json:"credentials,omitempty" tf:"credentials,omitempty"`
// Gateway-related configuration and state.
// Structure is documented below.
GatewayConfig []GatewayConfigObservation `json:"gatewayConfig,omitempty" tf:"gateway_config,omitempty"`
// an identifier for the resource with format {{registry}}/devices/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The last time a cloud-to-device config version acknowledgment was received from the device.
LastConfigAckTime *string `json:"lastConfigAckTime,omitempty" tf:"last_config_ack_time,omitempty"`
// The last time a cloud-to-device config version was sent to the device.
LastConfigSendTime *string `json:"lastConfigSendTime,omitempty" tf:"last_config_send_time,omitempty"`
// The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.
// Structure is documented below.
LastErrorStatus []LastErrorStatusObservation `json:"lastErrorStatus,omitempty" tf:"last_error_status,omitempty"`
// The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.
LastErrorTime *string `json:"lastErrorTime,omitempty" tf:"last_error_time,omitempty"`
// The last time a telemetry event was received.
LastEventTime *string `json:"lastEventTime,omitempty" tf:"last_event_time,omitempty"`
// The last time an MQTT PINGREQ was received.
LastHeartbeatTime *string `json:"lastHeartbeatTime,omitempty" tf:"last_heartbeat_time,omitempty"`
// The last time a state event was received.
LastStateTime *string `json:"lastStateTime,omitempty" tf:"last_state_time,omitempty"`
// The logging verbosity for device activity.
// Possible values are: NONE, ERROR, INFO, DEBUG.
LogLevel *string `json:"logLevel,omitempty" tf:"log_level,omitempty"`
// The metadata key-value pairs assigned to the device.
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// A server-defined unique numeric ID for the device.
// This is a more compact way to identify devices, and it is globally unique.
NumID *string `json:"numId,omitempty" tf:"num_id,omitempty"`
// The name of the device registry where this device should be created.
Registry *string `json:"registry,omitempty" tf:"registry,omitempty"`
// The state most recently received from the device.
// Structure is documented below.
State []StateObservation `json:"state,omitempty" tf:"state,omitempty"`
}
type DeviceParameters struct {
// If a device is blocked, connections or requests from this device will fail.
// +kubebuilder:validation:Optional
Blocked *bool `json:"blocked,omitempty" tf:"blocked,omitempty"`
// The credentials used to authenticate this device.
// Structure is documented below.
// +kubebuilder:validation:Optional
Credentials []CredentialsParameters `json:"credentials,omitempty" tf:"credentials,omitempty"`
// Gateway-related configuration and state.
// Structure is documented below.
// +kubebuilder:validation:Optional
GatewayConfig []GatewayConfigParameters `json:"gatewayConfig,omitempty" tf:"gateway_config,omitempty"`
// The logging verbosity for device activity.
// Possible values are: NONE, ERROR, INFO, DEBUG.
// +kubebuilder:validation:Optional
LogLevel *string `json:"logLevel,omitempty" tf:"log_level,omitempty"`
// The metadata key-value pairs assigned to the device.
// +kubebuilder:validation:Optional
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// The name of the device registry where this device should be created.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/cloudiot/v1beta1.Registry
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID()
// +kubebuilder:validation:Optional
Registry *string `json:"registry,omitempty" tf:"registry,omitempty"`
// Reference to a Registry in cloudiot to populate registry.
// +kubebuilder:validation:Optional
RegistryRef *v1.Reference `json:"registryRef,omitempty" tf:"-"`
// Selector for a Registry in cloudiot to populate registry.
// +kubebuilder:validation:Optional
RegistrySelector *v1.Selector `json:"registrySelector,omitempty" tf:"-"`
}
type GatewayConfigInitParameters struct {
// Indicates whether the device is a gateway.
// Possible values are: ASSOCIATION_ONLY, DEVICE_AUTH_TOKEN_ONLY, ASSOCIATION_AND_DEVICE_AUTH_TOKEN.
GatewayAuthMethod *string `json:"gatewayAuthMethod,omitempty" tf:"gateway_auth_method,omitempty"`
// Indicates whether the device is a gateway.
// Default value is NON_GATEWAY.
// Possible values are: GATEWAY, NON_GATEWAY.
GatewayType *string `json:"gatewayType,omitempty" tf:"gateway_type,omitempty"`
}
type GatewayConfigObservation struct {
// Indicates whether the device is a gateway.
// Possible values are: ASSOCIATION_ONLY, DEVICE_AUTH_TOKEN_ONLY, ASSOCIATION_AND_DEVICE_AUTH_TOKEN.
GatewayAuthMethod *string `json:"gatewayAuthMethod,omitempty" tf:"gateway_auth_method,omitempty"`
// Indicates whether the device is a gateway.
// Default value is NON_GATEWAY.
// Possible values are: GATEWAY, NON_GATEWAY.
GatewayType *string `json:"gatewayType,omitempty" tf:"gateway_type,omitempty"`
// (Output)
// The ID of the gateway the device accessed most recently.
LastAccessedGatewayID *string `json:"lastAccessedGatewayId,omitempty" tf:"last_accessed_gateway_id,omitempty"`
// (Output)
// The most recent time at which the device accessed the gateway specified in last_accessed_gateway.
LastAccessedGatewayTime *string `json:"lastAccessedGatewayTime,omitempty" tf:"last_accessed_gateway_time,omitempty"`
}
type GatewayConfigParameters struct {
// Indicates whether the device is a gateway.
// Possible values are: ASSOCIATION_ONLY, DEVICE_AUTH_TOKEN_ONLY, ASSOCIATION_AND_DEVICE_AUTH_TOKEN.
// +kubebuilder:validation:Optional
GatewayAuthMethod *string `json:"gatewayAuthMethod,omitempty" tf:"gateway_auth_method,omitempty"`
// Indicates whether the device is a gateway.
// Default value is NON_GATEWAY.
// Possible values are: GATEWAY, NON_GATEWAY.
// +kubebuilder:validation:Optional
GatewayType *string `json:"gatewayType,omitempty" tf:"gateway_type,omitempty"`
}
type LastErrorStatusInitParameters struct {
}
type LastErrorStatusObservation struct {
// A list of messages that carry the error details.
Details []string `json:"details,omitempty" tf:"details,omitempty"`
// A developer-facing error message, which should be in English.
Message *string `json:"message,omitempty" tf:"message,omitempty"`
// The status code, which should be an enum value of google.rpc.Code.
Number *float64 `json:"number,omitempty" tf:"number,omitempty"`
}
type LastErrorStatusParameters struct {
}
type PublicKeyInitParameters struct {
// The format of the key.
// Possible values are: RSA_PEM, RSA_X509_PEM, ES256_PEM, ES256_X509_PEM.
Format *string `json:"format,omitempty" tf:"format,omitempty"`
// The key data.
Key *string `json:"key,omitempty" tf:"key,omitempty"`
}
type PublicKeyObservation struct {
// The format of the key.
// Possible values are: RSA_PEM, RSA_X509_PEM, ES256_PEM, ES256_X509_PEM.
Format *string `json:"format,omitempty" tf:"format,omitempty"`
// The key data.
Key *string `json:"key,omitempty" tf:"key,omitempty"`
}
type PublicKeyParameters struct {
// The format of the key.
// Possible values are: RSA_PEM, RSA_X509_PEM, ES256_PEM, ES256_X509_PEM.
// +kubebuilder:validation:Optional
Format *string `json:"format,omitempty" tf:"format,omitempty"`
// The key data.
// +kubebuilder:validation:Optional
Key *string `json:"key,omitempty" tf:"key,omitempty"`
}
type StateInitParameters struct {
}
type StateObservation struct {
// The device state data.
BinaryData *string `json:"binaryData,omitempty" tf:"binary_data,omitempty"`
// The time at which this state version was updated in Cloud IoT Core.
UpdateTime *string `json:"updateTime,omitempty" tf:"update_time,omitempty"`
}
type StateParameters struct {
}
// DeviceSpec defines the desired state of Device
type DeviceSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider DeviceParameters `json:"forProvider"`
// THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
// unless the relevant Crossplane feature flag is enabled, and may be
// changed or removed without notice.
// 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 DeviceInitParameters `json:"initProvider,omitempty"`
}
// DeviceStatus defines the observed state of Device.
type DeviceStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider DeviceObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Device is the Schema for the Devices API. A Google Cloud IoT Core device.
// +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,gcp}
type Device struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DeviceSpec `json:"spec"`
Status DeviceStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// DeviceList contains a list of Devices
type DeviceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Device `json:"items"`
}
// Repository type metadata.
var (
Device_Kind = "Device"
Device_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Device_Kind}.String()
Device_KindAPIVersion = Device_Kind + "." + CRDGroupVersion.String()
Device_GroupVersionKind = CRDGroupVersion.WithKind(Device_Kind)
)
func init() {
SchemeBuilder.Register(&Device{}, &DeviceList{})
}