/* tslint:disable */ /* eslint-disable */ /** * My API * API documentation for my Laravel app * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface GlobalSearchProductResource */ export interface GlobalSearchProductResource { /** * * @type {number} * @memberof GlobalSearchProductResource */ id: number; /** * * @type {string} * @memberof GlobalSearchProductResource */ name: string; /** * * @type {string} * @memberof GlobalSearchProductResource */ model: string; /** * * @type {string} * @memberof GlobalSearchProductResource */ modelRaw: string; /** * * @type {string} * @memberof GlobalSearchProductResource */ slug: string; /** * * @type {string} * @memberof GlobalSearchProductResource */ sku: string; /** * * @type {string} * @memberof GlobalSearchProductResource */ thumbnail: string; /** * * @type {number} * @memberof GlobalSearchProductResource */ price: number; /** * * @type {number} * @memberof GlobalSearchProductResource */ salePrice: number; /** * * @type {number} * @memberof GlobalSearchProductResource */ averageRating: number; /** * * @type {string} * @memberof GlobalSearchProductResource */ supplierName: string; /** * * @type {Array} * @memberof GlobalSearchProductResource */ categories: Array; } /** * Check if a given object implements the GlobalSearchProductResource interface. */ export function instanceOfGlobalSearchProductResource(value: object): value is GlobalSearchProductResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('model' in value) || value['model'] === undefined) return false; if (!('modelRaw' in value) || value['modelRaw'] === undefined) return false; if (!('slug' in value) || value['slug'] === undefined) return false; if (!('sku' in value) || value['sku'] === undefined) return false; if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false; if (!('price' in value) || value['price'] === undefined) return false; if (!('salePrice' in value) || value['salePrice'] === undefined) return false; if (!('averageRating' in value) || value['averageRating'] === undefined) return false; if (!('supplierName' in value) || value['supplierName'] === undefined) return false; if (!('categories' in value) || value['categories'] === undefined) return false; return true; } export function GlobalSearchProductResourceFromJSON(json: any): GlobalSearchProductResource { return GlobalSearchProductResourceFromJSONTyped(json, false); } export function GlobalSearchProductResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalSearchProductResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'model': json['model'], 'modelRaw': json['modelRaw'], 'slug': json['slug'], 'sku': json['sku'], 'thumbnail': json['thumbnail'], 'price': json['price'], 'salePrice': json['salePrice'], 'averageRating': json['averageRating'], 'supplierName': json['supplierName'], 'categories': json['categories'], }; } export function GlobalSearchProductResourceToJSON(json: any): GlobalSearchProductResource { return GlobalSearchProductResourceToJSONTyped(json, false); } export function GlobalSearchProductResourceToJSONTyped(value?: GlobalSearchProductResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'model': value['model'], 'modelRaw': value['modelRaw'], 'slug': value['slug'], 'sku': value['sku'], 'thumbnail': value['thumbnail'], 'price': value['price'], 'salePrice': value['salePrice'], 'averageRating': value['averageRating'], 'supplierName': value['supplierName'], 'categories': value['categories'], }; }