aboutsummaryrefslogtreecommitdiffstats
path: root/UniversalVesAdapter/src/main/java/org/onap/dcaegen2/ves/domain/ves70/CommonEventHeader.java
blob: a2554f68c7876fc070f18a43f5f1e8c56aeee217 (plain)
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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
/*
* ============LICENSE_START=======================================================
* ONAP : DCAE
* ================================================================================
* Copyright 2019 TechMahindra
*=================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
*/
package org.onap.dcaegen2.ves.domain.ves70;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;



/**
 * fields common to all events
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "domain",
    "eventId",
    "eventName",
    "eventType",
    "internalHeaderFields",
    "lastEpochMicrosec",
    "nfcNamingCode",
    "nfNamingCode",
    "nfVendorName",
    "priority",
    "reportingEntityId",
    "reportingEntityName",
    "sequence",
    "sourceId",
    "sourceName",
    "startEpochMicrosec",
    "timeZoneOffset",
    "version",
    "vesEventListenerVersion"
})
public class CommonEventHeader {

	
	
    /**
     * the eventing domain associated with the event
     * (Required)
     * 
     */
    @JsonProperty("domain")
    @JsonPropertyDescription("the eventing domain associated with the event")
    private CommonEventHeader.Domain domain;
    /**
     * event key that is unique to the event source
     * (Required)
     * 
     */
    @JsonProperty("eventId")
    @JsonPropertyDescription("event key that is unique to the event source")
    private String eventId;
    /**
     * unique event name
     * (Required)
     * 
     */
    @JsonProperty("eventName")
    @JsonPropertyDescription("unique event name")
    private String eventName;
    /**
     * for example - applicationNf, guestOS, hostOS, platform
     * 
     */
    @JsonProperty("eventType")
    @JsonPropertyDescription("for example - applicationNf, guestOS, hostOS, platform")
    private String eventType;
    /**
     * enrichment fields for internal VES Event Listener service use only, not supplied by event sources
     * 
     */
    @JsonProperty("internalHeaderFields")
    @JsonPropertyDescription("enrichment fields for internal VES Event Listener service use only, not supplied by event sources")
    private InternalHeaderFields internalHeaderFields;
    /**
     * the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds
     * (Required)
     * 
     */
    @JsonProperty("lastEpochMicrosec")
    @JsonPropertyDescription("the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds")
    private Double lastEpochMicrosec;
    /**
     *  3 character network function component type, aligned with vfc naming standards
     * 
     */
    @JsonProperty("nfcNamingCode")
    @JsonPropertyDescription("3 character network function component type, aligned with vfc naming standards")
    private String nfcNamingCode;
    /**
     *  4 character network function type, aligned with nf naming standards
     * 
     */
    @JsonProperty("nfNamingCode")
    @JsonPropertyDescription("4 character network function type, aligned with nf naming standards")
    private String nfNamingCode;
    /**
     * network function vendor name
     * 
     */
    @JsonProperty("nfVendorName")
    @JsonPropertyDescription("network function vendor name")
    private String nfVendorName;
    /**
     * processing priority
     * (Required)
     * 
     */
    @JsonProperty("priority")
    @JsonPropertyDescription("processing priority")
    private CommonEventHeader.Priority priority;
    /**
     * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process
     * 
     */
    @JsonProperty("reportingEntityId")
    @JsonPropertyDescription("UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process")
    private String reportingEntityId;
    /**
     * name of the entity reporting the event, for example, an EMS name; may be the same as sourceName
     * (Required)
     * 
     */
    @JsonProperty("reportingEntityName")
    @JsonPropertyDescription("name of the entity reporting the event, for example, an EMS name; may be the same as sourceName")
    private String reportingEntityName;
    /**
     * ordering of events communicated by an event source instance or 0 if not needed
     * (Required)
     * 
     */
    @JsonProperty("sequence")
    @JsonPropertyDescription("ordering of events communicated by an event source instance or 0 if not needed")
    private Integer sequence;
    /**
     * UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process
     * 
     */
    @JsonProperty("sourceId")
    @JsonPropertyDescription("UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process")
    private String sourceId;
    /**
     * name of the entity experiencing the event issue
     * (Required)
     * 
     */
    @JsonProperty("sourceName")
    @JsonPropertyDescription("name of the entity experiencing the event issue")
    private String sourceName;
    /**
     * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds
     * (Required)
     * 
     */
    @JsonProperty("startEpochMicrosec")
    @JsonPropertyDescription("the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds")
    private Double startEpochMicrosec;
    /**
     * UTC offset for the local time zone of the device as UTC+/-hh.mm
     * 
     */
    @JsonProperty("timeZoneOffset")
    @JsonPropertyDescription("UTC offset for the local time zone of the device as UTC+/-hh.mm")
    private String timeZoneOffset;
    /**
     * version of the event header
     * (Required)
     * 
     */
    @JsonProperty("version")
    @JsonPropertyDescription("version of the event header")
    private CommonEventHeader.Version version;
    /**
     * version of the VES Event Listener API
     * (Required)
     * 
     */
    @JsonProperty("vesEventListenerVersion")
    @JsonPropertyDescription("version of the VES Event Listener API")
    private CommonEventHeader.VesEventListenerVersion vesEventListenerVersion;
    
    @JsonIgnore
    private long ts1 =  new Date().getTime();
    @JsonIgnore
    public long getTs1() {
		return ts1;
	}

    @JsonIgnore
	public void setTs1(long ts1) {
		this.ts1 = ts1;
    }

    /**
     * the eventing domain associated with the event
     * (Required)
     * 
     */
    @JsonProperty("domain")
    public CommonEventHeader.Domain getDomain() {
        return domain;
    }

    /**
     * the eventing domain associated with the event
     * (Required)
     * 
     */
    @JsonProperty("domain")
    public void setDomain(CommonEventHeader.Domain domain) {
        this.domain = domain;
    }

    /**
     * event key that is unique to the event source
     * (Required)
     * 
     */
    @JsonProperty("eventId")
    public String getEventId() {
        return eventId;
    }

    /**
     * event key that is unique to the event source
     * (Required)
     * 
     */
    @JsonProperty("eventId")
    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    /**
     * unique event name
     * (Required)
     * 
     */
    @JsonProperty("eventName")
    public String getEventName() {
        return eventName;
    }

    /**
     * unique event name
     * (Required)
     * 
     */
    @JsonProperty("eventName")
    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    /**
     * for example - applicationNf, guestOS, hostOS, platform
     * 
     */
    @JsonProperty("eventType")
    public String getEventType() {
        return eventType;
    }

    /**
     * for example - applicationNf, guestOS, hostOS, platform
     * 
     */
    @JsonProperty("eventType")
    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    /**
     * enrichment fields for internal VES Event Listener service use only, not supplied by event sources
     * 
     */
    @JsonProperty("internalHeaderFields")
    public InternalHeaderFields getInternalHeaderFields() {
        return internalHeaderFields;
    }

    /**
     * enrichment fields for internal VES Event Listener service use only, not supplied by event sources
     * 
     */
    @JsonProperty("internalHeaderFields")
    public void setInternalHeaderFields(InternalHeaderFields internalHeaderFields) {
        this.internalHeaderFields = internalHeaderFields;
    }

    /**
     * the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds
     * (Required)
     * 
     */
    @JsonProperty("lastEpochMicrosec")
    public Double getLastEpochMicrosec() {
        return lastEpochMicrosec;
    }

    /**
     * the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds
     * (Required)
     * 
     */
    @JsonProperty("lastEpochMicrosec")
    public void setLastEpochMicrosec(Double lastEpochMicrosec) {
        this.lastEpochMicrosec = lastEpochMicrosec;
    }

    /**
     *  3 character network function component type, aligned with vfc naming standards
     * 
     */
    @JsonProperty("nfcNamingCode")
    public String getNfcNamingCode() {
        return nfcNamingCode;
    }

    /**
     *  3 character network function component type, aligned with vfc naming standards
     * 
     */
    @JsonProperty("nfcNamingCode")
    public void setNfcNamingCode(String nfcNamingCode) {
        this.nfcNamingCode = nfcNamingCode;
    }

    /**
     *  4 character network function type, aligned with nf naming standards
     * 
     */
    @JsonProperty("nfNamingCode")
    public String getNfNamingCode() {
        return nfNamingCode;
    }

    /**
     *  4 character network function type, aligned with nf naming standards
     * 
     */
    @JsonProperty("nfNamingCode")
    public void setNfNamingCode(String nfNamingCode) {
        this.nfNamingCode = nfNamingCode;
    }

    /**
     * network function vendor name
     * 
     */
    @JsonProperty("nfVendorName")
    public String getNfVendorName() {
        return nfVendorName;
    }

    /**
     * network function vendor name
     * 
     */
    @JsonProperty("nfVendorName")
    public void setNfVendorName(String nfVendorName) {
        this.nfVendorName = nfVendorName;
    }

    /**
     * processing priority
     * (Required)
     * 
     */
    @JsonProperty("priority")
    public CommonEventHeader.Priority getPriority() {
        return priority;
    }

    /**
     * processing priority
     * (Required)
     * 
     */
    @JsonProperty("priority")
    public void setPriority(CommonEventHeader.Priority priority) {
        this.priority = priority;
    }

    /**
     * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process
     * 
     */
    @JsonProperty("reportingEntityId")
    public String getReportingEntityId() {
        return reportingEntityId;
    }

    /**
     * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process
     * 
     */
    @JsonProperty("reportingEntityId")
    public void setReportingEntityId(String reportingEntityId) {
        this.reportingEntityId = reportingEntityId;
    }

    /**
     * name of the entity reporting the event, for example, an EMS name; may be the same as sourceName
     * (Required)
     * 
     */
    @JsonProperty("reportingEntityName")
    public String getReportingEntityName() {
        return reportingEntityName;
    }

    /**
     * name of the entity reporting the event, for example, an EMS name; may be the same as sourceName
     * (Required)
     * 
     */
    @JsonProperty("reportingEntityName")
    public void setReportingEntityName(String reportingEntityName) {
        this.reportingEntityName = reportingEntityName;
    }

    /**
     * ordering of events communicated by an event source instance or 0 if not needed
     * (Required)
     * 
     */
    @JsonProperty("sequence")
    public Integer getSequence() {
        return sequence;
    }

    /**
     * ordering of events communicated by an event source instance or 0 if not needed
     * (Required)
     * 
     */
    @JsonProperty("sequence")
    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    /**
     * UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process
     * 
     */
    @JsonProperty("sourceId")
    public String getSourceId() {
        return sourceId;
    }

    /**
     * UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process
     * 
     */
    @JsonProperty("sourceId")
    public void setSourceId(String sourceId) {
        this.sourceId = sourceId;
    }

    /**
     * name of the entity experiencing the event issue
     * (Required)
     * 
     */
    @JsonProperty("sourceName")
    public String getSourceName() {
        return sourceName;
    }

    /**
     * name of the entity experiencing the event issue
     * (Required)
     * 
     */
    @JsonProperty("sourceName")
    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    /**
     * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds
     * (Required)
     * 
     */
    @JsonProperty("startEpochMicrosec")
    public Double getStartEpochMicrosec() {
        return startEpochMicrosec;
    }

    /**
     * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds
     * (Required)
     * 
     */
    @JsonProperty("startEpochMicrosec")
    public void setStartEpochMicrosec(Double startEpochMicrosec) {
        this.startEpochMicrosec = startEpochMicrosec;
    }

    /**
     * UTC offset for the local time zone of the device as UTC+/-hh.mm
     * 
     */
    @JsonProperty("timeZoneOffset")
    public String getTimeZoneOffset() {
        return timeZoneOffset;
    }

    /**
     * UTC offset for the local time zone of the device as UTC+/-hh.mm
     * 
     */
    @JsonProperty("timeZoneOffset")
    public void setTimeZoneOffset(String timeZoneOffset) {
        this.timeZoneOffset = timeZoneOffset;
    }

    /**
     * version of the event header
     * (Required)
     * 
     */
    @JsonProperty("version")
    public CommonEventHeader.Version getVersion() {
        return version;
    }

    /**
     * version of the event header
     * (Required)
     * 
     */
    @JsonProperty("version")
    public void setVersion(CommonEventHeader.Version version) {
        this.version = version;
    }

    /**
     * version of the VES Event Listener API
     * (Required)
     * 
     */
    @JsonProperty("vesEventListenerVersion")
    public CommonEventHeader.VesEventListenerVersion getVesEventListenerVersion() {
        return vesEventListenerVersion;
    }

    /**
     * version of the VES Event Listener API
     * (Required)
     * 
     */
    @JsonProperty("vesEventListenerVersion")
    public void setVesEventListenerVersion(CommonEventHeader.VesEventListenerVersion vesEventListenerVersion) {
        this.vesEventListenerVersion = vesEventListenerVersion;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().append(domain).append(eventId).append(eventName).append(eventType).append(internalHeaderFields).append(lastEpochMicrosec).append(nfcNamingCode).append(nfNamingCode).append(nfVendorName).append(priority).append(reportingEntityId).append(reportingEntityName).append(sequence).append(sourceId).append(sourceName).append(startEpochMicrosec).append(timeZoneOffset).append(version).append(vesEventListenerVersion).toHashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof CommonEventHeader) == false) {
            return false;
        }
        CommonEventHeader rhs = ((CommonEventHeader) other);
        return new EqualsBuilder().append(domain, rhs.domain).append(eventId, rhs.eventId).append(eventName, rhs.eventName).append(eventType, rhs.eventType).append(internalHeaderFields, rhs.internalHeaderFields).append(lastEpochMicrosec, rhs.lastEpochMicrosec).append(nfcNamingCode, rhs.nfcNamingCode).append(nfNamingCode, rhs.nfNamingCode).append(nfVendorName, rhs.nfVendorName).append(priority, rhs.priority).append(reportingEntityId, rhs.reportingEntityId).append(reportingEntityName, rhs.reportingEntityName).append(sequence, rhs.sequence).append(sourceId, rhs.sourceId).append(sourceName, rhs.sourceName).append(startEpochMicrosec, rhs.startEpochMicrosec).append(timeZoneOffset, rhs.timeZoneOffset).append(version, rhs.version).append(vesEventListenerVersion, rhs.vesEventListenerVersion).isEquals();
    }

    public enum Domain {

        FAULT("fault"),
        HEARTBEAT("heartbeat"),
        MEASUREMENT("measurement"),
        MOBILE_FLOW("mobileFlow"),
        NOTIFICATION("notification"),
        OTHER("other"),
        PNF_REGISTRATION("pnfRegistration"),
        SIP_SIGNALING("sipSignaling"),
        STATE_CHANGE("stateChange"),
        SYSLOG("syslog"),
        THRESHOLD_CROSSING_ALERT("thresholdCrossingAlert"),
        VOICE_QUALITY("voiceQuality");
        private final String value;
        private final static Map<String, CommonEventHeader.Domain> CONSTANTS = new HashMap<String, CommonEventHeader.Domain>();

        static {
            for (CommonEventHeader.Domain c: values()) {
                CONSTANTS.put(c.value, c);
            }
        }

        private Domain(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return this.value;
        }

        @JsonValue
        public String value() {
            return this.value;
        }

        @JsonCreator
        public static CommonEventHeader.Domain fromValue(String value) {
            CommonEventHeader.Domain constant = CONSTANTS.get(value);
            if (constant == null) {
                throw new IllegalArgumentException(value);
            } else {
                return constant;
            }
        }

    }

    public enum Priority {

        HIGH("High"),
        MEDIUM("Medium"),
        NORMAL("Normal"),
        LOW("Low");
        private final String value;
        private final static Map<String, CommonEventHeader.Priority> CONSTANTS = new HashMap<String, CommonEventHeader.Priority>();

        static {
            for (CommonEventHeader.Priority c: values()) {
                CONSTANTS.put(c.value, c);
            }
        }

        private Priority(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return this.value;
        }

        @JsonValue
        public String value() {
            return this.value;
        }

        @JsonCreator
        public static CommonEventHeader.Priority fromValue(String value) {
            CommonEventHeader.Priority constant = CONSTANTS.get(value);
            if (constant == null) {
                throw new IllegalArgumentException(value);
            } else {
                return constant;
            }
        }

    }

    public enum Version {

        _4_0_1("4.0.1");
        private final String value;
        private final static Map<String, CommonEventHeader.Version> CONSTANTS = new HashMap<String, CommonEventHeader.Version>();

        static {
            for (CommonEventHeader.Version c: values()) {
                CONSTANTS.put(c.value, c);
            }
        }

        private Version(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return this.value;
        }

        @JsonValue
        public String value() {
            return this.value;
        }

        @JsonCreator
        public static CommonEventHeader.Version fromValue(String value) {
            CommonEventHeader.Version constant = CONSTANTS.get(value);
            if (constant == null) {
                throw new IllegalArgumentException(value);
            } else {
                return constant;
            }
        }

    }

    public enum VesEventListenerVersion {

        _7_0_1("7.0.1");
        private final String value;
        private final static Map<String, CommonEventHeader.VesEventListenerVersion> CONSTANTS = new HashMap<String, CommonEventHeader.VesEventListenerVersion>();

        static {
            for (CommonEventHeader.VesEventListenerVersion c: values()) {
                CONSTANTS.put(c.value, c);
            }
        }

        private VesEventListenerVersion(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return this.value;
        }

        @JsonValue
        public String value() {
            return this.value;
        }

        @JsonCreator
        public static CommonEventHeader.VesEventListenerVersion fromValue(String value) {
            CommonEventHeader.VesEventListenerVersion constant = CONSTANTS.get(value);
            if (constant == null) {
                throw new IllegalArgumentException(value);
            } else {
                return constant;
            }
        }

    }

}