/* tslint:disable */
/* eslint-disable */
/**
* Gravatar Public API
* Gravatar\'s public API endpoints
*
* The version of the OpenAPI document: 3.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 { mapValues } from '../runtime.js';
/**
* An error response from the API.
* @export
* @interface ModelError
*/
export interface ModelError {
/**
* The error message
* @type {string}
* @memberof ModelError
*/
error: string;
/**
* The error code for the error message
* @type {string}
* @memberof ModelError
*/
code?: string;
}
/**
* Check if a given object implements the ModelError interface.
*/
export function instanceOfModelError(value: object): value is ModelError {
if (!('error' in value) || value['error'] === undefined) return false;
return true;
}
export function ModelErrorFromJSON(json: any): ModelError {
return ModelErrorFromJSONTyped(json, false);
}
export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError {
if (json == null) {
return json;
}
return {
'error': json['error'],
'code': json['code'] == null ? undefined : json['code'],
};
}
export function ModelErrorToJSON(json: any): ModelError {
return ModelErrorToJSONTyped(json, false);
}
export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'error': value['error'],
'code': value['code'],
};
}