Source: models/Locale.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * Shop API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 20.4
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 */


import ApiClient from '../ApiClient'





/**
* The Locale model module.
* @module models/Locale
* @version 20.4
*/
export default class Locale {
    /**
    * Constructs a new <code>Locale</code>.
    * Document that describes a single locale.
    * @alias module:models/Locale
    * @class
    */

    constructor() {








    }

    /**
    * Constructs a <code>Locale</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:models/Locale} obj Optional instance to populate.
    * @return {module:models/Locale} The populated <code>Locale</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new Locale()





            if (data.hasOwnProperty('country')) {
                obj.country = ApiClient.convertToType(data.country, 'String')
            }
            if (data.hasOwnProperty('default')) {
                obj.default = ApiClient.convertToType(data.default, 'Boolean')
            }
            if (data.hasOwnProperty('display_country')) {
                obj.display_country = ApiClient.convertToType(data.display_country, 'String')
            }
            if (data.hasOwnProperty('display_language')) {
                obj.display_language = ApiClient.convertToType(data.display_language, 'String')
            }
            if (data.hasOwnProperty('display_name')) {
                obj.display_name = ApiClient.convertToType(data.display_name, 'String')
            }
            if (data.hasOwnProperty('id')) {
                obj.id = ApiClient.convertToType(data.id, 'String')
            }
            if (data.hasOwnProperty('iso3_country')) {
                obj.iso3_country = ApiClient.convertToType(data.iso3_country, 'String')
            }
            if (data.hasOwnProperty('iso3_language')) {
                obj.iso3_language = ApiClient.convertToType(data.iso3_language, 'String')
            }
            if (data.hasOwnProperty('language')) {
                obj.language = ApiClient.convertToType(data.language, 'String')
            }
            if (data.hasOwnProperty('name')) {
                obj.name = ApiClient.convertToType(data.name, 'String')
            }
        }
        return obj
    }

    /**
    * The country/region code for this Locale, which will  either be the empty string or an upercase ISO 3166 2-letter code.
    * @member {String} country
    */
    country = undefined;
    /**
    * Flag that is true if the locale is the default one to use if an explicit locale is not specified.
    * @member {Boolean} default
    */
    default = undefined;
    /**
    * The name for the Locale's country that is appropriate for  display to the user, or an empty string if no country has been specified  for the Locale.  The display country is returned in the language defined for this locale,  and not in the language of the session locale.
    * @member {String} display_country
    */
    display_country = undefined;
    /**
    * The name for the Locale's language that is appropriate for  display to the user, or an empty string if no language has been specified  for the Locale.  The display language is returned in the language defined for this locale,  and not in the language of the session locale.
    * @member {String} display_language
    */
    display_language = undefined;
    /**
    * The name for the Locale that is appropriate for  display to the user, or an empty string if no display name has been  specified for the Locale.  The display name is returned in the language defined for this locale,  and not in the language of the session locale.
    * @member {String} display_name
    */
    display_name = undefined;
    /**
    * The identifier of the Locale. Contains a combination of the  language and the country key, concatenated by \"-\", e.g. \"en-US\". This  attribute is the primary key of the class.
    * @member {String} id
    */
    id = undefined;
    /**
    * The three-letter abbreviation for this Locale's country, or an  empty string if no country has been specified for the Locale.
    * @member {String} iso3_country
    */
    iso3_country = undefined;
    /**
    * The three-letter abbreviation for this Locale's language, or an  empty string if no language has been specified for the  Locale.
    * @member {String} iso3_language
    */
    iso3_language = undefined;
    /**
    * The language code for this Locale, which will either  be the empty string or a lowercase ISO 639 code.
    * @member {String} language
    */
    language = undefined;
    /**
    * The display name of the Locale. This uses the current  request locale to localize the value.
    * @member {String} name
    */
    name = undefined;








}