/* 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'; import type { CommentMention } from './CommentMention'; import { CommentMentionFromJSON, CommentMentionFromJSONTyped, CommentMentionToJSON, } from './CommentMention'; /** * * @export * @interface ReplyComment */ export interface ReplyComment { /** * * @type {string} * @memberof ReplyComment */ id: string; /** * * @type {string} * @memberof ReplyComment */ entityId: string; /** * * @type {CommentEntityType} * @memberof ReplyComment */ entityType: CommentEntityType; /** * * @type {string} * @memberof ReplyComment */ userId: string; /** * * @type {string} * @memberof ReplyComment */ message: string; /** * * @type {Array} * @memberof ReplyComment */ mentions?: Array; /** * * @type {number} * @memberof ReplyComment */ trackTimestampS?: number; /** * * @type {number} * @memberof ReplyComment */ reactCount: number; /** * * @type {boolean} * @memberof ReplyComment */ isEdited: boolean; /** * * @type {boolean} * @memberof ReplyComment */ isCurrentUserReacted?: boolean; /** * * @type {boolean} * @memberof ReplyComment */ isArtistReacted?: boolean; /** * * @type {string} * @memberof ReplyComment */ createdAt: string; /** * * @type {string} * @memberof ReplyComment */ updatedAt?: string; /** * * @type {number} * @memberof ReplyComment */ parentCommentId?: number; } /** * Check if a given object implements the ReplyComment interface. */ export function instanceOfReplyComment(value: object): value is ReplyComment { let isInstance = true; isInstance = isInstance && "id" in value && value["id"] !== undefined; isInstance = isInstance && "entityId" in value && value["entityId"] !== undefined; isInstance = isInstance && "entityType" in value && value["entityType"] !== undefined; isInstance = isInstance && "userId" in value && value["userId"] !== undefined; isInstance = isInstance && "message" in value && value["message"] !== undefined; isInstance = isInstance && "reactCount" in value && value["reactCount"] !== undefined; isInstance = isInstance && "isEdited" in value && value["isEdited"] !== undefined; isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; return isInstance; } export function ReplyCommentFromJSON(json: any): ReplyComment { return ReplyCommentFromJSONTyped(json, false); } export function ReplyCommentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplyComment { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'entityId': json['entity_id'], 'entityType': CommentEntityTypeFromJSON(json['entity_type']), 'userId': json['user_id'], 'message': json['message'], 'mentions': !exists(json, 'mentions') ? undefined : ((json['mentions'] as Array).map(CommentMentionFromJSON)), 'trackTimestampS': !exists(json, 'track_timestamp_s') ? undefined : json['track_timestamp_s'], 'reactCount': json['react_count'], 'isEdited': json['is_edited'], 'isCurrentUserReacted': !exists(json, 'is_current_user_reacted') ? undefined : json['is_current_user_reacted'], 'isArtistReacted': !exists(json, 'is_artist_reacted') ? undefined : json['is_artist_reacted'], 'createdAt': json['created_at'], 'updatedAt': !exists(json, 'updated_at') ? undefined : json['updated_at'], 'parentCommentId': !exists(json, 'parent_comment_id') ? undefined : json['parent_comment_id'], }; } export function ReplyCommentToJSON(value?: ReplyComment | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'entity_id': value.entityId, 'entity_type': CommentEntityTypeToJSON(value.entityType), 'user_id': value.userId, 'message': value.message, 'mentions': value.mentions === undefined ? undefined : ((value.mentions as Array).map(CommentMentionToJSON)), 'track_timestamp_s': value.trackTimestampS, 'react_count': value.reactCount, 'is_edited': value.isEdited, 'is_current_user_reacted': value.isCurrentUserReacted, 'is_artist_reacted': value.isArtistReacted, 'created_at': value.createdAt, 'updated_at': value.updatedAt, 'parent_comment_id': value.parentCommentId, }; }