com.nutanix.dp1.pri.prism.v4.serviceability.ConnectionStatus 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;
public enum ConnectionStatus {
$UNKNOWN,
$REDACTED,
/**
* Indicates that the connection to the remote tunnel was successful.
*/
SUCCESS,
/**
* Indicates that the connection to the remote tunnel has failed.
*/
FAILED,
/**
* Indicates that the connection to the remote tunnel is being retried.
*/
RETRYING,
/**
* Indicates that the connection to the remote tunnel has been disabled.
*/
DISABLED ;
private static final Map lookup = new LinkedHashMap();
static {
lookup.put("$UNKNOWN", $UNKNOWN);
lookup.put("$REDACTED", $REDACTED);
lookup.put("SUCCESS", SUCCESS);
lookup.put("FAILED", FAILED);
lookup.put("RETRYING", RETRYING);
lookup.put("DISABLED", DISABLED);
}
@JsonCreator
public static ConnectionStatus fromString(String enumTypeVar) {
return lookup.getOrDefault(enumTypeVar, ConnectionStatus.$UNKNOWN);
}
@JsonValue
public String fromEnum() {
for (Map.Entry entry : lookup.entrySet()) {
if (entry.getValue() == this) {
return entry.getKey();
}
}
return "$UNKNOWN";
}
}