/* tslint:disable */
/* eslint-disable */
/**
 * Enum test
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * 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 { NumberEnum } from './NumberEnum';
import {
    NumberEnumFromJSON,
    NumberEnumFromJSONTyped,
    NumberEnumToJSON,
} from './NumberEnum';
import type { StringEnum } from './StringEnum';
import {
    StringEnumFromJSON,
    StringEnumFromJSONTyped,
    StringEnumToJSON,
} from './StringEnum';

/**
 * 
 * @export
 * @interface EnumPatternObject
 */
export interface EnumPatternObject {
    /**
     * 
     * @type {StringEnum}
     * @memberof EnumPatternObject
     */
    stringEnum?: StringEnum;
    /**
     * 
     * @type {StringEnum}
     * @memberof EnumPatternObject
     */
    nullableStringEnum?: StringEnum | null;
    /**
     * 
     * @type {NumberEnum}
     * @memberof EnumPatternObject
     */
    numberEnum?: NumberEnum;
    /**
     * 
     * @type {NumberEnum}
     * @memberof EnumPatternObject
     */
    nullableNumberEnum?: NumberEnum | null;
}

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

    return isInstance;
}

export function EnumPatternObjectFromJSON(json: any): EnumPatternObject {
    return EnumPatternObjectFromJSONTyped(json, false);
}

export function EnumPatternObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnumPatternObject {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'stringEnum': !exists(json, 'string-enum') ? undefined : StringEnumFromJSON(json['string-enum']),
        'nullableStringEnum': !exists(json, 'nullable-string-enum') ? undefined : StringEnumFromJSON(json['nullable-string-enum']),
        'numberEnum': !exists(json, 'number-enum') ? undefined : NumberEnumFromJSON(json['number-enum']),
        'nullableNumberEnum': !exists(json, 'nullable-number-enum') ? undefined : NumberEnumFromJSON(json['nullable-number-enum']),
    };
}

export function EnumPatternObjectToJSON(value?: EnumPatternObject | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'string-enum': StringEnumToJSON(value.stringEnum),
        'nullable-string-enum': StringEnumToJSON(value.nullableStringEnum),
        'number-enum': NumberEnumToJSON(value.numberEnum),
        'nullable-number-enum': NumberEnumToJSON(value.nullableNumberEnum),
    };
}

