/* 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 { CommentReactionNotificationAction } from './CommentReactionNotificationAction'; import { CommentReactionNotificationActionFromJSON, CommentReactionNotificationActionFromJSONTyped, CommentReactionNotificationActionToJSON, } from './CommentReactionNotificationAction'; /** * * @export * @interface CommentReactionNotification */ export interface CommentReactionNotification { /** * * @type {string} * @memberof CommentReactionNotification */ type: string; /** * * @type {string} * @memberof CommentReactionNotification */ groupId: string; /** * * @type {boolean} * @memberof CommentReactionNotification */ isSeen: boolean; /** * * @type {number} * @memberof CommentReactionNotification */ seenAt?: number; /** * * @type {Array} * @memberof CommentReactionNotification */ actions: Array; } /** * Check if a given object implements the CommentReactionNotification interface. */ export function instanceOfCommentReactionNotification(value: object): value is CommentReactionNotification { let isInstance = true; isInstance = isInstance && "type" in value && value["type"] !== undefined; isInstance = isInstance && "groupId" in value && value["groupId"] !== undefined; isInstance = isInstance && "isSeen" in value && value["isSeen"] !== undefined; isInstance = isInstance && "actions" in value && value["actions"] !== undefined; return isInstance; } export function CommentReactionNotificationFromJSON(json: any): CommentReactionNotification { return CommentReactionNotificationFromJSONTyped(json, false); } export function CommentReactionNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentReactionNotification { if ((json === undefined) || (json === null)) { return json; } return { 'type': json['type'], 'groupId': json['group_id'], 'isSeen': json['is_seen'], 'seenAt': !exists(json, 'seen_at') ? undefined : json['seen_at'], 'actions': ((json['actions'] as Array).map(CommentReactionNotificationActionFromJSON)), }; } export function CommentReactionNotificationToJSON(value?: CommentReactionNotification | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'type': value.type, 'group_id': value.groupId, 'is_seen': value.isSeen, 'seen_at': value.seenAt, 'actions': ((value.actions as Array).map(CommentReactionNotificationActionToJSON)), }; }