/* 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 { AssetLiteResource } from './AssetLiteResource'; import { AssetLiteResourceFromJSON, AssetLiteResourceFromJSONTyped, AssetLiteResourceToJSON, AssetLiteResourceToJSONTyped, } from './AssetLiteResource'; import type { ProductChildSiteDetailLiteResource } from './ProductChildSiteDetailLiteResource'; import { ProductChildSiteDetailLiteResourceFromJSON, ProductChildSiteDetailLiteResourceFromJSONTyped, ProductChildSiteDetailLiteResourceToJSON, ProductChildSiteDetailLiteResourceToJSONTyped, } from './ProductChildSiteDetailLiteResource'; /** * * @export * @interface ProductChildListResource */ export interface ProductChildListResource { /** * * @type {number} * @memberof ProductChildListResource */ id: number; /** * * @type {string} * @memberof ProductChildListResource */ parentId?: string | null; /** * * @type {number} * @memberof ProductChildListResource */ sku: number; /** * * @type {string} * @memberof ProductChildListResource */ name: string; /** * * @type {string} * @memberof ProductChildListResource */ fullName: string; /** * * @type {string} * @memberof ProductChildListResource */ model: string; /** * * @type {number} * @memberof ProductChildListResource */ stock: number; /** * * @type {string} * @memberof ProductChildListResource */ isDisabled?: string | null; /** * * @type {boolean} * @memberof ProductChildListResource */ displayInSocialFeed: boolean; /** * * @type {string} * @memberof ProductChildListResource */ quantity?: string | null; /** * * @type {number} * @memberof ProductChildListResource */ netsuiteId: number; /** * * @type {AssetLiteResource} * @memberof ProductChildListResource */ thumbnail: AssetLiteResource | null; /** * * @type {Array} * @memberof ProductChildListResource */ siteDetails: Array | null; } /** * Check if a given object implements the ProductChildListResource interface. */ export function instanceOfProductChildListResource(value: object): value is ProductChildListResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('sku' in value) || value['sku'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('fullName' in value) || value['fullName'] === undefined) return false; if (!('model' in value) || value['model'] === undefined) return false; if (!('stock' in value) || value['stock'] === undefined) return false; if (!('displayInSocialFeed' in value) || value['displayInSocialFeed'] === undefined) return false; if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false; if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false; if (!('siteDetails' in value) || value['siteDetails'] === undefined) return false; return true; } export function ProductChildListResourceFromJSON(json: any): ProductChildListResource { return ProductChildListResourceFromJSONTyped(json, false); } export function ProductChildListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductChildListResource { if (json == null) { return json; } return { 'id': json['id'], 'parentId': json['parentId'] == null ? undefined : json['parentId'], 'sku': json['sku'], 'name': json['name'], 'fullName': json['fullName'], 'model': json['model'], 'stock': json['stock'], 'isDisabled': json['isDisabled'] == null ? undefined : json['isDisabled'], 'displayInSocialFeed': json['displayInSocialFeed'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'netsuiteId': json['netsuiteId'], 'thumbnail': AssetLiteResourceFromJSON(json['thumbnail']), 'siteDetails': (json['siteDetails'] == null ? null : (json['siteDetails'] as Array).map(ProductChildSiteDetailLiteResourceFromJSON)), }; } export function ProductChildListResourceToJSON(json: any): ProductChildListResource { return ProductChildListResourceToJSONTyped(json, false); } export function ProductChildListResourceToJSONTyped(value?: ProductChildListResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'parentId': value['parentId'], 'sku': value['sku'], 'name': value['name'], 'fullName': value['fullName'], 'model': value['model'], 'stock': value['stock'], 'isDisabled': value['isDisabled'], 'displayInSocialFeed': value['displayInSocialFeed'], 'quantity': value['quantity'], 'netsuiteId': value['netsuiteId'], 'thumbnail': AssetLiteResourceToJSON(value['thumbnail']), 'siteDetails': (value['siteDetails'] == null ? null : (value['siteDetails'] as Array).map(ProductChildSiteDetailLiteResourceToJSON)), }; }