/* 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';
import type { Rating } from './Rating.js';
import {
RatingFromJSON,
RatingFromJSONTyped,
RatingToJSON,
RatingToJSONTyped,
} from './Rating.js';
/**
* The avatar data to update. Partial updates are supported, so only the provided fields will be updated.
* @export
* @interface UpdateAvatarRequest
*/
export interface UpdateAvatarRequest {
/**
* Rating associated with the image.
* @type {Rating}
* @memberof UpdateAvatarRequest
*/
rating?: Rating;
/**
* Alternative text description of the image.
* @type {string}
* @memberof UpdateAvatarRequest
*/
altText?: string;
}
/**
* Check if a given object implements the UpdateAvatarRequest interface.
*/
export function instanceOfUpdateAvatarRequest(value: object): value is UpdateAvatarRequest {
return true;
}
export function UpdateAvatarRequestFromJSON(json: any): UpdateAvatarRequest {
return UpdateAvatarRequestFromJSONTyped(json, false);
}
export function UpdateAvatarRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateAvatarRequest {
if (json == null) {
return json;
}
return {
'rating': json['rating'] == null ? undefined : RatingFromJSON(json['rating']),
'altText': json['alt_text'] == null ? undefined : json['alt_text'],
};
}
export function UpdateAvatarRequestToJSON(json: any): UpdateAvatarRequest {
return UpdateAvatarRequestToJSONTyped(json, false);
}
export function UpdateAvatarRequestToJSONTyped(value?: UpdateAvatarRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'rating': RatingToJSON(value['rating']),
'alt_text': value['altText'],
};
}