"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 EncryptionAlgorithm.
 * @enum {string}
 * @readonly
 */
var EncryptionAlgorithm = {
  /** 
   * Unknown value.
    * @const
   */
  $UNKNOWN: "$UNKNOWN",
  /** 
   * Redacted value.
    * @const
   */
  $REDACTED: "$REDACTED",
  /** 
   * Encryption algorithm is aes-128.
   * @const
   */
  AES128: "AES128",
  /** 
   * Encryption algorithm is aes-256.
   * @const
   */
  AES256: "AES256",
  /** 
   * Encryption algorithm is triple-des.
   * @const
   */
  TRIPLE_DES: "TRIPLE_DES",
  /** 
   * Encryption algorithm is 256 bit AES-GCM with 128 bit ICV.
   * @const
   */
  AES256GCM128: "AES256GCM128"
};

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

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