<reponame>AzatAI/journalim<filename>clients/javascript/src/model/BodyCreateTokenTokenPost.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 BodyCreateTokenTokenPost model module.
 * @module model/BodyCreateTokenTokenPost
 * @version 0.0.1
 */
export class BodyCreateTokenTokenPost {
  /**
   * Constructs a new <code>BodyCreateTokenTokenPost</code>.
   * @alias module:model/BodyCreateTokenTokenPost
   * @class
   * @param username {String} 
   * @param password {String} 
   */
  constructor(username, password) {
    this.username = username;
    this.password = password;
  }

  /**
   * Constructs a <code>BodyCreateTokenTokenPost</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/BodyCreateTokenTokenPost} obj Optional instance to populate.
   * @return {module:model/BodyCreateTokenTokenPost} The populated <code>BodyCreateTokenTokenPost</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new BodyCreateTokenTokenPost();
      if (data.hasOwnProperty('grant_type'))
        obj.grantType = ApiClient.convertToType(data['grant_type'], 'String');
      if (data.hasOwnProperty('username'))
        obj.username = ApiClient.convertToType(data['username'], 'String');
      if (data.hasOwnProperty('password'))
        obj.password = ApiClient.convertToType(data['password'], 'String');
      if (data.hasOwnProperty('scope'))
        obj.scope = ApiClient.convertToType(data['scope'], 'String');
      if (data.hasOwnProperty('client_id'))
        obj.clientId = ApiClient.convertToType(data['client_id'], 'String');
      if (data.hasOwnProperty('client_secret'))
        obj.clientSecret = ApiClient.convertToType(data['client_secret'], 'String');
    }
    return obj;
  }
}

/**
 * @member {String} grantType
 */
BodyCreateTokenTokenPost.prototype.grantType = undefined;

/**
 * @member {String} username
 */
BodyCreateTokenTokenPost.prototype.username = undefined;

/**
 * @member {String} password
 */
BodyCreateTokenTokenPost.prototype.password = undefined;

/**
 * @member {String} scope
 * @default ''
 */
BodyCreateTokenTokenPost.prototype.scope = '';

/**
 * @member {String} clientId
 */
BodyCreateTokenTokenPost.prototype.clientId = undefined;

/**
 * @member {String} clientSecret
 */
BodyCreateTokenTokenPost.prototype.clientSecret = undefined;

