All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nutanix.dp1.pri.prism.v4.common.ComparisonOperator Maven / Gradle / Ivy

/*
 * Generated file ..
 *
 * Product version: 4.0.3-alpha-2
 *
 * Part of the Nutanix Prism Versioned APIs
 *
 * (c) 2023 Nutanix Inc.  All rights reserved
 *
 */

package com.nutanix.dp1.pri.prism.v4.common;


import javax.validation.constraints.*;


import static com.nutanix.dp1.pri.deserializers.PriDeserializerUtils.*;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * The comparison operator used for the condition evaluation.
 */

public enum ComparisonOperator {

  
  $UNKNOWN,
    
  $REDACTED,
    /**
    * Indicates an = operator used in conjunction with a metric in a condition. Depending on the trigger condition set, an alert may be generated when the metric value equals the static threshold set.
    */
  EQUAL_TO,
    /**
    * Indicates a > operator used in conjunction with a metric in a condition. Depending on the trigger condition set, an alert may be generated when the metric value equals the static threshold set.
    */
  GREATER_THAN,
    /**
    * Indicates a >= operator used in conjunction with a metric in a condition. Depending on the trigger condition set, an alert may be generated when the metric value is greater than or equal to the static threshold set.
    */
  GREATER_THAN_OR_EQUAL_TO,
    /**
    * Indicates a < operator used in conjunction with a metric in a condition. Depending on the trigger condition set, an alert may be generated when the metric value is less than the static threshold set.
    */
  LESS_THAN,
    /**
    * Indicates a <= operator used in conjunction with a metric in a condition. Depending on the trigger condition set, an alert may be generated when the metric value is less than or equal to the static threshold set.
    */
  LESS_THAN_OR_EQUAL_TO  ;

  private static final Map lookup = new LinkedHashMap();

  static {
    lookup.put("$UNKNOWN", $UNKNOWN);
    lookup.put("$REDACTED", $REDACTED);
    lookup.put("EQUAL_TO", EQUAL_TO);
    lookup.put("GREATER_THAN", GREATER_THAN);
    lookup.put("GREATER_THAN_OR_EQUAL_TO", GREATER_THAN_OR_EQUAL_TO);
    lookup.put("LESS_THAN", LESS_THAN);
    lookup.put("LESS_THAN_OR_EQUAL_TO", LESS_THAN_OR_EQUAL_TO);
  }

  @JsonCreator
  public static ComparisonOperator fromString(String enumTypeVar) {
    return lookup.getOrDefault(enumTypeVar, ComparisonOperator.$UNKNOWN);
  }

  @JsonValue
  public String fromEnum() {
    for (Map.Entry entry : lookup.entrySet()) {
      if (entry.getValue() == this) {
        return entry.getKey();
      }
    }
    return "$UNKNOWN";
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy