[DCAEGEN2] Release dcaegen2-services-mapper container
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / ves54 / CommonEventHeader.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * ONAP : DCAE\r
4  * ================================================================================\r
5  * Copyright 2019 TechMahindra\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  *\r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.onap.dcaegen2.ves.domain.ves54;\r
22 \r
23 import java.util.HashMap;\r
24 import java.util.Map;\r
25 \r
26 import org.apache.commons.lang.builder.HashCodeBuilder;\r
27 import org.apache.commons.lang.builder.ToStringBuilder;\r
28 \r
29 import com.fasterxml.jackson.annotation.JsonAnyGetter;\r
30 import com.fasterxml.jackson.annotation.JsonAnySetter;\r
31 import com.fasterxml.jackson.annotation.JsonCreator;\r
32 import com.fasterxml.jackson.annotation.JsonIgnore;\r
33 import com.fasterxml.jackson.annotation.JsonInclude;\r
34 import com.fasterxml.jackson.annotation.JsonProperty;\r
35 import com.fasterxml.jackson.annotation.JsonPropertyDescription;\r
36 import com.fasterxml.jackson.annotation.JsonPropertyOrder;\r
37 import com.fasterxml.jackson.annotation.JsonValue;\r
38 \r
39 \r
40 /**\r
41  * fields common to all events\r
42  * \r
43  */\r
44 @JsonInclude(JsonInclude.Include.NON_NULL)\r
45 @JsonPropertyOrder({"domain", "eventId", "eventName", "eventType", "internalHeaderFields",\r
46         "lastEpochMicrosec", "nfcNamingCode", "nfNamingCode", "priority", "reportingEntityId",\r
47         "reportingEntityName", "sequence", "sourceId", "sourceName", "startEpochMicrosec",\r
48         "version"})\r
49 public class CommonEventHeader {\r
50     \r
51     /**\r
52      * the eventing domain associated with the event (Required)\r
53      * \r
54      */\r
55     @JsonProperty("domain")\r
56     @JsonPropertyDescription("the eventing domain associated with the event")\r
57     private CommonEventHeader.Domain domain;\r
58     /**\r
59      * event key that is unique to the event source (Required)\r
60      * \r
61      */\r
62     @JsonProperty("eventId")\r
63     @JsonPropertyDescription("event key that is unique to the event source")\r
64     private String eventId;\r
65     /**\r
66      * unique event name (Required)\r
67      * \r
68      */\r
69     @JsonProperty("eventName")\r
70     @JsonPropertyDescription("unique event name")\r
71     private String eventName;\r
72     /**\r
73      * for example - applicationVnf, guestOS, hostOS, platform\r
74      * \r
75      */\r
76     @JsonProperty("eventType")\r
77     @JsonPropertyDescription("for example - applicationVnf, guestOS, hostOS, platform")\r
78     private String eventType;\r
79     /**\r
80      * enrichment fields for internal VES Event Listener service use only, not supplied by event\r
81      * sources\r
82      * \r
83      */\r
84     @JsonProperty("internalHeaderFields")\r
85     @JsonPropertyDescription("enrichment fields for internal VES Event Listener service use only, not supplied by event sources")\r
86     private InternalHeaderFields internalHeaderFields;\r
87     /**\r
88      * the latest unix time aka epoch time associated with the event from any component--as\r
89      * microseconds elapsed since 1 Jan 1970 not including leap seconds (Required)\r
90      * \r
91      */\r
92     @JsonProperty("lastEpochMicrosec")\r
93     @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")\r
94     private Double lastEpochMicrosec;\r
95     /**\r
96      * 3 character network function component type, aligned with vfc naming standards\r
97      * \r
98      */\r
99     @JsonProperty("nfcNamingCode")\r
100     @JsonPropertyDescription("3 character network function component type, aligned with vfc naming standards")\r
101     private String nfcNamingCode;\r
102     /**\r
103      * 4 character network function type, aligned with vnf naming standards\r
104      * \r
105      */\r
106     @JsonProperty("nfNamingCode")\r
107     @JsonPropertyDescription("4 character network function type, aligned with vnf naming standards")\r
108     private String nfNamingCode;\r
109     /**\r
110      * processing priority (Required)\r
111      * \r
112      */\r
113     @JsonProperty("priority")\r
114     @JsonPropertyDescription("processing priority")\r
115     private CommonEventHeader.Priority priority;\r
116     /**\r
117      * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by\r
118      * the ATT enrichment process\r
119      * \r
120      */\r
121     @JsonProperty("reportingEntityId")\r
122     @JsonPropertyDescription("UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process")\r
123     private String reportingEntityId;\r
124     /**\r
125      * name of the entity reporting the event, for example, an EMS name; may be the same as\r
126      * sourceName (Required)\r
127      * \r
128      */\r
129     @JsonProperty("reportingEntityName")\r
130     @JsonPropertyDescription("name of the entity reporting the event, for example, an EMS name; may be the same as sourceName")\r
131     private String reportingEntityName;\r
132     /**\r
133      * ordering of events communicated by an event source instance or 0 if not needed (Required)\r
134      * \r
135      */\r
136     @JsonProperty("sequence")\r
137     @JsonPropertyDescription("ordering of events communicated by an event source instance or 0 if not needed")\r
138     private Integer sequence;\r
139     /**\r
140      * UUID identifying the entity experiencing the event issue; must be populated by the ATT\r
141      * enrichment process\r
142      * \r
143      */\r
144     @JsonProperty("sourceId")\r
145     @JsonPropertyDescription("UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process")\r
146     private String sourceId;\r
147     /**\r
148      * name of the entity experiencing the event issue (Required)\r
149      * \r
150      */\r
151     @JsonProperty("sourceName")\r
152     @JsonPropertyDescription("name of the entity experiencing the event issue")\r
153     private String sourceName;\r
154     /**\r
155      * the earliest unix time aka epoch time associated with the event from any component--as\r
156      * microseconds elapsed since 1 Jan 1970 not including leap seconds (Required)\r
157      * \r
158      */\r
159     @JsonProperty("startEpochMicrosec")\r
160     @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")\r
161     private Double startEpochMicrosec;\r
162     /**\r
163      * version of the event header (Required)\r
164      * \r
165      */\r
166     @JsonProperty("version")\r
167     @JsonPropertyDescription("version of the event header")\r
168     private Double version;\r
169     @JsonIgnore\r
170     private Map<String, Object> additionalProperties = new HashMap<String, Object>();\r
171     \r
172     /**\r
173      * the eventing domain associated with the event (Required)\r
174      * \r
175      */\r
176     @JsonProperty("domain")\r
177     public CommonEventHeader.Domain getDomain() {\r
178         return domain;\r
179     }\r
180     \r
181     /**\r
182      * the eventing domain associated with the event (Required)\r
183      * \r
184      */\r
185     @JsonProperty("domain")\r
186     public void setDomain(CommonEventHeader.Domain domain) {\r
187         this.domain = domain;\r
188     }\r
189     \r
190     /**\r
191      * event key that is unique to the event source (Required)\r
192      * \r
193      */\r
194     @JsonProperty("eventId")\r
195     public String getEventId() {\r
196         return eventId;\r
197     }\r
198     \r
199     /**\r
200      * event key that is unique to the event source (Required)\r
201      * \r
202      */\r
203     @JsonProperty("eventId")\r
204     public void setEventId(String eventId) {\r
205         this.eventId = eventId;\r
206     }\r
207     \r
208     /**\r
209      * unique event name (Required)\r
210      * \r
211      */\r
212     @JsonProperty("eventName")\r
213     public String getEventName() {\r
214         return eventName;\r
215     }\r
216     \r
217     /**\r
218      * unique event name (Required)\r
219      * \r
220      */\r
221     @JsonProperty("eventName")\r
222     public void setEventName(String eventName) {\r
223         this.eventName = eventName;\r
224     }\r
225     \r
226     /**\r
227      * for example - applicationVnf, guestOS, hostOS, platform\r
228      * \r
229      */\r
230     @JsonProperty("eventType")\r
231     public String getEventType() {\r
232         return eventType;\r
233     }\r
234     \r
235     /**\r
236      * for example - applicationVnf, guestOS, hostOS, platform\r
237      * \r
238      */\r
239     @JsonProperty("eventType")\r
240     public void setEventType(String eventType) {\r
241         this.eventType = eventType;\r
242     }\r
243     \r
244     /**\r
245      * enrichment fields for internal VES Event Listener service use only, not supplied by event\r
246      * sources\r
247      * \r
248      */\r
249     @JsonProperty("internalHeaderFields")\r
250     public InternalHeaderFields getInternalHeaderFields() {\r
251         return internalHeaderFields;\r
252     }\r
253     \r
254     /**\r
255      * enrichment fields for internal VES Event Listener service use only, not supplied by event\r
256      * sources\r
257      * \r
258      */\r
259     @JsonProperty("internalHeaderFields")\r
260     public void setInternalHeaderFields(InternalHeaderFields internalHeaderFields) {\r
261         this.internalHeaderFields = internalHeaderFields;\r
262     }\r
263     \r
264     /**\r
265      * the latest unix time aka epoch time associated with the event from any component--as\r
266      * microseconds elapsed since 1 Jan 1970 not including leap seconds (Required)\r
267      * \r
268      */\r
269     @JsonProperty("lastEpochMicrosec")\r
270     public Double getLastEpochMicrosec() {\r
271         return lastEpochMicrosec;\r
272     }\r
273     \r
274     /**\r
275      * the latest unix time aka epoch time associated with the event from any component--as\r
276      * microseconds elapsed since 1 Jan 1970 not including leap seconds (Required)\r
277      * \r
278      */\r
279     @JsonProperty("lastEpochMicrosec")\r
280     public void setLastEpochMicrosec(Double lastEpochMicrosec) {\r
281         this.lastEpochMicrosec = lastEpochMicrosec;\r
282     }\r
283     \r
284     /**\r
285      * 3 character network function component type, aligned with vfc naming standards\r
286      * \r
287      */\r
288     @JsonProperty("nfcNamingCode")\r
289     public String getNfcNamingCode() {\r
290         return nfcNamingCode;\r
291     }\r
292     \r
293     /**\r
294      * 3 character network function component type, aligned with vfc naming standards\r
295      * \r
296      */\r
297     @JsonProperty("nfcNamingCode")\r
298     public void setNfcNamingCode(String nfcNamingCode) {\r
299         this.nfcNamingCode = nfcNamingCode;\r
300     }\r
301     \r
302     /**\r
303      * 4 character network function type, aligned with vnf naming standards\r
304      * \r
305      */\r
306     @JsonProperty("nfNamingCode")\r
307     public String getNfNamingCode() {\r
308         return nfNamingCode;\r
309     }\r
310     \r
311     /**\r
312      * 4 character network function type, aligned with vnf naming standards\r
313      * \r
314      */\r
315     @JsonProperty("nfNamingCode")\r
316     public void setNfNamingCode(String nfNamingCode) {\r
317         this.nfNamingCode = nfNamingCode;\r
318     }\r
319     \r
320     /**\r
321      * processing priority (Required)\r
322      * \r
323      */\r
324     @JsonProperty("priority")\r
325     public CommonEventHeader.Priority getPriority() {\r
326         return priority;\r
327     }\r
328     \r
329     /**\r
330      * processing priority (Required)\r
331      * \r
332      */\r
333     @JsonProperty("priority")\r
334     public void setPriority(CommonEventHeader.Priority priority) {\r
335         this.priority = priority;\r
336     }\r
337     \r
338     /**\r
339      * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by\r
340      * the ATT enrichment process\r
341      * \r
342      */\r
343     @JsonProperty("reportingEntityId")\r
344     public String getReportingEntityId() {\r
345         return reportingEntityId;\r
346     }\r
347     \r
348     /**\r
349      * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by\r
350      * the ATT enrichment process\r
351      * \r
352      */\r
353     @JsonProperty("reportingEntityId")\r
354     public void setReportingEntityId(String reportingEntityId) {\r
355         this.reportingEntityId = reportingEntityId;\r
356     }\r
357     \r
358     /**\r
359      * name of the entity reporting the event, for example, an EMS name; may be the same as\r
360      * sourceName (Required)\r
361      * \r
362      */\r
363     @JsonProperty("reportingEntityName")\r
364     public String getReportingEntityName() {\r
365         return reportingEntityName;\r
366     }\r
367     \r
368     /**\r
369      * name of the entity reporting the event, for example, an EMS name; may be the same as\r
370      * sourceName (Required)\r
371      * \r
372      */\r
373     @JsonProperty("reportingEntityName")\r
374     public void setReportingEntityName(String reportingEntityName) {\r
375         this.reportingEntityName = reportingEntityName;\r
376     }\r
377     \r
378     /**\r
379      * ordering of events communicated by an event source instance or 0 if not needed (Required)\r
380      * \r
381      */\r
382     @JsonProperty("sequence")\r
383     public Integer getSequence() {\r
384         return sequence;\r
385     }\r
386     \r
387     /**\r
388      * ordering of events communicated by an event source instance or 0 if not needed (Required)\r
389      * \r
390      */\r
391     @JsonProperty("sequence")\r
392     public void setSequence(Integer sequence) {\r
393         this.sequence = sequence;\r
394     }\r
395     \r
396     /**\r
397      * UUID identifying the entity experiencing the event issue; must be populated by the ATT\r
398      * enrichment process\r
399      * \r
400      */\r
401     @JsonProperty("sourceId")\r
402     public String getSourceId() {\r
403         return sourceId;\r
404     }\r
405     \r
406     /**\r
407      * UUID identifying the entity experiencing the event issue; must be populated by the ATT\r
408      * enrichment process\r
409      * \r
410      */\r
411     @JsonProperty("sourceId")\r
412     public void setSourceId(String sourceId) {\r
413         this.sourceId = sourceId;\r
414     }\r
415     \r
416     /**\r
417      * name of the entity experiencing the event issue (Required)\r
418      * \r
419      */\r
420     @JsonProperty("sourceName")\r
421     public String getSourceName() {\r
422         return sourceName;\r
423     }\r
424     \r
425     /**\r
426      * name of the entity experiencing the event issue (Required)\r
427      * \r
428      */\r
429     @JsonProperty("sourceName")\r
430     public void setSourceName(String sourceName) {\r
431         this.sourceName = sourceName;\r
432     }\r
433     \r
434     /**\r
435      * the earliest unix time aka epoch time associated with the event from any component--as\r
436      * microseconds elapsed since 1 Jan 1970 not including leap seconds (Required)\r
437      * \r
438      */\r
439     @JsonProperty("startEpochMicrosec")\r
440     public Double getStartEpochMicrosec() {\r
441         return startEpochMicrosec;\r
442     }\r
443     \r
444     /**\r
445      * the earliest unix time aka epoch time associated with the event from any component--as\r
446      * microseconds elapsed since 1 Jan 1970 not including leap seconds (Required)\r
447      * \r
448      */\r
449     @JsonProperty("startEpochMicrosec")\r
450     public void setStartEpochMicrosec(Double startEpochMicrosec) {\r
451         this.startEpochMicrosec = startEpochMicrosec;\r
452     }\r
453     \r
454     /**\r
455      * version of the event header (Required)\r
456      * \r
457      */\r
458     @JsonProperty("version")\r
459     public Double getVersion() {\r
460         return version;\r
461     }\r
462     \r
463     /**\r
464      * version of the event header (Required)\r
465      * \r
466      */\r
467     @JsonProperty("version")\r
468     public void setVersion(Double version) {\r
469         this.version = version;\r
470     }\r
471     \r
472     @Override\r
473     public String toString() {\r
474         return ToStringBuilder.reflectionToString(this);\r
475     }\r
476     \r
477     @JsonAnyGetter\r
478     public Map<String, Object> getAdditionalProperties() {\r
479         return this.additionalProperties;\r
480     }\r
481     \r
482     @JsonAnySetter\r
483     public void setAdditionalProperty(String name, Object value) {\r
484         this.additionalProperties.put(name, value);\r
485     }\r
486     \r
487     @Override\r
488     public int hashCode() {\r
489         return new HashCodeBuilder().append(domain).append(eventId).append(eventName)\r
490                 .append(eventType).append(internalHeaderFields).append(lastEpochMicrosec)\r
491                 .append(nfcNamingCode).append(nfNamingCode).append(priority)\r
492                 .append(reportingEntityId).append(reportingEntityName).append(sequence)\r
493                 .append(sourceId).append(sourceName).append(startEpochMicrosec).append(version)\r
494                 .append(additionalProperties).toHashCode();\r
495     }\r
496     \r
497     \r
498     public enum Domain {\r
499         \r
500         FAULT("fault"), HEARTBEAT("heartbeat"), MEASUREMENTS_FOR_VF_SCALING(\r
501                 "measurementsForVfScaling"), MOBILE_FLOW(\r
502                         "mobileFlow"), OTHER("other"), SIP_SIGNALING("sipSignaling"), STATE_CHANGE(\r
503                                 "stateChange"), SYSLOG("syslog"), THRESHOLD_CROSSING_ALERT(\r
504                                         "thresholdCrossingAlert"), VOICE_QUALITY("voiceQuality");\r
505         private final String value;\r
506         private final static Map<String, CommonEventHeader.Domain> CONSTANTS =\r
507                 new HashMap<String, CommonEventHeader.Domain>();\r
508         \r
509         static {\r
510             for (CommonEventHeader.Domain c : values()) {\r
511                 CONSTANTS.put(c.value, c);\r
512             }\r
513         }\r
514         \r
515         private Domain(String value) {\r
516             this.value = value;\r
517         }\r
518         \r
519         @Override\r
520         public String toString() {\r
521             return this.value;\r
522         }\r
523         \r
524         @JsonValue\r
525         public String value() {\r
526             return this.value;\r
527         }\r
528         \r
529         @JsonCreator\r
530         public static CommonEventHeader.Domain fromValue(String value) {\r
531             CommonEventHeader.Domain constant = CONSTANTS.get(value);\r
532             if (constant == null) {\r
533                 throw new IllegalArgumentException(value);\r
534             } else {\r
535                 return constant;\r
536             }\r
537         }\r
538         \r
539     }\r
540     \r
541     public enum Priority {\r
542         \r
543         HIGH("High"), MEDIUM("Medium"), NORMAL("Normal"), LOW("Low");\r
544         private final String value;\r
545         private final static Map<String, CommonEventHeader.Priority> CONSTANTS =\r
546                 new HashMap<String, CommonEventHeader.Priority>();\r
547         \r
548         static {\r
549             for (CommonEventHeader.Priority c : values()) {\r
550                 CONSTANTS.put(c.value, c);\r
551             }\r
552         }\r
553         \r
554         private Priority(String value) {\r
555             this.value = value;\r
556         }\r
557         \r
558         @Override\r
559         public String toString() {\r
560             return this.value;\r
561         }\r
562         \r
563         @JsonValue\r
564         public String value() {\r
565             return this.value;\r
566         }\r
567         \r
568         @JsonCreator\r
569         public static CommonEventHeader.Priority fromValue(String value) {\r
570             CommonEventHeader.Priority constant = CONSTANTS.get(value);\r
571             if (constant == null) {\r
572                 throw new IllegalArgumentException(value);\r
573             } else {\r
574                 return constant;\r
575             }\r
576         }\r
577         \r
578     }\r
579     \r
580 }\r