/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Copyright (c) 2017 Mobify Research & Development Inc. All rights reserved. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* OCC No description provided (generated by Swagger Codegen
* https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v2
*
*
* 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'
import Pagination from './Pagination'
import PointOfService from './PointOfService'
import Sort from './Sort'
/**
* The StoreFinderSearchPage model module.
* @module models/StoreFinderSearchPage
* @version v2
*/
export default class StoreFinderSearchPage {
/**
* Constructs a new <code>StoreFinderSearchPage</code>.
* @alias module:models/StoreFinderSearchPage
* @class
*/
constructor() {
/**
*
* @member {Array.<module:models/PointOfService>} stores
*/
this.stores = undefined
/**
*
* @member {Array.<module:models/Sort>} sorts
*/
this.sorts = undefined
/**
* @member {module:models/Pagination} pagination
*/
this.pagination = undefined
/**
*
* @member {String} locationText
*/
this.locationText = undefined
/**
*
* @member {Number} sourceLatitude
*/
this.sourceLatitude = undefined
/**
*
* @member {Number} sourceLongitude
*/
this.sourceLongitude = undefined
/**
*
* @member {Number} boundNorthLatitude
*/
this.boundNorthLatitude = undefined
/**
*
* @member {Number} boundEastLongitude
*/
this.boundEastLongitude = undefined
/**
*
* @member {Number} boundSouthLatitude
*/
this.boundSouthLatitude = undefined
/**
*
* @member {Number} boundWestLongitude
*/
this.boundWestLongitude = undefined
}
/**
* Constructs a <code>StoreFinderSearchPage</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/StoreFinderSearchPage} obj Optional instance to
* populate.
* @return {module:models/StoreFinderSearchPage} The populated
* <code>StoreFinderSearchPage</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new StoreFinderSearchPage()
if (data.hasOwnProperty('stores')) {
obj.stores = ApiClient.convertToType(data.stores, [PointOfService])
}
if (data.hasOwnProperty('sorts')) {
obj.sorts = ApiClient.convertToType(data.sorts, [Sort])
}
if (data.hasOwnProperty('pagination')) {
obj.pagination = Pagination.constructFromObject(data.pagination)
}
if (data.hasOwnProperty('locationText')) {
obj.locationText = ApiClient.convertToType(data.locationText, 'String')
}
if (data.hasOwnProperty('sourceLatitude')) {
obj.sourceLatitude = ApiClient.convertToType(data.sourceLatitude, 'Number')
}
if (data.hasOwnProperty('sourceLongitude')) {
obj.sourceLongitude = ApiClient.convertToType(data.sourceLongitude, 'Number')
}
if (data.hasOwnProperty('boundNorthLatitude')) {
obj.boundNorthLatitude = ApiClient.convertToType(data.boundNorthLatitude, 'Number')
}
if (data.hasOwnProperty('boundEastLongitude')) {
obj.boundEastLongitude = ApiClient.convertToType(data.boundEastLongitude, 'Number')
}
if (data.hasOwnProperty('boundSouthLatitude')) {
obj.boundSouthLatitude = ApiClient.convertToType(data.boundSouthLatitude, 'Number')
}
if (data.hasOwnProperty('boundWestLongitude')) {
obj.boundWestLongitude = ApiClient.convertToType(data.boundWestLongitude, 'Number')
}
}
return obj
}
}