/* 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'; import type { ProductSearchResultResource } from './ProductSearchResultResource'; import { ProductSearchResultResourceFromJSON, ProductSearchResultResourceFromJSONTyped, ProductSearchResultResourceToJSON, ProductSearchResultResourceToJSONTyped, } from './ProductSearchResultResource'; import type { ProductSearchResponseResourceMeta } from './ProductSearchResponseResourceMeta'; import { ProductSearchResponseResourceMetaFromJSON, ProductSearchResponseResourceMetaFromJSONTyped, ProductSearchResponseResourceMetaToJSON, ProductSearchResponseResourceMetaToJSONTyped, } from './ProductSearchResponseResourceMeta'; import type { ProductAggregationResource } from './ProductAggregationResource'; import { ProductAggregationResourceFromJSON, ProductAggregationResourceFromJSONTyped, ProductAggregationResourceToJSON, ProductAggregationResourceToJSONTyped, } from './ProductAggregationResource'; import type { ProductSearchResponseResourcePriceInfo } from './ProductSearchResponseResourcePriceInfo'; import { ProductSearchResponseResourcePriceInfoFromJSON, ProductSearchResponseResourcePriceInfoFromJSONTyped, ProductSearchResponseResourcePriceInfoToJSON, ProductSearchResponseResourcePriceInfoToJSONTyped, } from './ProductSearchResponseResourcePriceInfo'; /** * * @export * @interface ProductSearchResponseResource */ export interface ProductSearchResponseResource { /** * * @type {Array} * @memberof ProductSearchResponseResource */ data: Array; /** * * @type {ProductSearchResponseResourceMeta} * @memberof ProductSearchResponseResource */ meta: ProductSearchResponseResourceMeta; /** * * @type {ProductAggregationResource} * @memberof ProductSearchResponseResource */ aggregations: ProductAggregationResource; /** * * @type {ProductSearchResponseResourcePriceInfo} * @memberof ProductSearchResponseResource */ priceInfo: ProductSearchResponseResourcePriceInfo; } /** * Check if a given object implements the ProductSearchResponseResource interface. */ export function instanceOfProductSearchResponseResource(value: object): value is ProductSearchResponseResource { if (!('data' in value) || value['data'] === undefined) return false; if (!('meta' in value) || value['meta'] === undefined) return false; if (!('aggregations' in value) || value['aggregations'] === undefined) return false; if (!('priceInfo' in value) || value['priceInfo'] === undefined) return false; return true; } export function ProductSearchResponseResourceFromJSON(json: any): ProductSearchResponseResource { return ProductSearchResponseResourceFromJSONTyped(json, false); } export function ProductSearchResponseResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductSearchResponseResource { if (json == null) { return json; } return { 'data': ((json['data'] as Array).map(ProductSearchResultResourceFromJSON)), 'meta': ProductSearchResponseResourceMetaFromJSON(json['meta']), 'aggregations': ProductAggregationResourceFromJSON(json['aggregations']), 'priceInfo': ProductSearchResponseResourcePriceInfoFromJSON(json['priceInfo']), }; } export function ProductSearchResponseResourceToJSON(json: any): ProductSearchResponseResource { return ProductSearchResponseResourceToJSONTyped(json, false); } export function ProductSearchResponseResourceToJSONTyped(value?: ProductSearchResponseResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'data': ((value['data'] as Array).map(ProductSearchResultResourceToJSON)), 'meta': ProductSearchResponseResourceMetaToJSON(value['meta']), 'aggregations': ProductAggregationResourceToJSON(value['aggregations']), 'priceInfo': ProductSearchResponseResourcePriceInfoToJSON(value['priceInfo']), }; }