/* tslint:disable */
/* eslint-disable */
/**
 * UCX Proxy
 * A single use API for the UCX Proxy.
 *
 * The version of the OpenAPI document: 0.0.12
 * Contact: customersuccess@equisoft.com
 *
 * 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 { ErrorCodes } from './ErrorCodes';
import {
    ErrorCodesFromJSON,
    ErrorCodesFromJSONTyped,
    ErrorCodesToJSON,
    ErrorCodesToJSONTyped,
} from './ErrorCodes';

/**
 * 
 * @export
 * @interface ErrorSchema
 */
export interface ErrorSchema {
    /**
     * 
     * @type {ErrorCodes}
     * @memberof ErrorSchema
     */
    code: ErrorCodes;
    /**
     * 
     * @type {string}
     * @memberof ErrorSchema
     */
    message?: string | null;
}



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

export function ErrorSchemaFromJSON(json: any): ErrorSchema {
    return ErrorSchemaFromJSONTyped(json, false);
}

export function ErrorSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'code': ErrorCodesFromJSON(json['code']),
        'message': json['message'] == null ? undefined : json['message'],
    };
}

export function ErrorSchemaToJSON(json: any): ErrorSchema {
    return ErrorSchemaToJSONTyped(json, false);
}

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

    return {
        
        'code': ErrorCodesToJSON(value['code']),
        'message': value['message'],
    };
}

