/* 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'; /** * * @export * @interface SupplierListResource */ export interface SupplierListResource { /** * * @type {number} * @memberof SupplierListResource */ id: number; /** * * @type {string} * @memberof SupplierListResource */ name: string; /** * * @type {string} * @memberof SupplierListResource */ slug: string; /** * * @type {AssetLiteResource} * @memberof SupplierListResource */ thumbnail: AssetLiteResource | null; /** * * @type {number} * @memberof SupplierListResource */ supplierEta: number; } /** * Check if a given object implements the SupplierListResource interface. */ export function instanceOfSupplierListResource(value: object): value is SupplierListResource { 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 (!('thumbnail' in value) || value['thumbnail'] === undefined) return false; if (!('supplierEta' in value) || value['supplierEta'] === undefined) return false; return true; } export function SupplierListResourceFromJSON(json: any): SupplierListResource { return SupplierListResourceFromJSONTyped(json, false); } export function SupplierListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupplierListResource { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'slug': json['slug'], 'thumbnail': AssetLiteResourceFromJSON(json['thumbnail']), 'supplierEta': json['supplierEta'], }; } export function SupplierListResourceToJSON(json: any): SupplierListResource { return SupplierListResourceToJSONTyped(json, false); } export function SupplierListResourceToJSONTyped(value?: SupplierListResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'slug': value['slug'], 'thumbnail': AssetLiteResourceToJSON(value['thumbnail']), 'supplierEta': value['supplierEta'], }; }