/* 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'; /** * * @export * @interface ProductAccessoryFrontendResource */ export interface ProductAccessoryFrontendResource { /** * * @type {number} * @memberof ProductAccessoryFrontendResource */ id: number; /** * * @type {string} * @memberof ProductAccessoryFrontendResource */ name: string; /** * * @type {string} * @memberof ProductAccessoryFrontendResource */ slug: string; /** * * @type {number} * @memberof ProductAccessoryFrontendResource */ price: number; /** * * @type {number} * @memberof ProductAccessoryFrontendResource */ salePrice: number; /** * * @type {number} * @memberof ProductAccessoryFrontendResource */ stock: number; /** * * @type {boolean} * @memberof ProductAccessoryFrontendResource */ allowOversell: boolean; /** * * @type {string} * @memberof ProductAccessoryFrontendResource */ thumbnail?: string | null; /** * * @type {object} * @memberof ProductAccessoryFrontendResource */ parent: object; } /** * Check if a given object implements the ProductAccessoryFrontendResource interface. */ export function instanceOfProductAccessoryFrontendResource(value: object): value is ProductAccessoryFrontendResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('slug' in value) || value['slug'] === undefined) return false; if (!('price' in value) || value['price'] === undefined) return false; if (!('salePrice' in value) || value['salePrice'] === undefined) return false; if (!('stock' in value) || value['stock'] === undefined) return false; if (!('allowOversell' in value) || value['allowOversell'] === undefined) return false; if (!('parent' in value) || value['parent'] === undefined) return false; return true; } export function ProductAccessoryFrontendResourceFromJSON(json: any): ProductAccessoryFrontendResource { return ProductAccessoryFrontendResourceFromJSONTyped(json, false); } export function ProductAccessoryFrontendResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductAccessoryFrontendResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'slug': json['slug'], 'price': json['price'], 'salePrice': json['salePrice'], 'stock': json['stock'], 'allowOversell': json['allowOversell'], 'thumbnail': json['thumbnail'] == null ? undefined : json['thumbnail'], 'parent': json['parent'], }; } export function ProductAccessoryFrontendResourceToJSON(json: any): ProductAccessoryFrontendResource { return ProductAccessoryFrontendResourceToJSONTyped(json, false); } export function ProductAccessoryFrontendResourceToJSONTyped(value?: ProductAccessoryFrontendResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'slug': value['slug'], 'price': value['price'], 'salePrice': value['salePrice'], 'stock': value['stock'], 'allowOversell': value['allowOversell'], 'thumbnail': value['thumbnail'], 'parent': value['parent'], }; }