2 * ============LICENSE_START=======================================================
\r 
   4 * ================================================================================
\r 
   5 * Copyright 2018 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 
  11 *     http://www.apache.org/licenses/LICENSE-2.0
\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 
  20 package org.onap.dcaegen2.ves.domain.ves7_0;
\r 
  22 import java.util.ArrayList;
\r 
  23 import java.util.HashMap;
\r 
  24 import java.util.List;
\r 
  25 import java.util.Map;
\r 
  26 import com.fasterxml.jackson.annotation.JsonCreator;
\r 
  27 import com.fasterxml.jackson.annotation.JsonInclude;
\r 
  28 import com.fasterxml.jackson.annotation.JsonProperty;
\r 
  29 import com.fasterxml.jackson.annotation.JsonPropertyDescription;
\r 
  30 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
\r 
  31 import com.fasterxml.jackson.annotation.JsonValue;
\r 
  32 import org.apache.commons.lang.builder.EqualsBuilder;
\r 
  33 import org.apache.commons.lang.builder.HashCodeBuilder;
\r 
  34 import org.apache.commons.lang.builder.ToStringBuilder;
\r 
  38  * fields specific to threshold crossing alert events
\r 
  41 @JsonInclude(JsonInclude.Include.NON_NULL)
\r 
  42 @JsonPropertyOrder({
\r 
  44     "additionalParameters",
\r 
  49     "associatedAlertIdList",
\r 
  50     "collectionTimestamp",
\r 
  54     "eventStartTimestamp",
\r 
  57     "possibleRootCause",
\r 
  58     "thresholdCrossingFieldsVersion"
\r 
  60 public class ThresholdCrossingAlertFields {
\r 
  63      * an associative array which is an array of key:value pairs
\r 
  66     @JsonProperty("additionalFields")
\r 
  67     @JsonPropertyDescription("an associative array which is an array of key:value pairs")
\r 
  68     private AlarmAdditionalInformation additionalFields;
\r 
  70      * performance counters
\r 
  74     @JsonProperty("additionalParameters")
\r 
  75     @JsonPropertyDescription("performance counters")
\r 
  76     private List<AdditionalParameter> additionalParameters = new ArrayList<AdditionalParameter>();
\r 
  82     @JsonProperty("alertAction")
\r 
  83     @JsonPropertyDescription("Event action")
\r 
  84     private ThresholdCrossingAlertFields.AlertAction alertAction;
\r 
  86      * Unique short alert description such as IF-SHUB-ERRDROP
\r 
  90     @JsonProperty("alertDescription")
\r 
  91     @JsonPropertyDescription("Unique short alert description such as IF-SHUB-ERRDROP")
\r 
  92     private String alertDescription;
\r 
  98     @JsonProperty("alertType")
\r 
  99     @JsonPropertyDescription("Event type")
\r 
 100     private ThresholdCrossingAlertFields.AlertType alertType;
\r 
 102      * Calculated API value (if applicable)
\r 
 105     @JsonProperty("alertValue")
\r 
 106     @JsonPropertyDescription("Calculated API value (if applicable)")
\r 
 107     private String alertValue;
\r 
 109      * List of eventIds associated with the event being reported
\r 
 112     @JsonProperty("associatedAlertIdList")
\r 
 113     @JsonPropertyDescription("List of eventIds associated with the event being reported")
\r 
 114     private List<String> associatedAlertIdList = new ArrayList<String>();
\r 
 116      * Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800
\r 
 120     @JsonProperty("collectionTimestamp")
\r 
 121     @JsonPropertyDescription("Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800")
\r 
 122     private String collectionTimestamp;
\r 
 124      * Specific performance collector instance used
\r 
 127     @JsonProperty("dataCollector")
\r 
 128     @JsonPropertyDescription("Specific performance collector instance used")
\r 
 129     private String dataCollector;
\r 
 131      * type of network element - internal ATT field
\r 
 134     @JsonProperty("elementType")
\r 
 135     @JsonPropertyDescription("type of network element - internal ATT field")
\r 
 136     private String elementType;
\r 
 138      * event severity or priority
\r 
 142     @JsonProperty("eventSeverity")
\r 
 143     @JsonPropertyDescription("event severity or priority")
\r 
 144     private ThresholdCrossingAlertFields.EventSeverity eventSeverity;
\r 
 146      * Time closest to when the measurement was made; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800
\r 
 150     @JsonProperty("eventStartTimestamp")
\r 
 151     @JsonPropertyDescription("Time closest to when the measurement was made; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800")
\r 
 152     private String eventStartTimestamp;
\r 
 154      * Physical or logical port or card (if applicable)
\r 
 157     @JsonProperty("interfaceName")
\r 
 158     @JsonPropertyDescription("Physical or logical port or card (if applicable)")
\r 
 159     private String interfaceName;
\r 
 161      * network name - internal ATT field
\r 
 164     @JsonProperty("networkService")
\r 
 165     @JsonPropertyDescription("network name - internal ATT field")
\r 
 166     private String networkService;
\r 
 168      * Reserved for future use
\r 
 171     @JsonProperty("possibleRootCause")
\r 
 172     @JsonPropertyDescription("Reserved for future use")
\r 
 173     private String possibleRootCause;
\r 
 175      * version of the thresholdCrossingAlertFields block
\r 
 179     @JsonProperty("thresholdCrossingFieldsVersion")
\r 
 180     @JsonPropertyDescription("version of the thresholdCrossingAlertFields block")
\r 
 181     private ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion thresholdCrossingFieldsVersion;
\r 
 184      * an associative array which is an array of key:value pairs
\r 
 187     @JsonProperty("additionalFields")
\r 
 188     public AlarmAdditionalInformation getAdditionalFields() {
\r 
 189         return additionalFields;
\r 
 193      * an associative array which is an array of key:value pairs
\r 
 196     @JsonProperty("additionalFields")
\r 
 197     public void setAdditionalFields(AlarmAdditionalInformation additionalFields) {
\r 
 198         this.additionalFields = additionalFields;
\r 
 202      * performance counters
\r 
 206     @JsonProperty("additionalParameters")
\r 
 207     public List<AdditionalParameter> getAdditionalParameters() {
\r 
 208         return additionalParameters;
\r 
 212      * performance counters
\r 
 216     @JsonProperty("additionalParameters")
\r 
 217     public void setAdditionalParameters(List<AdditionalParameter> additionalParameters) {
\r 
 218         this.additionalParameters = additionalParameters;
\r 
 226     @JsonProperty("alertAction")
\r 
 227     public ThresholdCrossingAlertFields.AlertAction getAlertAction() {
\r 
 228         return alertAction;
\r 
 236     @JsonProperty("alertAction")
\r 
 237     public void setAlertAction(ThresholdCrossingAlertFields.AlertAction alertAction) {
\r 
 238         this.alertAction = alertAction;
\r 
 242      * Unique short alert description such as IF-SHUB-ERRDROP
\r 
 246     @JsonProperty("alertDescription")
\r 
 247     public String getAlertDescription() {
\r 
 248         return alertDescription;
\r 
 252      * Unique short alert description such as IF-SHUB-ERRDROP
\r 
 256     @JsonProperty("alertDescription")
\r 
 257     public void setAlertDescription(String alertDescription) {
\r 
 258         this.alertDescription = alertDescription;
\r 
 266     @JsonProperty("alertType")
\r 
 267     public ThresholdCrossingAlertFields.AlertType getAlertType() {
\r 
 276     @JsonProperty("alertType")
\r 
 277     public void setAlertType(ThresholdCrossingAlertFields.AlertType alertType) {
\r 
 278         this.alertType = alertType;
\r 
 282      * Calculated API value (if applicable)
\r 
 285     @JsonProperty("alertValue")
\r 
 286     public String getAlertValue() {
\r 
 291      * Calculated API value (if applicable)
\r 
 294     @JsonProperty("alertValue")
\r 
 295     public void setAlertValue(String alertValue) {
\r 
 296         this.alertValue = alertValue;
\r 
 300      * List of eventIds associated with the event being reported
\r 
 303     @JsonProperty("associatedAlertIdList")
\r 
 304     public List<String> getAssociatedAlertIdList() {
\r 
 305         return associatedAlertIdList;
\r 
 309      * List of eventIds associated with the event being reported
\r 
 312     @JsonProperty("associatedAlertIdList")
\r 
 313     public void setAssociatedAlertIdList(List<String> associatedAlertIdList) {
\r 
 314         this.associatedAlertIdList = associatedAlertIdList;
\r 
 318      * Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800
\r 
 322     @JsonProperty("collectionTimestamp")
\r 
 323     public String getCollectionTimestamp() {
\r 
 324         return collectionTimestamp;
\r 
 328      * Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800
\r 
 332     @JsonProperty("collectionTimestamp")
\r 
 333     public void setCollectionTimestamp(String collectionTimestamp) {
\r 
 334         this.collectionTimestamp = collectionTimestamp;
\r 
 338      * Specific performance collector instance used
\r 
 341     @JsonProperty("dataCollector")
\r 
 342     public String getDataCollector() {
\r 
 343         return dataCollector;
\r 
 347      * Specific performance collector instance used
\r 
 350     @JsonProperty("dataCollector")
\r 
 351     public void setDataCollector(String dataCollector) {
\r 
 352         this.dataCollector = dataCollector;
\r 
 356      * type of network element - internal ATT field
\r 
 359     @JsonProperty("elementType")
\r 
 360     public String getElementType() {
\r 
 361         return elementType;
\r 
 365      * type of network element - internal ATT field
\r 
 368     @JsonProperty("elementType")
\r 
 369     public void setElementType(String elementType) {
\r 
 370         this.elementType = elementType;
\r 
 374      * event severity or priority
\r 
 378     @JsonProperty("eventSeverity")
\r 
 379     public ThresholdCrossingAlertFields.EventSeverity getEventSeverity() {
\r 
 380         return eventSeverity;
\r 
 384      * event severity or priority
\r 
 388     @JsonProperty("eventSeverity")
\r 
 389     public void setEventSeverity(ThresholdCrossingAlertFields.EventSeverity eventSeverity) {
\r 
 390         this.eventSeverity = eventSeverity;
\r 
 394      * Time closest to when the measurement was made; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800
\r 
 398     @JsonProperty("eventStartTimestamp")
\r 
 399     public String getEventStartTimestamp() {
\r 
 400         return eventStartTimestamp;
\r 
 404      * Time closest to when the measurement was made; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800
\r 
 408     @JsonProperty("eventStartTimestamp")
\r 
 409     public void setEventStartTimestamp(String eventStartTimestamp) {
\r 
 410         this.eventStartTimestamp = eventStartTimestamp;
\r 
 414      * Physical or logical port or card (if applicable)
\r 
 417     @JsonProperty("interfaceName")
\r 
 418     public String getInterfaceName() {
\r 
 419         return interfaceName;
\r 
 423      * Physical or logical port or card (if applicable)
\r 
 426     @JsonProperty("interfaceName")
\r 
 427     public void setInterfaceName(String interfaceName) {
\r 
 428         this.interfaceName = interfaceName;
\r 
 432      * network name - internal ATT field
\r 
 435     @JsonProperty("networkService")
\r 
 436     public String getNetworkService() {
\r 
 437         return networkService;
\r 
 441      * network name - internal ATT field
\r 
 444     @JsonProperty("networkService")
\r 
 445     public void setNetworkService(String networkService) {
\r 
 446         this.networkService = networkService;
\r 
 450      * Reserved for future use
\r 
 453     @JsonProperty("possibleRootCause")
\r 
 454     public String getPossibleRootCause() {
\r 
 455         return possibleRootCause;
\r 
 459      * Reserved for future use
\r 
 462     @JsonProperty("possibleRootCause")
\r 
 463     public void setPossibleRootCause(String possibleRootCause) {
\r 
 464         this.possibleRootCause = possibleRootCause;
\r 
 468      * version of the thresholdCrossingAlertFields block
\r 
 472     @JsonProperty("thresholdCrossingFieldsVersion")
\r 
 473     public ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion getThresholdCrossingFieldsVersion() {
\r 
 474         return thresholdCrossingFieldsVersion;
\r 
 478      * version of the thresholdCrossingAlertFields block
\r 
 482     @JsonProperty("thresholdCrossingFieldsVersion")
\r 
 483     public void setThresholdCrossingFieldsVersion(ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion thresholdCrossingFieldsVersion) {
\r 
 484         this.thresholdCrossingFieldsVersion = thresholdCrossingFieldsVersion;
\r 
 488     public String toString() {
\r 
 489         return ToStringBuilder.reflectionToString(this);
\r 
 493     public int hashCode() {
\r 
 494         return new HashCodeBuilder().append(additionalFields).append(additionalParameters).append(alertAction).append(alertDescription).append(alertType).append(alertValue).append(associatedAlertIdList).append(collectionTimestamp).append(dataCollector).append(elementType).append(eventSeverity).append(eventStartTimestamp).append(interfaceName).append(networkService).append(possibleRootCause).append(thresholdCrossingFieldsVersion).toHashCode();
\r 
 498     public boolean equals(Object other) {
\r 
 499         if (other == this) {
\r 
 502         if ((other instanceof ThresholdCrossingAlertFields) == false) {
\r 
 505         ThresholdCrossingAlertFields rhs = ((ThresholdCrossingAlertFields) other);
\r 
 506         return new EqualsBuilder().append(additionalFields, rhs.additionalFields).append(additionalParameters, rhs.additionalParameters).append(alertAction, rhs.alertAction).append(alertDescription, rhs.alertDescription).append(alertType, rhs.alertType).append(alertValue, rhs.alertValue).append(associatedAlertIdList, rhs.associatedAlertIdList).append(collectionTimestamp, rhs.collectionTimestamp).append(dataCollector, rhs.dataCollector).append(elementType, rhs.elementType).append(eventSeverity, rhs.eventSeverity).append(eventStartTimestamp, rhs.eventStartTimestamp).append(interfaceName, rhs.interfaceName).append(networkService, rhs.networkService).append(possibleRootCause, rhs.possibleRootCause).append(thresholdCrossingFieldsVersion, rhs.thresholdCrossingFieldsVersion).isEquals();
\r 
 509     public enum AlertAction {
\r 
 514         private final String value;
\r 
 515         private final static Map<String, ThresholdCrossingAlertFields.AlertAction> CONSTANTS = new HashMap<String, ThresholdCrossingAlertFields.AlertAction>();
\r 
 518             for (ThresholdCrossingAlertFields.AlertAction c: values()) {
\r 
 519                 CONSTANTS.put(c.value, c);
\r 
 523         private AlertAction(String value) {
\r 
 524             this.value = value;
\r 
 528         public String toString() {
\r 
 533         public String value() {
\r 
 538         public static ThresholdCrossingAlertFields.AlertAction fromValue(String value) {
\r 
 539             ThresholdCrossingAlertFields.AlertAction constant = CONSTANTS.get(value);
\r 
 540             if (constant == null) {
\r 
 541                 throw new IllegalArgumentException(value);
\r 
 549     public enum AlertType {
\r 
 551         CARD_ANOMALY("CARD-ANOMALY"),
\r 
 552         ELEMENT_ANOMALY("ELEMENT-ANOMALY"),
\r 
 553         INTERFACE_ANOMALY("INTERFACE-ANOMALY"),
\r 
 554         SERVICE_ANOMALY("SERVICE-ANOMALY");
\r 
 555         private final String value;
\r 
 556         private final static Map<String, ThresholdCrossingAlertFields.AlertType> CONSTANTS = new HashMap<String, ThresholdCrossingAlertFields.AlertType>();
\r 
 559             for (ThresholdCrossingAlertFields.AlertType c: values()) {
\r 
 560                 CONSTANTS.put(c.value, c);
\r 
 564         private AlertType(String value) {
\r 
 565             this.value = value;
\r 
 569         public String toString() {
\r 
 574         public String value() {
\r 
 579         public static ThresholdCrossingAlertFields.AlertType fromValue(String value) {
\r 
 580             ThresholdCrossingAlertFields.AlertType constant = CONSTANTS.get(value);
\r 
 581             if (constant == null) {
\r 
 582                 throw new IllegalArgumentException(value);
\r 
 590     public enum EventSeverity {
\r 
 592         CRITICAL("CRITICAL"),
\r 
 595         WARNING("WARNING"),
\r 
 597         private final String value;
\r 
 598         private final static Map<String, ThresholdCrossingAlertFields.EventSeverity> CONSTANTS = new HashMap<String, ThresholdCrossingAlertFields.EventSeverity>();
\r 
 601             for (ThresholdCrossingAlertFields.EventSeverity c: values()) {
\r 
 602                 CONSTANTS.put(c.value, c);
\r 
 606         private EventSeverity(String value) {
\r 
 607             this.value = value;
\r 
 611         public String toString() {
\r 
 616         public String value() {
\r 
 621         public static ThresholdCrossingAlertFields.EventSeverity fromValue(String value) {
\r 
 622             ThresholdCrossingAlertFields.EventSeverity constant = CONSTANTS.get(value);
\r 
 623             if (constant == null) {
\r 
 624                 throw new IllegalArgumentException(value);
\r 
 632     public enum ThresholdCrossingFieldsVersion {
\r 
 635         private final String value;
\r 
 636         private final static Map<String, ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion> CONSTANTS = new HashMap<String, ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion>();
\r 
 639             for (ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion c: values()) {
\r 
 640                 CONSTANTS.put(c.value, c);
\r 
 644         private ThresholdCrossingFieldsVersion(String value) {
\r 
 645             this.value = value;
\r 
 649         public String toString() {
\r 
 654         public String value() {
\r 
 659         public static ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion fromValue(String value) {
\r 
 660             ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion constant = CONSTANTS.get(value);
\r 
 661             if (constant == null) {
\r 
 662                 throw new IllegalArgumentException(value);
\r