/* 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 { AssetResource } from './AssetResource'; import { AssetResourceFromJSON, AssetResourceFromJSONTyped, AssetResourceToJSON, AssetResourceToJSONTyped, } from './AssetResource'; /** * * @export * @interface ProductChildRelationResource */ export interface ProductChildRelationResource { /** * * @type {number} * @memberof ProductChildRelationResource */ id: number; /** * * @type {string} * @memberof ProductChildRelationResource */ name: string; /** * * @type {string} * @memberof ProductChildRelationResource */ model: string; /** * * @type {number} * @memberof ProductChildRelationResource */ sku: number; /** * * @type {string} * @memberof ProductChildRelationResource */ netsuiteId?: string | null; /** * * @type {AssetResource} * @memberof ProductChildRelationResource */ thumbnail: AssetResource | null; /** * * @type {object} * @memberof ProductChildRelationResource */ dateAdded: object; } /** * Check if a given object implements the ProductChildRelationResource interface. */ export function instanceOfProductChildRelationResource(value: object): value is ProductChildRelationResource { 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 (!('sku' in value) || value['sku'] === undefined) return false; if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false; if (!('dateAdded' in value) || value['dateAdded'] === undefined) return false; return true; } export function ProductChildRelationResourceFromJSON(json: any): ProductChildRelationResource { return ProductChildRelationResourceFromJSONTyped(json, false); } export function ProductChildRelationResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductChildRelationResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'model': json['model'], 'sku': json['sku'], 'netsuiteId': json['netsuiteId'] == null ? undefined : json['netsuiteId'], 'thumbnail': AssetResourceFromJSON(json['thumbnail']), 'dateAdded': json['dateAdded'], }; } export function ProductChildRelationResourceToJSON(json: any): ProductChildRelationResource { return ProductChildRelationResourceToJSONTyped(json, false); } export function ProductChildRelationResourceToJSONTyped(value?: ProductChildRelationResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'model': value['model'], 'sku': value['sku'], 'netsuiteId': value['netsuiteId'], 'thumbnail': AssetResourceToJSON(value['thumbnail']), 'dateAdded': value['dateAdded'], }; }