/* tslint:disable */
/* eslint-disable */
/**
 * Unleash API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 4.11.0-beta.2
 * 
 *
 * 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';
/**
 * 
 * @export
 * @interface PatchOperationSchema
 */
export interface PatchOperationSchema {
    /**
     * 
     * @type {string}
     * @memberof PatchOperationSchema
     */
    path: string;
    /**
     * 
     * @type {string}
     * @memberof PatchOperationSchema
     */
    op: PatchOperationSchemaOpEnum;
    /**
     * 
     * @type {string}
     * @memberof PatchOperationSchema
     */
    from?: string;
    /**
     * 
     * @type {any}
     * @memberof PatchOperationSchema
     */
    value?: any | null;
}


/**
 * @export
 */
export const PatchOperationSchemaOpEnum = {
    Add: 'add',
    Remove: 'remove',
    Replace: 'replace',
    Copy: 'copy',
    Move: 'move'
} as const;
export type PatchOperationSchemaOpEnum = typeof PatchOperationSchemaOpEnum[keyof typeof PatchOperationSchemaOpEnum];


export function PatchOperationSchemaFromJSON(json: any): PatchOperationSchema {
    return PatchOperationSchemaFromJSONTyped(json, false);
}

export function PatchOperationSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchOperationSchema {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'path': json['path'],
        'op': json['op'],
        'from': !exists(json, 'from') ? undefined : json['from'],
        'value': !exists(json, 'value') ? undefined : json['value'],
    };
}

export function PatchOperationSchemaToJSON(value?: PatchOperationSchema | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'path': value.path,
        'op': value.op,
        'from': value.from,
        'value': value.value,
    };
}

