/* 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';
/**
 * Model for testing model name same as property name
 * @export
 * @interface Name
 */
export interface Name {
    /**
     * 
     * @type {number}
     * @memberof Name
     */
    name: number;
    /**
     * 
     * @type {number}
     * @memberof Name
     */
    readonly snakeCase?: number;
    /**
     * 
     * @type {string}
     * @memberof Name
     */
    property?: string;
    /**
     * 
     * @type {number}
     * @memberof Name
     */
    readonly _123number?: number;
}

/**
 * Check if a given object implements the Name interface.
 */
export function instanceOfName(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "name" in value;

    return isInstance;
}

export function NameFromJSON(json: any): Name {
    return NameFromJSONTyped(json, false);
}

export function NameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Name {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'name': json['name'],
        'snakeCase': !exists(json, 'snake_case') ? undefined : json['snake_case'],
        'property': !exists(json, 'property') ? undefined : json['property'],
        '_123number': !exists(json, '123Number') ? undefined : json['123Number'],
    };
}

export function NameToJSON(value?: Name | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'name': value.name,
        'property': value.property,
    };
}

