/* tslint:disable */
/* eslint-disable */
/**
 * OpenAPI Petstore
 * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
 *
 * 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 { exists, mapValues } from '../runtime';
import type { Animal } from './Animal';
import {
    AnimalFromJSON,
    AnimalFromJSONTyped,
    AnimalToJSON,
} from './Animal';

/**
 * 
 * @export
 * @interface Cat
 */
export interface Cat extends Animal {
    /**
     * 
     * @type {boolean}
     * @memberof Cat
     */
    declawed?: boolean;
}

/**
 * Check if a given object implements the Cat interface.
 */
export function instanceOfCat(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function CatFromJSON(json: any): Cat {
    return CatFromJSONTyped(json, false);
}

export function CatFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cat {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        ...AnimalFromJSONTyped(json, ignoreDiscriminator),
        'declawed': !exists(json, 'declawed') ? undefined : json['declawed'],
    };
}

export function CatToJSON(value?: Cat | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        ...AnimalToJSON(value),
        'declawed': value.declawed,
    };
}

