/* 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 { AttributeValueResource } from './AttributeValueResource'; import { AttributeValueResourceFromJSON, AttributeValueResourceFromJSONTyped, AttributeValueResourceToJSON, AttributeValueResourceToJSONTyped, } from './AttributeValueResource'; /** * * @export * @interface AttributeProductTypeRelationResource */ export interface AttributeProductTypeRelationResource { /** * * @type {number} * @memberof AttributeProductTypeRelationResource */ id: number; /** * * @type {string} * @memberof AttributeProductTypeRelationResource */ name: string; /** * * @type {string} * @memberof AttributeProductTypeRelationResource */ type: string; /** * * @type {boolean} * @memberof AttributeProductTypeRelationResource */ isFilterable: boolean; /** * * @type {boolean} * @memberof AttributeProductTypeRelationResource */ isExpandedByDefault: boolean; /** * * @type {number} * @memberof AttributeProductTypeRelationResource */ filterIndex: number; /** * * @type {object} * @memberof AttributeProductTypeRelationResource */ fieldType: object; /** * * @type {number} * @memberof AttributeProductTypeRelationResource */ order: number; /** * * @type {Array} * @memberof AttributeProductTypeRelationResource */ values: Array | null; } /** * Check if a given object implements the AttributeProductTypeRelationResource interface. */ export function instanceOfAttributeProductTypeRelationResource(value: object): value is AttributeProductTypeRelationResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('isFilterable' in value) || value['isFilterable'] === undefined) return false; if (!('isExpandedByDefault' in value) || value['isExpandedByDefault'] === undefined) return false; if (!('filterIndex' in value) || value['filterIndex'] === undefined) return false; if (!('fieldType' in value) || value['fieldType'] === undefined) return false; if (!('order' in value) || value['order'] === undefined) return false; if (!('values' in value) || value['values'] === undefined) return false; return true; } export function AttributeProductTypeRelationResourceFromJSON(json: any): AttributeProductTypeRelationResource { return AttributeProductTypeRelationResourceFromJSONTyped(json, false); } export function AttributeProductTypeRelationResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeProductTypeRelationResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'type': json['type'], 'isFilterable': json['isFilterable'], 'isExpandedByDefault': json['isExpandedByDefault'], 'filterIndex': json['filterIndex'], 'fieldType': json['fieldType'], 'order': json['order'], 'values': (json['values'] == null ? null : (json['values'] as Array).map(AttributeValueResourceFromJSON)), }; } export function AttributeProductTypeRelationResourceToJSON(json: any): AttributeProductTypeRelationResource { return AttributeProductTypeRelationResourceToJSONTyped(json, false); } export function AttributeProductTypeRelationResourceToJSONTyped(value?: AttributeProductTypeRelationResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'type': value['type'], 'isFilterable': value['isFilterable'], 'isExpandedByDefault': value['isExpandedByDefault'], 'filterIndex': value['filterIndex'], 'fieldType': value['fieldType'], 'order': value['order'], 'values': (value['values'] == null ? null : (value['values'] as Array).map(AttributeValueResourceToJSON)), }; }