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

com.nutanix.dp1.pri.prism.v4.serviceability.Status 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.serviceability;


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 status of the operation captured by the audit.
 */

public enum Status {

  
  $UNKNOWN,
    
  $REDACTED,
    /**
    * The operation indicated by the audit was successful.
    */
  SUCCEEDED,
    /**
    * The operation indicated by the audit failed.
    */
  FAILED,
    /**
    * The operation indicated by the audit was aborted.
    */
  ABORTED  ;

  private static final Map lookup = new LinkedHashMap();

  static {
    lookup.put("$UNKNOWN", $UNKNOWN);
    lookup.put("$REDACTED", $REDACTED);
    lookup.put("SUCCEEDED", SUCCEEDED);
    lookup.put("FAILED", FAILED);
    lookup.put("ABORTED", ABORTED);
  }

  @JsonCreator
  public static Status fromString(String enumTypeVar) {
    return lookup.getOrDefault(enumTypeVar, Status.$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