text: /**
   * Rainbow authentication portal
   * # Rainbow authentication portal API guide  ## Preamble  [Download Postman collection][0]  ### Introduction  This guide describes list of API services that are provided by OT Rainbow authentication portal system. Services are used to manage OT Rainbow authentication.  ### Protocol  REST interface is used for sending/receiving OT rainbow API messages.   HTTP request GET is used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them.   JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.  ### Security considerations  Each request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.    [0]: AuthenticationPortalServer_postman.json
   *
   * OpenAPI spec version: 1.104.0
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   *
   * OpenAPI Generator version: 4.0.0-beta2
   *
   * Do not edit the class manually.
   *
   */
  
  (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      // AMD. Register as an anonymous module.
      define(['ApiClient'], factory);
    } else if (typeof module === 'object' && module.exports) {
      // CommonJS-like environments that support module.exports, like Node.
      module.exports = factory(require('../ApiClient'));
    } else {
      // Browser globals (root is window)
      if (!root.RainbowAuthenticationPortal) {
        root.RainbowAuthenticationPortal = {};
      }
      root.RainbowAuthenticationPortal.OAuthToken = factory(root.RainbowAuthenticationPortal.ApiClient);
    }
  }(this, function(ApiClient) {
    'use strict';
  
  
  
    /**
     * The OAuthToken model module.
     * @module model/OAuthToken
     * @version 1.104.0
     */
  
    /**
     * Constructs a new <code>OAuthToken</code>.
     * @alias module:model/OAuthToken
     * @class
     * @param grantType {module:model/OAuthToken.GrantTypeEnum} Desired grant type to use for token endpoint. <br/> Must be set to: - <strong>authorization_code</strong> to exchange an authorization code against an access token   (details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-4.1.3\">OAuth 2.0 RFC, section 4.1.3</a>), - <strong>refresh_token</strong> to refresh an access token using the refresh token   (details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-6\">OAuth 2.0 RFC, section 6</a>).
     */
    var exports = function(grantType) {
      var _this = this;
  
      _this['grant_type'] = grantType;
    };
  
    /**
     * Constructs a <code>OAuthToken</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/OAuthToken} obj Optional instance to populate.
     * @return {module:model/OAuthToken} The populated <code>OAuthToken</code> instance.
     */
    exports.constructFromObject = function(data, obj) {
      if (data) {
        obj = obj || new exports();
        if (data.hasOwnProperty('code')) {
          obj['code'] = ApiClient.convertToType(data['code'], 'String');
        }
        if (data.hasOwnProperty('grant_type')) {
          obj['grant_type'] = ApiClient.convertToType(data['grant_type'], 'String');
        }
        if (data.hasOwnProperty('redirect_uri')) {
          obj['redirect_uri'] = ApiClient.convertToType(data['redirect_uri'], 'String');
        }
        if (data.hasOwnProperty('refresh_token')) {
          obj['refresh_token'] = ApiClient.convertToType(data['refresh_token'], 'String');
        }
      }
      return obj;
    }
  
    /**
     * The authorization code sent by Rainbow authentication server from the GET /api/rainbow/authentication/v1.0/oauth/authorize endpoint. <br/> <b>Mandatory</b> to exchange an authorization code against an access token. <br/> Note that once it has been used, the authorization code is revoked. <br/> <br/> For more information, details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-4.1.3\">OAuth 2.0 RFC, section 4.1.3</a>.
     * @member {String} code
     */
    exports.prototype['code'] = undefined;
    /**
     * Desired grant type to use for token endpoint. <br/> Must be set to: - <strong>authorization_code</strong> to exchange an authorization code against an access token   (details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-4.1.3\">OAuth 2.0 RFC, section 4.1.3</a>), - <strong>refresh_token</strong> to refresh an access token using the refresh token   (details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-6\">OAuth 2.0 RFC, section 6</a>).
     * @member {module:model/OAuthToken.GrantTypeEnum} grant_type
     */
    exports.prototype['grant_type'] = undefined;
    /**
     * The redirect_uri used to retrieve the authorization code sent by Rainbow authentication server from the GET /api/rainbow/authentication/v1.0/oauth/authorize endpoint. <br/> <b>Mandatory</b> to exchange an authorization code against an access token. <br/> <br/> For more information, details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-4.1.3\">OAuth 2.0 RFC, section 4.1.3</a>.
     * @member {String} redirect_uri
     */
    exports.prototype['redirect_uri'] = undefined;
    /**
     * The refresh token sent by Rainbow authentication server from the GET /api/rainbow/authentication/v1.0/oauth/authorize endpoint of from a previous refresh token performed using this POST /api/rainbow/authentication/v1.0/oauth/token endpoint. <br/> <b>Mandatory</b> to refresh an access token. <br/> The provided refresh_token must not be expired. If the refresh token is expired, the application has to redo the whole OAuth authorization code flow. <br/> Note that once it has been used to refresh an access token, the refresh_token is revoked. The new refresh token returned in the response with the access token replaces the previous one. <br/> <br/> For more information, details are available in the <a href=\"https://tools.ietf.org/html/rfc6749#section-6\">OAuth 2.0 RFC, section 6</a>.
     * @member {String} refresh_token
     */
    exports.prototype['refresh_token'] = undefined;
  
  
    /**
     * Allowed values for the <code>grant_type</code> property.
     * @enum {String}
     * @readonly
     */
    exports.GrantTypeEnum = {
      /**
       * value: "{authorization_code"
       * @const
       */
      "{authorization_code": "{authorization_code",
      /**
       * value: "refresh_token}"
       * @const
       */
      "refresh_token}": "refresh_token}"  };
  
  
    return exports;
  }));
  
  
  