/* tslint:disable */ /* eslint-disable */ // @ts-nocheck /** * Audius API * * The version of the OpenAPI document: 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 type { CommentEntityType } from './CommentEntityType'; import { CommentEntityTypeFromJSON, CommentEntityTypeFromJSONTyped, CommentEntityTypeToJSON, } from './CommentEntityType'; /** * * @export * @interface UpdateCommentRequestBody */ export interface UpdateCommentRequestBody { /** * * @type {CommentEntityType} * @memberof UpdateCommentRequestBody */ entityType: CommentEntityType; /** * ID of the entity being commented on * @type {number} * @memberof UpdateCommentRequestBody */ entityId: number; /** * The updated comment text * @type {string} * @memberof UpdateCommentRequestBody */ body: string; /** * Array of user IDs mentioned in the comment (max 10) * @type {Array} * @memberof UpdateCommentRequestBody */ mentions?: Array; } /** * Check if a given object implements the UpdateCommentRequestBody interface. */ export function instanceOfUpdateCommentRequestBody(value: object): value is UpdateCommentRequestBody { let isInstance = true; isInstance = isInstance && "entityType" in value && value["entityType"] !== undefined; isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; isInstance = isInstance && "body" in value && value["body"] !== undefined; return isInstance; } export function UpdateCommentRequestBodyFromJSON(json: any): UpdateCommentRequestBody { return UpdateCommentRequestBodyFromJSONTyped(json, false); } export function UpdateCommentRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCommentRequestBody { if ((json === undefined) || (json === null)) { return json; } return { 'entityType': CommentEntityTypeFromJSON(json['entityType']), 'entityId': json['entityId'], 'body': json['body'], 'mentions': !exists(json, 'mentions') ? undefined : json['mentions'], }; } export function UpdateCommentRequestBodyToJSON(value?: UpdateCommentRequestBody | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'entityType': CommentEntityTypeToJSON(value.entityType), 'entityId': value.entityId, 'body': value.body, 'mentions': value.mentions, }; }