/* 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 ProductCategoryHierarchyResource */ export interface ProductCategoryHierarchyResource { /** * * @type {number} * @memberof ProductCategoryHierarchyResource */ id?: number | null; /** * * @type {string} * @memberof ProductCategoryHierarchyResource */ name: string; /** * * @type {string} * @memberof ProductCategoryHierarchyResource */ slug: string; /** * * @type {number} * @memberof ProductCategoryHierarchyResource */ index: number; /** * * @type {boolean} * @memberof ProductCategoryHierarchyResource */ isAutomated: boolean; /** * * @type {object} * @memberof ProductCategoryHierarchyResource */ children: object; } /** * Check if a given object implements the ProductCategoryHierarchyResource interface. */ export function instanceOfProductCategoryHierarchyResource(value: object): value is ProductCategoryHierarchyResource { if (!('name' in value) || value['name'] === undefined) return false; if (!('slug' in value) || value['slug'] === undefined) return false; if (!('index' in value) || value['index'] === undefined) return false; if (!('isAutomated' in value) || value['isAutomated'] === undefined) return false; if (!('children' in value) || value['children'] === undefined) return false; return true; } export function ProductCategoryHierarchyResourceFromJSON(json: any): ProductCategoryHierarchyResource { return ProductCategoryHierarchyResourceFromJSONTyped(json, false); } export function ProductCategoryHierarchyResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductCategoryHierarchyResource { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'], 'slug': json['slug'], 'index': json['index'], 'isAutomated': json['isAutomated'], 'children': json['children'], }; } export function ProductCategoryHierarchyResourceToJSON(json: any): ProductCategoryHierarchyResource { return ProductCategoryHierarchyResourceToJSONTyped(json, false); } export function ProductCategoryHierarchyResourceToJSONTyped(value?: ProductCategoryHierarchyResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'slug': value['slug'], 'index': value['index'], 'isAutomated': value['isAutomated'], 'children': value['children'], }; }