/* 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 { AttributeProductTypeRelationResource } from './AttributeProductTypeRelationResource'; import { AttributeProductTypeRelationResourceFromJSON, AttributeProductTypeRelationResourceFromJSONTyped, AttributeProductTypeRelationResourceToJSON, AttributeProductTypeRelationResourceToJSONTyped, } from './AttributeProductTypeRelationResource'; /** * * @export * @interface ProductTypeResource */ export interface ProductTypeResource { /** * * @type {number} * @memberof ProductTypeResource */ id: number; /** * * @type {string} * @memberof ProductTypeResource */ name: string; /** * * @type {number} * @memberof ProductTypeResource */ totalAttributes: number; /** * * @type {Array} * @memberof ProductTypeResource */ performanceAttributes: Array | null; /** * * @type {Array} * @memberof ProductTypeResource */ dimensionAttributes: Array | null; /** * * @type {Array} * @memberof ProductTypeResource */ specificationAttributes: Array | null; /** * * @type {Array} * @memberof ProductTypeResource */ otherAttributes: Array | null; /** * * @type {object} * @memberof ProductTypeResource */ productChildren: object; } /** * Check if a given object implements the ProductTypeResource interface. */ export function instanceOfProductTypeResource(value: object): value is ProductTypeResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('totalAttributes' in value) || value['totalAttributes'] === undefined) return false; if (!('performanceAttributes' in value) || value['performanceAttributes'] === undefined) return false; if (!('dimensionAttributes' in value) || value['dimensionAttributes'] === undefined) return false; if (!('specificationAttributes' in value) || value['specificationAttributes'] === undefined) return false; if (!('otherAttributes' in value) || value['otherAttributes'] === undefined) return false; if (!('productChildren' in value) || value['productChildren'] === undefined) return false; return true; } export function ProductTypeResourceFromJSON(json: any): ProductTypeResource { return ProductTypeResourceFromJSONTyped(json, false); } export function ProductTypeResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductTypeResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'totalAttributes': json['totalAttributes'], 'performanceAttributes': (json['performanceAttributes'] == null ? null : (json['performanceAttributes'] as Array).map(AttributeProductTypeRelationResourceFromJSON)), 'dimensionAttributes': (json['dimensionAttributes'] == null ? null : (json['dimensionAttributes'] as Array).map(AttributeProductTypeRelationResourceFromJSON)), 'specificationAttributes': (json['specificationAttributes'] == null ? null : (json['specificationAttributes'] as Array).map(AttributeProductTypeRelationResourceFromJSON)), 'otherAttributes': (json['otherAttributes'] == null ? null : (json['otherAttributes'] as Array).map(AttributeProductTypeRelationResourceFromJSON)), 'productChildren': json['productChildren'], }; } export function ProductTypeResourceToJSON(json: any): ProductTypeResource { return ProductTypeResourceToJSONTyped(json, false); } export function ProductTypeResourceToJSONTyped(value?: ProductTypeResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'totalAttributes': value['totalAttributes'], 'performanceAttributes': (value['performanceAttributes'] == null ? null : (value['performanceAttributes'] as Array).map(AttributeProductTypeRelationResourceToJSON)), 'dimensionAttributes': (value['dimensionAttributes'] == null ? null : (value['dimensionAttributes'] as Array).map(AttributeProductTypeRelationResourceToJSON)), 'specificationAttributes': (value['specificationAttributes'] == null ? null : (value['specificationAttributes'] as Array).map(AttributeProductTypeRelationResourceToJSON)), 'otherAttributes': (value['otherAttributes'] == null ? null : (value['otherAttributes'] as Array).map(AttributeProductTypeRelationResourceToJSON)), 'productChildren': value['productChildren'], }; }