/* tslint:disable */
/* eslint-disable */
/**
 * elkar-app
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.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';
import type { FileData } from './FileData';
import {
    FileDataFromJSON,
    FileDataFromJSONTyped,
    FileDataToJSON,
    FileDataToJSONTyped,
} from './FileData';

/**
 * 
 * @export
 * @interface PartTypeOneOf1
 */
export interface PartTypeOneOf1 {
    /**
     * 
     * @type {FileData}
     * @memberof PartTypeOneOf1
     */
    file: FileData;
    /**
     * 
     * @type {string}
     * @memberof PartTypeOneOf1
     */
    type: PartTypeOneOf1TypeEnum;
}


/**
 * @export
 */
export const PartTypeOneOf1TypeEnum = {
    File: 'file'
} as const;
export type PartTypeOneOf1TypeEnum = typeof PartTypeOneOf1TypeEnum[keyof typeof PartTypeOneOf1TypeEnum];


/**
 * Check if a given object implements the PartTypeOneOf1 interface.
 */
export function instanceOfPartTypeOneOf1(value: object): value is PartTypeOneOf1 {
    if (!('file' in value) || value['file'] === undefined) return false;
    if (!('type' in value) || value['type'] === undefined) return false;
    return true;
}

export function PartTypeOneOf1FromJSON(json: any): PartTypeOneOf1 {
    return PartTypeOneOf1FromJSONTyped(json, false);
}

export function PartTypeOneOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): PartTypeOneOf1 {
    if (json == null) {
        return json;
    }
    return {
        
        'file': FileDataFromJSON(json['file']),
        'type': json['type'],
    };
}

export function PartTypeOneOf1ToJSON(json: any): PartTypeOneOf1 {
    return PartTypeOneOf1ToJSONTyped(json, false);
}

export function PartTypeOneOf1ToJSONTyped(value?: PartTypeOneOf1 | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'file': FileDataToJSON(value['file']),
        'type': value['type'],
    };
}

