"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 ExporterProtocol.
 * @enum {string}
 * @readonly
 */
var ExporterProtocol = {
  /** 
   * Unknown value.
    * @const
   */
  $UNKNOWN: "$UNKNOWN",
  /** 
   * Redacted value.
    * @const
   */
  $REDACTED: "$REDACTED",
  /** 
   * Transmission Control Protocol.
   * @const
   */
  TCP: "TCP",
  /** 
   * User Datagram Protocol.
   * @const
   */
  UDP: "UDP",
  /** 
   * TLS over TCP is used to export IPFIX messages. Only supported for internal collectors.
   * @const
   */
  TLS_TCP: "TLS_TCP"
};

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

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