/
model_base_equipment_event.go
547 lines (465 loc) · 17.5 KB
/
model_base_equipment_event.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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
/*
DCSA OpenAPI specification for Track & Trace
Provides equipment actual milestones along with Estimated Time of Arrival following DCSA standards
API version: 2.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
)
// checks if the BaseEquipmentEvent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BaseEquipmentEvent{}
// BaseEquipmentEvent The equipment event entity is a specialization of the event entity to support specification of data that only applies to an equipment event.
type BaseEquipmentEvent struct {
EventType *string `json:"eventType,omitempty"`
// Code for the event classifier can be - PLN (Planned) - ACT (Actual) - EST (Estimated)
EventClassifierCode *string `json:"eventClassifierCode,omitempty"`
EquipmentEventTypeCode EquipmentEventTypeCode `json:"equipmentEventTypeCode"`
// The unique identifier for the equipment, which should follow the BIC ISO Container Identification Number where possible. According to ISO 6346, a container identification code consists of a 4-letter prefix and a 7-digit number (composed of a 3-letter owner code, a category identifier, a serial number, and a check-digit). If a container does not comply with ISO 6346, it is suggested to follow Recommendation #2 “Container with non-ISO identification” from SMDG.
EquipmentReference *string `json:"equipmentReference,omitempty"`
// Unique code for the different equipment size/type used for transporting commodities. The code is a concatenation of ISO Equipment Size Code and ISO Equipment Type Code A and follows the ISO 6346 standard.
ISOEquipmentCode *string `json:"ISOEquipmentCode,omitempty"`
EmptyIndicatorCode EmptyIndicatorCode `json:"emptyIndicatorCode"`
EventLocation *Location `json:"eventLocation,omitempty"`
TransportCallID *string `json:"transportCallID,omitempty"`
TransportCall *TransportCall `json:"transportCall,omitempty"`
// An optional list of key-value (documentReferenceType-documentReferenceValue) pairs representing links to objects relevant to the event. The <b>documentReferenceType</b>-field is used to describe where the <b>documentReferenceValue</b>-field is pointing to.
DocumentReferences []DocumentReferencesInner `json:"documentReferences,omitempty"`
References []Reference `json:"references,omitempty"`
Seals []Seal `json:"seals,omitempty"`
// Unique identifier for Event Type Code, for transport events this is either - LOAD (Loaded) - DISC (Discharged) - GTIN (Gated in) - GTOT (Gated out) - STUF (Stuffed) - STRP (Stripped) Deprecated - use equipmentEventTypeCode instead
// Deprecated
EventTypeCode *string `json:"eventTypeCode,omitempty"`
}
// NewBaseEquipmentEvent instantiates a new BaseEquipmentEvent object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewBaseEquipmentEvent(equipmentEventTypeCode EquipmentEventTypeCode, emptyIndicatorCode EmptyIndicatorCode) *BaseEquipmentEvent {
this := BaseEquipmentEvent{}
this.EquipmentEventTypeCode = equipmentEventTypeCode
this.EmptyIndicatorCode = emptyIndicatorCode
return &this
}
// NewBaseEquipmentEventWithDefaults instantiates a new BaseEquipmentEvent object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewBaseEquipmentEventWithDefaults() *BaseEquipmentEvent {
this := BaseEquipmentEvent{}
return &this
}
// GetEventType returns the EventType field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetEventType() string {
if o == nil || IsNil(o.EventType) {
var ret string
return ret
}
return *o.EventType
}
// GetEventTypeOk returns a tuple with the EventType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetEventTypeOk() (*string, bool) {
if o == nil || IsNil(o.EventType) {
return nil, false
}
return o.EventType, true
}
// HasEventType returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasEventType() bool {
if o != nil && !IsNil(o.EventType) {
return true
}
return false
}
// SetEventType gets a reference to the given string and assigns it to the EventType field.
func (o *BaseEquipmentEvent) SetEventType(v string) {
o.EventType = &v
}
// GetEventClassifierCode returns the EventClassifierCode field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetEventClassifierCode() string {
if o == nil || IsNil(o.EventClassifierCode) {
var ret string
return ret
}
return *o.EventClassifierCode
}
// GetEventClassifierCodeOk returns a tuple with the EventClassifierCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetEventClassifierCodeOk() (*string, bool) {
if o == nil || IsNil(o.EventClassifierCode) {
return nil, false
}
return o.EventClassifierCode, true
}
// HasEventClassifierCode returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasEventClassifierCode() bool {
if o != nil && !IsNil(o.EventClassifierCode) {
return true
}
return false
}
// SetEventClassifierCode gets a reference to the given string and assigns it to the EventClassifierCode field.
func (o *BaseEquipmentEvent) SetEventClassifierCode(v string) {
o.EventClassifierCode = &v
}
// GetEquipmentEventTypeCode returns the EquipmentEventTypeCode field value
func (o *BaseEquipmentEvent) GetEquipmentEventTypeCode() EquipmentEventTypeCode {
if o == nil {
var ret EquipmentEventTypeCode
return ret
}
return o.EquipmentEventTypeCode
}
// GetEquipmentEventTypeCodeOk returns a tuple with the EquipmentEventTypeCode field value
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetEquipmentEventTypeCodeOk() (*EquipmentEventTypeCode, bool) {
if o == nil {
return nil, false
}
return &o.EquipmentEventTypeCode, true
}
// SetEquipmentEventTypeCode sets field value
func (o *BaseEquipmentEvent) SetEquipmentEventTypeCode(v EquipmentEventTypeCode) {
o.EquipmentEventTypeCode = v
}
// GetEquipmentReference returns the EquipmentReference field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetEquipmentReference() string {
if o == nil || IsNil(o.EquipmentReference) {
var ret string
return ret
}
return *o.EquipmentReference
}
// GetEquipmentReferenceOk returns a tuple with the EquipmentReference field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetEquipmentReferenceOk() (*string, bool) {
if o == nil || IsNil(o.EquipmentReference) {
return nil, false
}
return o.EquipmentReference, true
}
// HasEquipmentReference returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasEquipmentReference() bool {
if o != nil && !IsNil(o.EquipmentReference) {
return true
}
return false
}
// SetEquipmentReference gets a reference to the given string and assigns it to the EquipmentReference field.
func (o *BaseEquipmentEvent) SetEquipmentReference(v string) {
o.EquipmentReference = &v
}
// GetISOEquipmentCode returns the ISOEquipmentCode field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetISOEquipmentCode() string {
if o == nil || IsNil(o.ISOEquipmentCode) {
var ret string
return ret
}
return *o.ISOEquipmentCode
}
// GetISOEquipmentCodeOk returns a tuple with the ISOEquipmentCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetISOEquipmentCodeOk() (*string, bool) {
if o == nil || IsNil(o.ISOEquipmentCode) {
return nil, false
}
return o.ISOEquipmentCode, true
}
// HasISOEquipmentCode returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasISOEquipmentCode() bool {
if o != nil && !IsNil(o.ISOEquipmentCode) {
return true
}
return false
}
// SetISOEquipmentCode gets a reference to the given string and assigns it to the ISOEquipmentCode field.
func (o *BaseEquipmentEvent) SetISOEquipmentCode(v string) {
o.ISOEquipmentCode = &v
}
// GetEmptyIndicatorCode returns the EmptyIndicatorCode field value
func (o *BaseEquipmentEvent) GetEmptyIndicatorCode() EmptyIndicatorCode {
if o == nil {
var ret EmptyIndicatorCode
return ret
}
return o.EmptyIndicatorCode
}
// GetEmptyIndicatorCodeOk returns a tuple with the EmptyIndicatorCode field value
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetEmptyIndicatorCodeOk() (*EmptyIndicatorCode, bool) {
if o == nil {
return nil, false
}
return &o.EmptyIndicatorCode, true
}
// SetEmptyIndicatorCode sets field value
func (o *BaseEquipmentEvent) SetEmptyIndicatorCode(v EmptyIndicatorCode) {
o.EmptyIndicatorCode = v
}
// GetEventLocation returns the EventLocation field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetEventLocation() Location {
if o == nil || IsNil(o.EventLocation) {
var ret Location
return ret
}
return *o.EventLocation
}
// GetEventLocationOk returns a tuple with the EventLocation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetEventLocationOk() (*Location, bool) {
if o == nil || IsNil(o.EventLocation) {
return nil, false
}
return o.EventLocation, true
}
// HasEventLocation returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasEventLocation() bool {
if o != nil && !IsNil(o.EventLocation) {
return true
}
return false
}
// SetEventLocation gets a reference to the given Location and assigns it to the EventLocation field.
func (o *BaseEquipmentEvent) SetEventLocation(v Location) {
o.EventLocation = &v
}
// GetTransportCallID returns the TransportCallID field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetTransportCallID() string {
if o == nil || IsNil(o.TransportCallID) {
var ret string
return ret
}
return *o.TransportCallID
}
// GetTransportCallIDOk returns a tuple with the TransportCallID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetTransportCallIDOk() (*string, bool) {
if o == nil || IsNil(o.TransportCallID) {
return nil, false
}
return o.TransportCallID, true
}
// HasTransportCallID returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasTransportCallID() bool {
if o != nil && !IsNil(o.TransportCallID) {
return true
}
return false
}
// SetTransportCallID gets a reference to the given string and assigns it to the TransportCallID field.
func (o *BaseEquipmentEvent) SetTransportCallID(v string) {
o.TransportCallID = &v
}
// GetTransportCall returns the TransportCall field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetTransportCall() TransportCall {
if o == nil || IsNil(o.TransportCall) {
var ret TransportCall
return ret
}
return *o.TransportCall
}
// GetTransportCallOk returns a tuple with the TransportCall field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetTransportCallOk() (*TransportCall, bool) {
if o == nil || IsNil(o.TransportCall) {
return nil, false
}
return o.TransportCall, true
}
// HasTransportCall returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasTransportCall() bool {
if o != nil && !IsNil(o.TransportCall) {
return true
}
return false
}
// SetTransportCall gets a reference to the given TransportCall and assigns it to the TransportCall field.
func (o *BaseEquipmentEvent) SetTransportCall(v TransportCall) {
o.TransportCall = &v
}
// GetDocumentReferences returns the DocumentReferences field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetDocumentReferences() []DocumentReferencesInner {
if o == nil || IsNil(o.DocumentReferences) {
var ret []DocumentReferencesInner
return ret
}
return o.DocumentReferences
}
// GetDocumentReferencesOk returns a tuple with the DocumentReferences field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetDocumentReferencesOk() ([]DocumentReferencesInner, bool) {
if o == nil || IsNil(o.DocumentReferences) {
return nil, false
}
return o.DocumentReferences, true
}
// HasDocumentReferences returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasDocumentReferences() bool {
if o != nil && !IsNil(o.DocumentReferences) {
return true
}
return false
}
// SetDocumentReferences gets a reference to the given []DocumentReferencesInner and assigns it to the DocumentReferences field.
func (o *BaseEquipmentEvent) SetDocumentReferences(v []DocumentReferencesInner) {
o.DocumentReferences = v
}
// GetReferences returns the References field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetReferences() []Reference {
if o == nil || IsNil(o.References) {
var ret []Reference
return ret
}
return o.References
}
// GetReferencesOk returns a tuple with the References field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetReferencesOk() ([]Reference, bool) {
if o == nil || IsNil(o.References) {
return nil, false
}
return o.References, true
}
// HasReferences returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasReferences() bool {
if o != nil && !IsNil(o.References) {
return true
}
return false
}
// SetReferences gets a reference to the given []Reference and assigns it to the References field.
func (o *BaseEquipmentEvent) SetReferences(v []Reference) {
o.References = v
}
// GetSeals returns the Seals field value if set, zero value otherwise.
func (o *BaseEquipmentEvent) GetSeals() []Seal {
if o == nil || IsNil(o.Seals) {
var ret []Seal
return ret
}
return o.Seals
}
// GetSealsOk returns a tuple with the Seals field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BaseEquipmentEvent) GetSealsOk() ([]Seal, bool) {
if o == nil || IsNil(o.Seals) {
return nil, false
}
return o.Seals, true
}
// HasSeals returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasSeals() bool {
if o != nil && !IsNil(o.Seals) {
return true
}
return false
}
// SetSeals gets a reference to the given []Seal and assigns it to the Seals field.
func (o *BaseEquipmentEvent) SetSeals(v []Seal) {
o.Seals = v
}
// GetEventTypeCode returns the EventTypeCode field value if set, zero value otherwise.
// Deprecated
func (o *BaseEquipmentEvent) GetEventTypeCode() string {
if o == nil || IsNil(o.EventTypeCode) {
var ret string
return ret
}
return *o.EventTypeCode
}
// GetEventTypeCodeOk returns a tuple with the EventTypeCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *BaseEquipmentEvent) GetEventTypeCodeOk() (*string, bool) {
if o == nil || IsNil(o.EventTypeCode) {
return nil, false
}
return o.EventTypeCode, true
}
// HasEventTypeCode returns a boolean if a field has been set.
func (o *BaseEquipmentEvent) HasEventTypeCode() bool {
if o != nil && !IsNil(o.EventTypeCode) {
return true
}
return false
}
// SetEventTypeCode gets a reference to the given string and assigns it to the EventTypeCode field.
// Deprecated
func (o *BaseEquipmentEvent) SetEventTypeCode(v string) {
o.EventTypeCode = &v
}
func (o BaseEquipmentEvent) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BaseEquipmentEvent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.EventType) {
toSerialize["eventType"] = o.EventType
}
if !IsNil(o.EventClassifierCode) {
toSerialize["eventClassifierCode"] = o.EventClassifierCode
}
toSerialize["equipmentEventTypeCode"] = o.EquipmentEventTypeCode
if !IsNil(o.EquipmentReference) {
toSerialize["equipmentReference"] = o.EquipmentReference
}
if !IsNil(o.ISOEquipmentCode) {
toSerialize["ISOEquipmentCode"] = o.ISOEquipmentCode
}
toSerialize["emptyIndicatorCode"] = o.EmptyIndicatorCode
if !IsNil(o.EventLocation) {
toSerialize["eventLocation"] = o.EventLocation
}
if !IsNil(o.TransportCallID) {
toSerialize["transportCallID"] = o.TransportCallID
}
if !IsNil(o.TransportCall) {
toSerialize["transportCall"] = o.TransportCall
}
if !IsNil(o.DocumentReferences) {
toSerialize["documentReferences"] = o.DocumentReferences
}
if !IsNil(o.References) {
toSerialize["references"] = o.References
}
if !IsNil(o.Seals) {
toSerialize["seals"] = o.Seals
}
if !IsNil(o.EventTypeCode) {
toSerialize["eventTypeCode"] = o.EventTypeCode
}
return toSerialize, nil
}
type NullableBaseEquipmentEvent struct {
value *BaseEquipmentEvent
isSet bool
}
func (v NullableBaseEquipmentEvent) Get() *BaseEquipmentEvent {
return v.value
}
func (v *NullableBaseEquipmentEvent) Set(val *BaseEquipmentEvent) {
v.value = val
v.isSet = true
}
func (v NullableBaseEquipmentEvent) IsSet() bool {
return v.isSet
}
func (v *NullableBaseEquipmentEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBaseEquipmentEvent(val *BaseEquipmentEvent) *NullableBaseEquipmentEvent {
return &NullableBaseEquipmentEvent{value: val, isSet: true}
}
func (v NullableBaseEquipmentEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBaseEquipmentEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}