<reponame>AzatAI/journalim<filename>clients/javascript/src/model/LanguageCreate.js<gh_stars>0/*
 * JBS Backend Service
 * Journalim Protocol Compatible Backend Service
 *
 * OpenAPI spec version: 0.0.1
 * Contact: efpyi@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 LanguageCreate model module.
 * @module model/LanguageCreate
 * @version 0.0.1
 */
export class LanguageCreate {
  /**
   * Constructs a new <code>LanguageCreate</code>.
   * @alias module:model/LanguageCreate
   * @class
   * @param code {String} 
   * @param nameLocal {String} 
   */
  constructor(code, nameLocal) {
    this.code = code;
    this.nameLocal = nameLocal;
  }

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

/**
 * @member {String} code
 */
LanguageCreate.prototype.code = undefined;

/**
 * @member {String} nameLocal
 */
LanguageCreate.prototype.nameLocal = undefined;

/**
 * @member {String} nameGlobal
 */
LanguageCreate.prototype.nameGlobal = undefined;

