/* 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 { SingleRefType } from './SingleRefType';
import {
    SingleRefTypeFromJSON,
    SingleRefTypeFromJSONTyped,
    SingleRefTypeToJSON,
} from './SingleRefType';

/**
 * 
 * @export
 * @interface AllOfWithSingleRef
 */
export interface AllOfWithSingleRef {
    /**
     * 
     * @type {string}
     * @memberof AllOfWithSingleRef
     */
    username?: string;
    /**
     * 
     * @type {SingleRefType}
     * @memberof AllOfWithSingleRef
     */
    singleRefType?: SingleRefType;
}

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

    return isInstance;
}

export function AllOfWithSingleRefFromJSON(json: any): AllOfWithSingleRef {
    return AllOfWithSingleRefFromJSONTyped(json, false);
}

export function AllOfWithSingleRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllOfWithSingleRef {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'username': !exists(json, 'username') ? undefined : json['username'],
        'singleRefType': !exists(json, 'SingleRefType') ? undefined : SingleRefTypeFromJSON(json['SingleRefType']),
    };
}

export function AllOfWithSingleRefToJSON(value?: AllOfWithSingleRef | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'username': value.username,
        'SingleRefType': SingleRefTypeToJSON(value.singleRefType),
    };
}

