alas/web/service/openapi/models/ValidationError.ts
2022-07-03 17:29:11 +02:00

79 lines
1.8 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* FastAPI
* 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 { exists, mapValues } from '../runtime';
import {
LocationInner,
LocationInnerFromJSON,
LocationInnerFromJSONTyped,
LocationInnerToJSON,
} from './LocationInner';
/**
*
* @export
* @interface ValidationError
*/
export interface ValidationError {
/**
*
* @type {Array<LocationInner>}
* @memberof ValidationError
*/
loc: Array<LocationInner>;
/**
*
* @type {string}
* @memberof ValidationError
*/
msg: string;
/**
*
* @type {string}
* @memberof ValidationError
*/
type: string;
}
export function ValidationErrorFromJSON(json: any): ValidationError {
return ValidationErrorFromJSONTyped(json, false);
}
export function ValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationError {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'loc': ((json['loc'] as Array<any>).map(LocationInnerFromJSON)),
'msg': json['msg'],
'type': json['type'],
};
}
export function ValidationErrorToJSON(value?: ValidationError | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'loc': ((value.loc as Array<any>).map(LocationInnerToJSON)),
'msg': value.msg,
'type': value.type,
};
}