/
model_equipment_event.go
550 lines (469 loc) · 17.4 KB
/
model_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
548
549
550
/*
Track & Trace Events
Retrieve Track & Trace Events based on DCSA Interface standard v.2.2 This service provides shippers and consignees visibility to Shipment, Equipment and Transport events for shipments booked with A.P. Moller-Maersk A/S using standards set by the Digital Container Shipping Association.\\ <https://dcsa.org/>
API version: 1.1.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package maersk
import (
"encoding/json"
"time"
)
// EquipmentEvent The equipment event entity is a specialization of the event entity to support specification of data that only applies to an equipment event.
type EquipmentEvent struct {
// The unique identifier for the Equipment Event ID/Transport Event ID/Shipment Event ID.
EventID *string `json:"eventID,omitempty"`
EventType string `json:"eventType"`
// The local date and time, where the event took place or when the event will take place, in ISO 8601 format. For Shipment Event, it is the same as eventCreatedDateTime in UTC timezone.
EventDateTime string `json:"eventDateTime"`
// The UTC timestamp of when the event was created.
EventCreatedDateTime time.Time `json:"eventCreatedDateTime"`
// Code for the event classifier, either PLN, ACT or EST. * PLN - Planned * ACT - Actual * EST - Estimated
EventClassifierCode string `json:"eventClassifierCode"`
// References provided by the shipper or freight forwarder at the time of booking or at the time of providing shipping instruction. Carriers share it back when providing track and trace event updates, some are also printed on the B/L. Customers can use these references to track shipments in their internal systems.
References []EventReferencesInner `json:"references,omitempty"`
// Unique identifier for equipmentEventTypeCode. * LOAD (Loaded) * DISC (Discharged) * GTIN (Gated in) * GTOT (Gated out) * STUF (Stuffed) * STRP (Stripped) * PICK (Pick-up) * DROP (Drop-off) * RSEA (Resealed) * RMVD (Removed) * INSP (Inspected)
EquipmentEventTypeCode *string `json:"equipmentEventTypeCode,omitempty"`
// 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"`
// Code to denote whether the equipment is empty or laden.
EmptyIndicatorCode string `json:"emptyIndicatorCode"`
// An optional list of key-value (documentReferenceType-documentReferenceValue) pairs representing links to objects relevant to the event. The documentReferenceType-field is used to describe where the documentReferenceValue-field is pointing to.
DocumentReferences []DocumentReferencesInner `json:"documentReferences,omitempty"`
EventLocation *Location `json:"eventLocation,omitempty"`
TransportCall TransportCall `json:"transportCall"`
Seals []Seal `json:"seals,omitempty"`
}
// NewEquipmentEvent instantiates a new EquipmentEvent 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 NewEquipmentEvent(eventType string, eventDateTime string, eventCreatedDateTime time.Time, eventClassifierCode string, emptyIndicatorCode string, transportCall TransportCall) *EquipmentEvent {
this := EquipmentEvent{}
this.EventType = eventType
this.EventDateTime = eventDateTime
this.EventCreatedDateTime = eventCreatedDateTime
this.EventClassifierCode = eventClassifierCode
this.EmptyIndicatorCode = emptyIndicatorCode
this.TransportCall = transportCall
return &this
}
// NewEquipmentEventWithDefaults instantiates a new EquipmentEvent 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 NewEquipmentEventWithDefaults() *EquipmentEvent {
this := EquipmentEvent{}
return &this
}
// GetEventID returns the EventID field value if set, zero value otherwise.
func (o *EquipmentEvent) GetEventID() string {
if o == nil || o.EventID == nil {
var ret string
return ret
}
return *o.EventID
}
// GetEventIDOk returns a tuple with the EventID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetEventIDOk() (*string, bool) {
if o == nil || o.EventID == nil {
return nil, false
}
return o.EventID, true
}
// HasEventID returns a boolean if a field has been set.
func (o *EquipmentEvent) HasEventID() bool {
if o != nil && o.EventID != nil {
return true
}
return false
}
// SetEventID gets a reference to the given string and assigns it to the EventID field.
func (o *EquipmentEvent) SetEventID(v string) {
o.EventID = &v
}
// GetEventType returns the EventType field value
func (o *EquipmentEvent) GetEventType() string {
if o == nil {
var ret string
return ret
}
return o.EventType
}
// GetEventTypeOk returns a tuple with the EventType field value
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetEventTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventType, true
}
// SetEventType sets field value
func (o *EquipmentEvent) SetEventType(v string) {
o.EventType = v
}
// GetEventDateTime returns the EventDateTime field value
func (o *EquipmentEvent) GetEventDateTime() string {
if o == nil {
var ret string
return ret
}
return o.EventDateTime
}
// GetEventDateTimeOk returns a tuple with the EventDateTime field value
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetEventDateTimeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventDateTime, true
}
// SetEventDateTime sets field value
func (o *EquipmentEvent) SetEventDateTime(v string) {
o.EventDateTime = v
}
// GetEventCreatedDateTime returns the EventCreatedDateTime field value
func (o *EquipmentEvent) GetEventCreatedDateTime() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.EventCreatedDateTime
}
// GetEventCreatedDateTimeOk returns a tuple with the EventCreatedDateTime field value
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetEventCreatedDateTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.EventCreatedDateTime, true
}
// SetEventCreatedDateTime sets field value
func (o *EquipmentEvent) SetEventCreatedDateTime(v time.Time) {
o.EventCreatedDateTime = v
}
// GetEventClassifierCode returns the EventClassifierCode field value
func (o *EquipmentEvent) GetEventClassifierCode() string {
if o == nil {
var ret string
return ret
}
return o.EventClassifierCode
}
// GetEventClassifierCodeOk returns a tuple with the EventClassifierCode field value
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetEventClassifierCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventClassifierCode, true
}
// SetEventClassifierCode sets field value
func (o *EquipmentEvent) SetEventClassifierCode(v string) {
o.EventClassifierCode = v
}
// GetReferences returns the References field value if set, zero value otherwise.
func (o *EquipmentEvent) GetReferences() []EventReferencesInner {
if o == nil || o.References == nil {
var ret []EventReferencesInner
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 *EquipmentEvent) GetReferencesOk() ([]EventReferencesInner, bool) {
if o == nil || o.References == nil {
return nil, false
}
return o.References, true
}
// HasReferences returns a boolean if a field has been set.
func (o *EquipmentEvent) HasReferences() bool {
if o != nil && o.References != nil {
return true
}
return false
}
// SetReferences gets a reference to the given []EventReferencesInner and assigns it to the References field.
func (o *EquipmentEvent) SetReferences(v []EventReferencesInner) {
o.References = v
}
// GetEquipmentEventTypeCode returns the EquipmentEventTypeCode field value if set, zero value otherwise.
func (o *EquipmentEvent) GetEquipmentEventTypeCode() string {
if o == nil || o.EquipmentEventTypeCode == nil {
var ret string
return ret
}
return *o.EquipmentEventTypeCode
}
// GetEquipmentEventTypeCodeOk returns a tuple with the EquipmentEventTypeCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetEquipmentEventTypeCodeOk() (*string, bool) {
if o == nil || o.EquipmentEventTypeCode == nil {
return nil, false
}
return o.EquipmentEventTypeCode, true
}
// HasEquipmentEventTypeCode returns a boolean if a field has been set.
func (o *EquipmentEvent) HasEquipmentEventTypeCode() bool {
if o != nil && o.EquipmentEventTypeCode != nil {
return true
}
return false
}
// SetEquipmentEventTypeCode gets a reference to the given string and assigns it to the EquipmentEventTypeCode field.
func (o *EquipmentEvent) SetEquipmentEventTypeCode(v string) {
o.EquipmentEventTypeCode = &v
}
// GetEquipmentReference returns the EquipmentReference field value if set, zero value otherwise.
func (o *EquipmentEvent) GetEquipmentReference() string {
if o == nil || o.EquipmentReference == nil {
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 *EquipmentEvent) GetEquipmentReferenceOk() (*string, bool) {
if o == nil || o.EquipmentReference == nil {
return nil, false
}
return o.EquipmentReference, true
}
// HasEquipmentReference returns a boolean if a field has been set.
func (o *EquipmentEvent) HasEquipmentReference() bool {
if o != nil && o.EquipmentReference != nil {
return true
}
return false
}
// SetEquipmentReference gets a reference to the given string and assigns it to the EquipmentReference field.
func (o *EquipmentEvent) SetEquipmentReference(v string) {
o.EquipmentReference = &v
}
// GetISOEquipmentCode returns the ISOEquipmentCode field value if set, zero value otherwise.
func (o *EquipmentEvent) GetISOEquipmentCode() string {
if o == nil || o.ISOEquipmentCode == nil {
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 *EquipmentEvent) GetISOEquipmentCodeOk() (*string, bool) {
if o == nil || o.ISOEquipmentCode == nil {
return nil, false
}
return o.ISOEquipmentCode, true
}
// HasISOEquipmentCode returns a boolean if a field has been set.
func (o *EquipmentEvent) HasISOEquipmentCode() bool {
if o != nil && o.ISOEquipmentCode != nil {
return true
}
return false
}
// SetISOEquipmentCode gets a reference to the given string and assigns it to the ISOEquipmentCode field.
func (o *EquipmentEvent) SetISOEquipmentCode(v string) {
o.ISOEquipmentCode = &v
}
// GetEmptyIndicatorCode returns the EmptyIndicatorCode field value
func (o *EquipmentEvent) GetEmptyIndicatorCode() string {
if o == nil {
var ret string
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 *EquipmentEvent) GetEmptyIndicatorCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EmptyIndicatorCode, true
}
// SetEmptyIndicatorCode sets field value
func (o *EquipmentEvent) SetEmptyIndicatorCode(v string) {
o.EmptyIndicatorCode = v
}
// GetDocumentReferences returns the DocumentReferences field value if set, zero value otherwise.
func (o *EquipmentEvent) GetDocumentReferences() []DocumentReferencesInner {
if o == nil || o.DocumentReferences == nil {
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 *EquipmentEvent) GetDocumentReferencesOk() ([]DocumentReferencesInner, bool) {
if o == nil || o.DocumentReferences == nil {
return nil, false
}
return o.DocumentReferences, true
}
// HasDocumentReferences returns a boolean if a field has been set.
func (o *EquipmentEvent) HasDocumentReferences() bool {
if o != nil && o.DocumentReferences != nil {
return true
}
return false
}
// SetDocumentReferences gets a reference to the given []DocumentReferencesInner and assigns it to the DocumentReferences field.
func (o *EquipmentEvent) SetDocumentReferences(v []DocumentReferencesInner) {
o.DocumentReferences = v
}
// GetEventLocation returns the EventLocation field value if set, zero value otherwise.
func (o *EquipmentEvent) GetEventLocation() Location {
if o == nil || o.EventLocation == nil {
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 *EquipmentEvent) GetEventLocationOk() (*Location, bool) {
if o == nil || o.EventLocation == nil {
return nil, false
}
return o.EventLocation, true
}
// HasEventLocation returns a boolean if a field has been set.
func (o *EquipmentEvent) HasEventLocation() bool {
if o != nil && o.EventLocation != nil {
return true
}
return false
}
// SetEventLocation gets a reference to the given Location and assigns it to the EventLocation field.
func (o *EquipmentEvent) SetEventLocation(v Location) {
o.EventLocation = &v
}
// GetTransportCall returns the TransportCall field value
func (o *EquipmentEvent) GetTransportCall() TransportCall {
if o == nil {
var ret TransportCall
return ret
}
return o.TransportCall
}
// GetTransportCallOk returns a tuple with the TransportCall field value
// and a boolean to check if the value has been set.
func (o *EquipmentEvent) GetTransportCallOk() (*TransportCall, bool) {
if o == nil {
return nil, false
}
return &o.TransportCall, true
}
// SetTransportCall sets field value
func (o *EquipmentEvent) SetTransportCall(v TransportCall) {
o.TransportCall = v
}
// GetSeals returns the Seals field value if set, zero value otherwise.
func (o *EquipmentEvent) GetSeals() []Seal {
if o == nil || o.Seals == nil {
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 *EquipmentEvent) GetSealsOk() ([]Seal, bool) {
if o == nil || o.Seals == nil {
return nil, false
}
return o.Seals, true
}
// HasSeals returns a boolean if a field has been set.
func (o *EquipmentEvent) HasSeals() bool {
if o != nil && o.Seals != nil {
return true
}
return false
}
// SetSeals gets a reference to the given []Seal and assigns it to the Seals field.
func (o *EquipmentEvent) SetSeals(v []Seal) {
o.Seals = v
}
func (o EquipmentEvent) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.EventID != nil {
toSerialize["eventID"] = o.EventID
}
if true {
toSerialize["eventType"] = o.EventType
}
if true {
toSerialize["eventDateTime"] = o.EventDateTime
}
if true {
toSerialize["eventCreatedDateTime"] = o.EventCreatedDateTime
}
if true {
toSerialize["eventClassifierCode"] = o.EventClassifierCode
}
if o.References != nil {
toSerialize["references"] = o.References
}
if o.EquipmentEventTypeCode != nil {
toSerialize["equipmentEventTypeCode"] = o.EquipmentEventTypeCode
}
if o.EquipmentReference != nil {
toSerialize["equipmentReference"] = o.EquipmentReference
}
if o.ISOEquipmentCode != nil {
toSerialize["ISOEquipmentCode"] = o.ISOEquipmentCode
}
if true {
toSerialize["emptyIndicatorCode"] = o.EmptyIndicatorCode
}
if o.DocumentReferences != nil {
toSerialize["documentReferences"] = o.DocumentReferences
}
if o.EventLocation != nil {
toSerialize["eventLocation"] = o.EventLocation
}
if true {
toSerialize["transportCall"] = o.TransportCall
}
if o.Seals != nil {
toSerialize["seals"] = o.Seals
}
return json.Marshal(toSerialize)
}
type NullableEquipmentEvent struct {
value *EquipmentEvent
isSet bool
}
func (v NullableEquipmentEvent) Get() *EquipmentEvent {
return v.value
}
func (v *NullableEquipmentEvent) Set(val *EquipmentEvent) {
v.value = val
v.isSet = true
}
func (v NullableEquipmentEvent) IsSet() bool {
return v.isSet
}
func (v *NullableEquipmentEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEquipmentEvent(val *EquipmentEvent) *NullableEquipmentEvent {
return &NullableEquipmentEvent{value: val, isSet: true}
}
func (v NullableEquipmentEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEquipmentEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}