/
model_transport_equipment_event.go
556 lines (475 loc) · 16.7 KB
/
model_transport_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
551
552
553
554
555
556
/*
DCSA Track and Trace API
API specifications for the Track and Trace interface standard issued by DCSA.org.
API version: 1.2.0
Contact: info@dcsa.org
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
"time"
)
// TransportEquipmentEvent The transport equipment event entity is a specialization of the event entity to support specification of data that applies to both transport and equipment events.
type TransportEquipmentEvent struct {
// The unique identifier for the Equipment Event ID/Transport Event ID/Shipment Event ID.
EventID string `json:"eventID"`
EventType string `json:"eventType"`
// The local date and time, where the event took place, in ISO 8601 format.
EventDateTime time.Time `json:"eventDateTime"`
// Code for the event classifier, either PLN, ACT or EST.
EventClassifierCode string `json:"eventClassifierCode"`
// Unique identifier for Event Type Code.
EventTypeCode string `json:"eventTypeCode"`
// The reference for the transport, e.g. when the mode of transport is a vessel, the transport reference will be the vessel IMO number.
TransportReference string `json:"transportReference"`
// The transport leg reference will be specific per mode of transport: - Vessel: Voyage number as specified by the vessel operator - Truck: Not yet specified - Rail: Not yet specified - Barge: Not yet specified.
TransportLegReference string `json:"transportLegReference"`
// The unique identifier for the equipment, which should follow the BIC ISO Container Identification Number where possible. If a container is not yet assigned to a shipment, the interface cannot return any information when an equipment reference is given as input. If a container is assigned to an (active) shipment, the interface returns information on the active shipment.
EquipmentReference *string `json:"equipmentReference,omitempty"`
// The code to identify the specific type of facility.
FacilityTypeCode string `json:"facilityTypeCode"`
// The UN Location Code identifies a location in the sense of a city/a town/a village, being the smaller administrative area existing as defined by the competent national authority in each country.
UNLocationCode string `json:"UNLocationCode"`
// The code used for identifying the specific facility.
FacilityCode string `json:"facilityCode"`
// An alternative way to capture the facility when no standardized DCSA facility code can be found.
OtherFacility *string `json:"otherFacility,omitempty"`
// Code to denote whether the equipment is empty or laden.
EmptyIndicatorCode string `json:"emptyIndicatorCode"`
// A code specifying a type of transport mode.
ModeOfTransportCode *string `json:"modeOfTransportCode,omitempty"`
// Description for Event Type Code.
Description *string `json:"description,omitempty"`
}
// NewTransportEquipmentEvent instantiates a new TransportEquipmentEvent 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 NewTransportEquipmentEvent(eventID string, eventType string, eventDateTime time.Time, eventClassifierCode string, eventTypeCode string, transportReference string, transportLegReference string, facilityTypeCode string, uNLocationCode string, facilityCode string, emptyIndicatorCode string) *TransportEquipmentEvent {
this := TransportEquipmentEvent{}
this.EventID = eventID
this.EventType = eventType
this.EventDateTime = eventDateTime
this.EventClassifierCode = eventClassifierCode
this.EventTypeCode = eventTypeCode
this.TransportReference = transportReference
this.TransportLegReference = transportLegReference
this.FacilityTypeCode = facilityTypeCode
this.UNLocationCode = uNLocationCode
this.FacilityCode = facilityCode
this.EmptyIndicatorCode = emptyIndicatorCode
return &this
}
// NewTransportEquipmentEventWithDefaults instantiates a new TransportEquipmentEvent 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 NewTransportEquipmentEventWithDefaults() *TransportEquipmentEvent {
this := TransportEquipmentEvent{}
return &this
}
// GetEventID returns the EventID field value
func (o *TransportEquipmentEvent) GetEventID() string {
if o == nil {
var ret string
return ret
}
return o.EventID
}
// GetEventIDOk returns a tuple with the EventID field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetEventIDOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventID, true
}
// SetEventID sets field value
func (o *TransportEquipmentEvent) SetEventID(v string) {
o.EventID = v
}
// GetEventType returns the EventType field value
func (o *TransportEquipmentEvent) 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 *TransportEquipmentEvent) GetEventTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventType, true
}
// SetEventType sets field value
func (o *TransportEquipmentEvent) SetEventType(v string) {
o.EventType = v
}
// GetEventDateTime returns the EventDateTime field value
func (o *TransportEquipmentEvent) GetEventDateTime() time.Time {
if o == nil {
var ret time.Time
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 *TransportEquipmentEvent) GetEventDateTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.EventDateTime, true
}
// SetEventDateTime sets field value
func (o *TransportEquipmentEvent) SetEventDateTime(v time.Time) {
o.EventDateTime = v
}
// GetEventClassifierCode returns the EventClassifierCode field value
func (o *TransportEquipmentEvent) 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 *TransportEquipmentEvent) GetEventClassifierCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventClassifierCode, true
}
// SetEventClassifierCode sets field value
func (o *TransportEquipmentEvent) SetEventClassifierCode(v string) {
o.EventClassifierCode = v
}
// GetEventTypeCode returns the EventTypeCode field value
func (o *TransportEquipmentEvent) GetEventTypeCode() string {
if o == nil {
var ret string
return ret
}
return o.EventTypeCode
}
// GetEventTypeCodeOk returns a tuple with the EventTypeCode field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetEventTypeCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventTypeCode, true
}
// SetEventTypeCode sets field value
func (o *TransportEquipmentEvent) SetEventTypeCode(v string) {
o.EventTypeCode = v
}
// GetTransportReference returns the TransportReference field value
func (o *TransportEquipmentEvent) GetTransportReference() string {
if o == nil {
var ret string
return ret
}
return o.TransportReference
}
// GetTransportReferenceOk returns a tuple with the TransportReference field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetTransportReferenceOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TransportReference, true
}
// SetTransportReference sets field value
func (o *TransportEquipmentEvent) SetTransportReference(v string) {
o.TransportReference = v
}
// GetTransportLegReference returns the TransportLegReference field value
func (o *TransportEquipmentEvent) GetTransportLegReference() string {
if o == nil {
var ret string
return ret
}
return o.TransportLegReference
}
// GetTransportLegReferenceOk returns a tuple with the TransportLegReference field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetTransportLegReferenceOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TransportLegReference, true
}
// SetTransportLegReference sets field value
func (o *TransportEquipmentEvent) SetTransportLegReference(v string) {
o.TransportLegReference = v
}
// GetEquipmentReference returns the EquipmentReference field value if set, zero value otherwise.
func (o *TransportEquipmentEvent) 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 *TransportEquipmentEvent) 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 *TransportEquipmentEvent) 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 *TransportEquipmentEvent) SetEquipmentReference(v string) {
o.EquipmentReference = &v
}
// GetFacilityTypeCode returns the FacilityTypeCode field value
func (o *TransportEquipmentEvent) GetFacilityTypeCode() string {
if o == nil {
var ret string
return ret
}
return o.FacilityTypeCode
}
// GetFacilityTypeCodeOk returns a tuple with the FacilityTypeCode field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetFacilityTypeCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.FacilityTypeCode, true
}
// SetFacilityTypeCode sets field value
func (o *TransportEquipmentEvent) SetFacilityTypeCode(v string) {
o.FacilityTypeCode = v
}
// GetUNLocationCode returns the UNLocationCode field value
func (o *TransportEquipmentEvent) GetUNLocationCode() string {
if o == nil {
var ret string
return ret
}
return o.UNLocationCode
}
// GetUNLocationCodeOk returns a tuple with the UNLocationCode field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetUNLocationCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UNLocationCode, true
}
// SetUNLocationCode sets field value
func (o *TransportEquipmentEvent) SetUNLocationCode(v string) {
o.UNLocationCode = v
}
// GetFacilityCode returns the FacilityCode field value
func (o *TransportEquipmentEvent) GetFacilityCode() string {
if o == nil {
var ret string
return ret
}
return o.FacilityCode
}
// GetFacilityCodeOk returns a tuple with the FacilityCode field value
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetFacilityCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.FacilityCode, true
}
// SetFacilityCode sets field value
func (o *TransportEquipmentEvent) SetFacilityCode(v string) {
o.FacilityCode = v
}
// GetOtherFacility returns the OtherFacility field value if set, zero value otherwise.
func (o *TransportEquipmentEvent) GetOtherFacility() string {
if o == nil || o.OtherFacility == nil {
var ret string
return ret
}
return *o.OtherFacility
}
// GetOtherFacilityOk returns a tuple with the OtherFacility field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetOtherFacilityOk() (*string, bool) {
if o == nil || o.OtherFacility == nil {
return nil, false
}
return o.OtherFacility, true
}
// HasOtherFacility returns a boolean if a field has been set.
func (o *TransportEquipmentEvent) HasOtherFacility() bool {
if o != nil && o.OtherFacility != nil {
return true
}
return false
}
// SetOtherFacility gets a reference to the given string and assigns it to the OtherFacility field.
func (o *TransportEquipmentEvent) SetOtherFacility(v string) {
o.OtherFacility = &v
}
// GetEmptyIndicatorCode returns the EmptyIndicatorCode field value
func (o *TransportEquipmentEvent) 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 *TransportEquipmentEvent) GetEmptyIndicatorCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EmptyIndicatorCode, true
}
// SetEmptyIndicatorCode sets field value
func (o *TransportEquipmentEvent) SetEmptyIndicatorCode(v string) {
o.EmptyIndicatorCode = v
}
// GetModeOfTransportCode returns the ModeOfTransportCode field value if set, zero value otherwise.
func (o *TransportEquipmentEvent) GetModeOfTransportCode() string {
if o == nil || o.ModeOfTransportCode == nil {
var ret string
return ret
}
return *o.ModeOfTransportCode
}
// GetModeOfTransportCodeOk returns a tuple with the ModeOfTransportCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetModeOfTransportCodeOk() (*string, bool) {
if o == nil || o.ModeOfTransportCode == nil {
return nil, false
}
return o.ModeOfTransportCode, true
}
// HasModeOfTransportCode returns a boolean if a field has been set.
func (o *TransportEquipmentEvent) HasModeOfTransportCode() bool {
if o != nil && o.ModeOfTransportCode != nil {
return true
}
return false
}
// SetModeOfTransportCode gets a reference to the given string and assigns it to the ModeOfTransportCode field.
func (o *TransportEquipmentEvent) SetModeOfTransportCode(v string) {
o.ModeOfTransportCode = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *TransportEquipmentEvent) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransportEquipmentEvent) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *TransportEquipmentEvent) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *TransportEquipmentEvent) SetDescription(v string) {
o.Description = &v
}
func (o TransportEquipmentEvent) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["eventID"] = o.EventID
}
if true {
toSerialize["eventType"] = o.EventType
}
if true {
toSerialize["eventDateTime"] = o.EventDateTime
}
if true {
toSerialize["eventClassifierCode"] = o.EventClassifierCode
}
if true {
toSerialize["eventTypeCode"] = o.EventTypeCode
}
if true {
toSerialize["transportReference"] = o.TransportReference
}
if true {
toSerialize["transportLegReference"] = o.TransportLegReference
}
if o.EquipmentReference != nil {
toSerialize["equipmentReference"] = o.EquipmentReference
}
if true {
toSerialize["facilityTypeCode"] = o.FacilityTypeCode
}
if true {
toSerialize["UNLocationCode"] = o.UNLocationCode
}
if true {
toSerialize["facilityCode"] = o.FacilityCode
}
if o.OtherFacility != nil {
toSerialize["otherFacility"] = o.OtherFacility
}
if true {
toSerialize["emptyIndicatorCode"] = o.EmptyIndicatorCode
}
if o.ModeOfTransportCode != nil {
toSerialize["modeOfTransportCode"] = o.ModeOfTransportCode
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
return json.Marshal(toSerialize)
}
type NullableTransportEquipmentEvent struct {
value *TransportEquipmentEvent
isSet bool
}
func (v NullableTransportEquipmentEvent) Get() *TransportEquipmentEvent {
return v.value
}
func (v *NullableTransportEquipmentEvent) Set(val *TransportEquipmentEvent) {
v.value = val
v.isSet = true
}
func (v NullableTransportEquipmentEvent) IsSet() bool {
return v.isSet
}
func (v *NullableTransportEquipmentEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTransportEquipmentEvent(val *TransportEquipmentEvent) *NullableTransportEquipmentEvent {
return &NullableTransportEquipmentEvent{value: val, isSet: true}
}
func (v NullableTransportEquipmentEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTransportEquipmentEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}