<reponame>AzatAI/journalim<filename>clients/javascript/src/model/Token.js<gh_stars>0/*
 * JBS Backend Service
 * Journalim Protocol Compatible Backend Service
 *
 * OpenAPI spec version: 0.0.1
 * Contact: hzdkv@example.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 *
 * Swagger Codegen version: 3.0.36
 *
 * Do not edit the class manually.
 *
 */
import {ApiClient} from '../ApiClient';

/**
 * The Token model module.
 * @module model/Token
 * @version 0.0.1
 */
export class Token {
  /**
   * Constructs a new <code>Token</code>.
   * @alias module:model/Token
   * @class
   * @param accessToken {String} 
   * @param tokenType {String} 
   */
  constructor(accessToken, tokenType) {
    this.accessToken = accessToken;
    this.tokenType = tokenType;
  }

  /**
   * Constructs a <code>Token</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/Token} obj Optional instance to populate.
   * @return {module:model/Token} The populated <code>Token</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new Token();
      if (data.hasOwnProperty('access_token'))
        obj.accessToken = ApiClient.convertToType(data['access_token'], 'String');
      if (data.hasOwnProperty('token_type'))
        obj.tokenType = ApiClient.convertToType(data['token_type'], 'String');
    }
    return obj;
  }
}

/**
 * @member {String} accessToken
 */
Token.prototype.accessToken = undefined;

/**
 * @member {String} tokenType
 */
Token.prototype.tokenType = undefined;

