/* 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 { ProductChildLiteFrontendResource } from './ProductChildLiteFrontendResource'; import { ProductChildLiteFrontendResourceFromJSON, ProductChildLiteFrontendResourceFromJSONTyped, ProductChildLiteFrontendResourceToJSON, ProductChildLiteFrontendResourceToJSONTyped, } from './ProductChildLiteFrontendResource'; /** * * @export * @interface ProductParentFrontendResource */ export interface ProductParentFrontendResource { /** * * @type {number} * @memberof ProductParentFrontendResource */ id: number; /** * * @type {string} * @memberof ProductParentFrontendResource */ name: string; /** * * @type {string} * @memberof ProductParentFrontendResource */ description: string; /** * * @type {Array} * @memberof ProductParentFrontendResource */ childProducts: Array | null; } /** * Check if a given object implements the ProductParentFrontendResource interface. */ export function instanceOfProductParentFrontendResource(value: object): value is ProductParentFrontendResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('description' in value) || value['description'] === undefined) return false; if (!('childProducts' in value) || value['childProducts'] === undefined) return false; return true; } export function ProductParentFrontendResourceFromJSON(json: any): ProductParentFrontendResource { return ProductParentFrontendResourceFromJSONTyped(json, false); } export function ProductParentFrontendResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductParentFrontendResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'description': json['description'], 'childProducts': (json['childProducts'] == null ? null : (json['childProducts'] as Array).map(ProductChildLiteFrontendResourceFromJSON)), }; } export function ProductParentFrontendResourceToJSON(json: any): ProductParentFrontendResource { return ProductParentFrontendResourceToJSONTyped(json, false); } export function ProductParentFrontendResourceToJSONTyped(value?: ProductParentFrontendResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'description': value['description'], 'childProducts': (value['childProducts'] == null ? null : (value['childProducts'] as Array).map(ProductChildLiteFrontendResourceToJSON)), }; }