/
types.go
229 lines (174 loc) · 5.37 KB
/
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
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"time"
)
// Contains information about the errors encountered.
type BatchPutMessageErrorEntry struct {
// The code associated with the error.
ErrorCode ErrorCode
// More information about the error.
ErrorMessage *string
// The ID of the message that caused the error. (See the value corresponding to the
// "messageId" key in the "message" object.)
MessageId *string
}
// Information about the error that occured when attempting to update a detector.
type BatchUpdateDetectorErrorEntry struct {
// The code of the error.
ErrorCode ErrorCode
// A message describing the error.
ErrorMessage *string
// The "messageId" of the update request that caused the error. (The value of the
// "messageId" in the update request "Detector" object.)
MessageId *string
}
// Information about the detector (instance).
type Detector struct {
// The time the detector (instance) was created.
CreationTime *time.Time
// The name of the detector model that created this detector (instance).
DetectorModelName *string
// The version of the detector model that created this detector (instance).
DetectorModelVersion *string
// The value of the key (identifying the device or system) that caused the creation
// of this detector (instance).
KeyValue *string
// The time the detector (instance) was last updated.
LastUpdateTime *time.Time
// The current state of the detector (instance).
State *DetectorState
}
// Information about the current state of the detector instance.
type DetectorState struct {
// The name of the state.
//
// This member is required.
StateName *string
// The current state of the detector's timers.
//
// This member is required.
Timers []Timer
// The current values of the detector's variables.
//
// This member is required.
Variables []Variable
}
// The new state, variable values, and timer settings of the detector (instance).
type DetectorStateDefinition struct {
// The name of the new state of the detector (instance).
//
// This member is required.
StateName *string
// The new values of the detector's timers. Any timer whose value isn't specified
// is cleared, and its timeout event won't occur.
//
// This member is required.
Timers []TimerDefinition
// The new values of the detector's variables. Any variable whose value isn't
// specified is cleared.
//
// This member is required.
Variables []VariableDefinition
}
// Information about the detector state.
type DetectorStateSummary struct {
// The name of the state.
StateName *string
}
// Information about the detector (instance).
type DetectorSummary struct {
// The time the detector (instance) was created.
CreationTime *time.Time
// The name of the detector model that created this detector (instance).
DetectorModelName *string
// The version of the detector model that created this detector (instance).
DetectorModelVersion *string
// The value of the key (identifying the device or system) that caused the creation
// of this detector (instance).
KeyValue *string
// The time the detector (instance) was last updated.
LastUpdateTime *time.Time
// The current state of the detector (instance).
State *DetectorStateSummary
}
// Information about a message.
type Message struct {
// The name of the input into which the message payload is transformed.
//
// This member is required.
InputName *string
// The ID to assign to the message. Within each batch sent, each "messageId" must
// be unique.
//
// This member is required.
MessageId *string
// The payload of the message. This can be a JSON string or a Base-64-encoded
// string representing binary data (in which case you must decode it).
//
// This member is required.
Payload []byte
}
// The current state of a timer.
type Timer struct {
// The name of the timer.
//
// This member is required.
Name *string
// The number of seconds which have elapsed on the timer.
//
// This member is required.
Timestamp *time.Time
}
// The new setting of a timer.
type TimerDefinition struct {
// The name of the timer.
//
// This member is required.
Name *string
// The new setting of the timer (the number of seconds before the timer elapses).
//
// This member is required.
Seconds *int32
}
// Information used to update the detector (instance).
type UpdateDetectorRequest struct {
// The name of the detector model that created the detectors (instances).
//
// This member is required.
DetectorModelName *string
// The ID to assign to the detector update "message". Each "messageId" must be
// unique within each batch sent.
//
// This member is required.
MessageId *string
// The new state, variable values, and timer settings of the detector (instance).
//
// This member is required.
State *DetectorStateDefinition
// The value of the input key attribute (identifying the device or system) that
// caused the creation of this detector (instance).
KeyValue *string
}
// The current state of the variable.
type Variable struct {
// The name of the variable.
//
// This member is required.
Name *string
// The current value of the variable.
//
// This member is required.
Value *string
}
// The new value of the variable.
type VariableDefinition struct {
// The name of the variable.
//
// This member is required.
Name *string
// The new value of the variable.
//
// This member is required.
Value *string
}