"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/*
 * Nutanix Networking APIs
 *
 * OpenAPI spec version: 4.0.1
 *
 * NOTE: This class is auto generated by the Open API Dev Platform.
 *
 * Open API Dev Platform Codegen version: 16.9.0.8546-RELEASE
 *
 * Do not edit the class manually.
 *
 */

/**
 * Enum class AuthenticationAlgorithm.
 * @enum {string}
 * @readonly
 */
var AuthenticationAlgorithm = {
  /** 
   * Unknown value.
    * @const
   */
  $UNKNOWN: "$UNKNOWN",
  /** 
   * Redacted value.
    * @const
   */
  $REDACTED: "$REDACTED",
  /** 
   * Authentication algorithm is md5.
   * @const
   */
  MD5: "MD5",
  /** 
   * Authentication algorithm is sha1.
   * @const
   */
  SHA1: "SHA1",
  /** 
   * Authentication algorithm is sha256.
   * @const
   */
  SHA256: "SHA256",
  /** 
   * Authentication algorithm is sha384.
   * @const
   */
  SHA384: "SHA384",
  /** 
   * Authentication algorithm is sha512.
   * @const
   */
  SHA512: "SHA512"
};

/**
* Returns a <code>AuthenticationAlgorithm</code> enum value from a JavaScript object name.
* @param {Object} obj The plain JavaScript object containing the name of the enum value.
* @return {AuthenticationAlgorithm} The enum <code>AuthenticationAlgorithm</code> value.
*/
AuthenticationAlgorithm.constructFromObject = function (obj) {
  if (typeof obj === 'string' || obj instanceof String) {
    var enumVal = Object.keys(AuthenticationAlgorithm).find(function (key) {
      return AuthenticationAlgorithm[key] === obj;
    });
    return enumVal === undefined || enumVal === null ? AuthenticationAlgorithm.$UNKNOWN : AuthenticationAlgorithm[enumVal];
  } else {
    throw new Error("Received object name is not an instance of String");
  }
};

/**
* Validates <code>AuthenticationAlgorithm</code> enum value.
* @param {Object} obj The plain JavaScript object containing the name of the enum value.
* @return {null} Throws error for invalid value.
*/
AuthenticationAlgorithm.validate = function (obj) {
  switch (obj) {
    case AuthenticationAlgorithm.$UNKNOWN:
    case AuthenticationAlgorithm.$REDACTED:
    case AuthenticationAlgorithm.MD5:
    case AuthenticationAlgorithm.SHA1:
    case AuthenticationAlgorithm.SHA256:
    case AuthenticationAlgorithm.SHA384:
    case AuthenticationAlgorithm.SHA512:
      return;
    default:
      throw new Error("Invalid : must be AuthenticationAlgorithm.{ $UNKNOWN|$REDACTED|MD5|SHA1|SHA256|SHA384|SHA512 }");
  }
};
Object.freeze(AuthenticationAlgorithm);
var _default = exports["default"] = AuthenticationAlgorithm;