-
Notifications
You must be signed in to change notification settings - Fork 36
/
set_auto.go
453 lines (399 loc) · 12.4 KB
/
set_auto.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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
/*
* WARNING: CODE GENERATED AUTOMATICALLY.
*
* To update any changes, run "go generate" in the main project
* directory and then commit this file.
*
* THIS FILE SHOULD NOT BE EDITED BY HAND.
*
*/
package meta
// Assets is a helper function to return a slice copy of Asset values.
func (s Set) Assets() []Asset {
assets := make([]Asset, len(s.assets))
copy(assets, s.assets)
return assets
}
// Calibrations is a helper function to return a slice copy of Calibration values.
func (s Set) Calibrations() []Calibration {
calibrations := make([]Calibration, len(s.calibrations))
copy(calibrations, s.calibrations)
return calibrations
}
// Channels is a helper function to return a slice copy of Channel values.
func (s Set) Channels() []Channel {
channels := make([]Channel, len(s.channels))
copy(channels, s.channels)
return channels
}
// Citations is a helper function to return a slice copy of Citation values.
func (s Set) Citations() []Citation {
citations := make([]Citation, len(s.citations))
copy(citations, s.citations)
return citations
}
// Classes is a helper function to return a slice copy of Class values.
func (s Set) Classes() []Class {
classes := make([]Class, len(s.classes))
copy(classes, s.classes)
return classes
}
// Components is a helper function to return a slice copy of Component values.
func (s Set) Components() []Component {
components := make([]Component, len(s.components))
copy(components, s.components)
return components
}
// Connections is a helper function to return a slice copy of Connection values.
func (s Set) Connections() []Connection {
connections := make([]Connection, len(s.connections))
copy(connections, s.connections)
return connections
}
// Constituents is a helper function to return a slice copy of Constituent values.
func (s Set) Constituents() []Constituent {
constituents := make([]Constituent, len(s.constituents))
copy(constituents, s.constituents)
return constituents
}
// Darts is a helper function to return a slice copy of Dart values.
func (s Set) Darts() []Dart {
darts := make([]Dart, len(s.darts))
copy(darts, s.darts)
return darts
}
// DeployedDataloggers is a helper function to return a slice copy of DeployedDatalogger values.
func (s Set) DeployedDataloggers() []DeployedDatalogger {
deployedDataloggers := make([]DeployedDatalogger, len(s.deployedDataloggers))
copy(deployedDataloggers, s.deployedDataloggers)
return deployedDataloggers
}
// DeployedReceivers is a helper function to return a slice copy of DeployedReceiver values.
func (s Set) DeployedReceivers() []DeployedReceiver {
deployedReceivers := make([]DeployedReceiver, len(s.deployedReceivers))
copy(deployedReceivers, s.deployedReceivers)
return deployedReceivers
}
// Doases is a helper function to return a slice copy of InstalledDoas values.
func (s Set) Doases() []InstalledDoas {
doases := make([]InstalledDoas, len(s.doases))
copy(doases, s.doases)
return doases
}
// Features is a helper function to return a slice copy of Feature values.
func (s Set) Features() []Feature {
features := make([]Feature, len(s.features))
copy(features, s.features)
return features
}
// FirmwareHistory is a helper function to return a slice copy of FirmwareHistory values.
func (s Set) FirmwareHistory() []FirmwareHistory {
firmwareHistory := make([]FirmwareHistory, len(s.firmwareHistory))
copy(firmwareHistory, s.firmwareHistory)
return firmwareHistory
}
// Gains is a helper function to return a slice copy of Gain values.
func (s Set) Gains() []Gain {
gains := make([]Gain, len(s.gains))
copy(gains, s.gains)
return gains
}
// Gauges is a helper function to return a slice copy of Gauge values.
func (s Set) Gauges() []Gauge {
gauges := make([]Gauge, len(s.gauges))
copy(gauges, s.gauges)
return gauges
}
// InstalledAntennas is a helper function to return a slice copy of InstalledAntenna values.
func (s Set) InstalledAntennas() []InstalledAntenna {
installedAntennas := make([]InstalledAntenna, len(s.installedAntennas))
copy(installedAntennas, s.installedAntennas)
return installedAntennas
}
// InstalledCameras is a helper function to return a slice copy of InstalledCamera values.
func (s Set) InstalledCameras() []InstalledCamera {
installedCameras := make([]InstalledCamera, len(s.installedCameras))
copy(installedCameras, s.installedCameras)
return installedCameras
}
// InstalledMetSensors is a helper function to return a slice copy of InstalledMetSensor values.
func (s Set) InstalledMetSensors() []InstalledMetSensor {
installedMetSensors := make([]InstalledMetSensor, len(s.installedMetSensors))
copy(installedMetSensors, s.installedMetSensors)
return installedMetSensors
}
// InstalledRadomes is a helper function to return a slice copy of InstalledRadome values.
func (s Set) InstalledRadomes() []InstalledRadome {
installedRadomes := make([]InstalledRadome, len(s.installedRadomes))
copy(installedRadomes, s.installedRadomes)
return installedRadomes
}
// InstalledRecorders is a helper function to return a slice copy of InstalledRecorder values.
func (s Set) InstalledRecorders() []InstalledRecorder {
installedRecorders := make([]InstalledRecorder, len(s.installedRecorders))
copy(installedRecorders, s.installedRecorders)
return installedRecorders
}
// InstalledSensors is a helper function to return a slice copy of InstalledSensor values.
func (s Set) InstalledSensors() []InstalledSensor {
installedSensors := make([]InstalledSensor, len(s.installedSensors))
copy(installedSensors, s.installedSensors)
return installedSensors
}
// Marks is a helper function to return a slice copy of Mark values.
func (s Set) Marks() []Mark {
marks := make([]Mark, len(s.marks))
copy(marks, s.marks)
return marks
}
// Monuments is a helper function to return a slice copy of Monument values.
func (s Set) Monuments() []Monument {
monuments := make([]Monument, len(s.monuments))
copy(monuments, s.monuments)
return monuments
}
// Mounts is a helper function to return a slice copy of Mount values.
func (s Set) Mounts() []Mount {
mounts := make([]Mount, len(s.mounts))
copy(mounts, s.mounts)
return mounts
}
// Networks is a helper function to return a slice copy of Network values.
func (s Set) Networks() []Network {
networks := make([]Network, len(s.networks))
copy(networks, s.networks)
return networks
}
// Placenames is a helper function to return a slice copy of Placename values.
func (s Set) Placenames() []Placename {
placenames := make([]Placename, len(s.placenames))
copy(placenames, s.placenames)
return placenames
}
// Points is a helper function to return a slice copy of Point values.
func (s Set) Points() []Point {
points := make([]Point, len(s.points))
copy(points, s.points)
return points
}
// Polarities is a helper function to return a slice copy of Polarity values.
func (s Set) Polarities() []Polarity {
polarities := make([]Polarity, len(s.polarities))
copy(polarities, s.polarities)
return polarities
}
// Preamps is a helper function to return a slice copy of Preamp values.
func (s Set) Preamps() []Preamp {
preamps := make([]Preamp, len(s.preamps))
copy(preamps, s.preamps)
return preamps
}
// Samples is a helper function to return a slice copy of Sample values.
func (s Set) Samples() []Sample {
samples := make([]Sample, len(s.samples))
copy(samples, s.samples)
return samples
}
// Sessions is a helper function to return a slice copy of Session values.
func (s Set) Sessions() []Session {
sessions := make([]Session, len(s.sessions))
copy(sessions, s.sessions)
return sessions
}
// Sites is a helper function to return a slice copy of Site values.
func (s Set) Sites() []Site {
sites := make([]Site, len(s.sites))
copy(sites, s.sites)
return sites
}
// Stations is a helper function to return a slice copy of Station values.
func (s Set) Stations() []Station {
stations := make([]Station, len(s.stations))
copy(stations, s.stations)
return stations
}
// Streams is a helper function to return a slice copy of Stream values.
func (s Set) Streams() []Stream {
streams := make([]Stream, len(s.streams))
copy(streams, s.streams)
return streams
}
// Telemetries is a helper function to return a slice copy of Telemetry values.
func (s Set) Telemetries() []Telemetry {
telemetries := make([]Telemetry, len(s.telemetries))
copy(telemetries, s.telemetries)
return telemetries
}
// Timings is a helper function to return a slice copy of Timing values.
func (s Set) Timings() []Timing {
timings := make([]Timing, len(s.timings))
copy(timings, s.timings)
return timings
}
// Views is a helper function to return a slice copy of View values.
func (s Set) Views() []View {
views := make([]View, len(s.views))
copy(views, s.views)
return views
}
// Visibilities is a helper function to return a slice copy of Visibility values.
func (s Set) Visibilities() []Visibility {
visibilities := make([]Visibility, len(s.visibilities))
copy(visibilities, s.visibilities)
return visibilities
}
// Asset is a helper function to return a Asset value and true if one exists.
func (s Set) Asset(make, model, serial string) (Asset, bool) {
for _, v := range s.assets {
if make != v.Make {
continue
}
if model != v.Model {
continue
}
if serial != v.Serial {
continue
}
return v, true
}
return Asset{}, false
}
// Citation is a helper function to return a Citation value and true if one exists.
func (s Set) Citation(key string) (Citation, bool) {
for _, v := range s.citations {
if key != v.Key {
continue
}
return v, true
}
return Citation{}, false
}
// Class is a helper function to return a Class value and true if one exists.
func (s Set) Class(station string) (Class, bool) {
for _, v := range s.classes {
if station != v.Station {
continue
}
return v, true
}
return Class{}, false
}
// Dart is a helper function to return a Dart value and true if one exists.
func (s Set) Dart(station string) (Dart, bool) {
for _, v := range s.darts {
if station != v.Station {
continue
}
return v, true
}
return Dart{}, false
}
// Mark is a helper function to return a Mark value and true if one exists.
func (s Set) Mark(code string) (Mark, bool) {
for _, v := range s.marks {
if code != v.Code {
continue
}
return v, true
}
return Mark{}, false
}
// Monument is a helper function to return a Monument value and true if one exists.
func (s Set) Monument(mark string) (Monument, bool) {
for _, v := range s.monuments {
if mark != v.Mark {
continue
}
return v, true
}
return Monument{}, false
}
// Mount is a helper function to return a Mount value and true if one exists.
func (s Set) Mount(code string) (Mount, bool) {
for _, v := range s.mounts {
if code != v.Code {
continue
}
return v, true
}
return Mount{}, false
}
// Network is a helper function to return a Network value and true if one exists.
func (s Set) Network(code string) (Network, bool) {
for _, v := range s.networks {
if code != v.Code {
continue
}
return v, true
}
return Network{}, false
}
// Placename is a helper function to return a Placename value and true if one exists.
func (s Set) Placename(name string) (Placename, bool) {
for _, v := range s.placenames {
if name != v.Name {
continue
}
return v, true
}
return Placename{}, false
}
// Point is a helper function to return a Point value and true if one exists.
func (s Set) Point(sample, location string) (Point, bool) {
for _, v := range s.points {
if sample != v.Sample {
continue
}
if location != v.Location {
continue
}
return v, true
}
return Point{}, false
}
// Sample is a helper function to return a Sample value and true if one exists.
func (s Set) Sample(code string) (Sample, bool) {
for _, v := range s.samples {
if code != v.Code {
continue
}
return v, true
}
return Sample{}, false
}
// Site is a helper function to return a Site value and true if one exists.
func (s Set) Site(station, location string) (Site, bool) {
for _, v := range s.sites {
if station != v.Station {
continue
}
if location != v.Location {
continue
}
return v, true
}
return Site{}, false
}
// Station is a helper function to return a Station value and true if one exists.
func (s Set) Station(code string) (Station, bool) {
for _, v := range s.stations {
if code != v.Code {
continue
}
return v, true
}
return Station{}, false
}
// View is a helper function to return a View value and true if one exists.
func (s Set) View(mount, code string) (View, bool) {
for _, v := range s.views {
if mount != v.Mount {
continue
}
if code != v.Code {
continue
}
return v, true
}
return View{}, false
}