/**
* GameBrain API
* GameBrain API
*
* The version of the OpenAPI document: 1.0.1
* Contact: mail@gamebrain.co
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The GameResponseOfficialStoresInner model module.
* @module model/GameResponseOfficialStoresInner
* @version 1.0.2
*/
class GameResponseOfficialStoresInner {
/**
* Constructs a new <code>GameResponseOfficialStoresInner</code>.
* @alias module:model/GameResponseOfficialStoresInner
*/
constructor() {
GameResponseOfficialStoresInner.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>GameResponseOfficialStoresInner</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/GameResponseOfficialStoresInner} obj Optional instance to populate.
* @return {module:model/GameResponseOfficialStoresInner} The populated <code>GameResponseOfficialStoresInner</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new GameResponseOfficialStoresInner();
if (data.hasOwnProperty('source')) {
obj['source'] = ApiClient.convertToType(data['source'], 'String');
}
if (data.hasOwnProperty('url')) {
obj['url'] = ApiClient.convertToType(data['url'], 'String');
}
}
return obj;
}
/**
* Validates the JSON data with respect to <code>GameResponseOfficialStoresInner</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GameResponseOfficialStoresInner</code>.
*/
static validateJSON(data) {
// ensure the json data is a string
if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
}
// ensure the json data is a string
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
}
return true;
}
}
/**
* @member {String} source
*/
GameResponseOfficialStoresInner.prototype['source'] = undefined;
/**
* @member {String} url
*/
GameResponseOfficialStoresInner.prototype['url'] = undefined;
export default GameResponseOfficialStoresInner;