/* 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 { TrendingUndergroundNotificationAction } from './TrendingUndergroundNotificationAction'; import { TrendingUndergroundNotificationActionFromJSON, TrendingUndergroundNotificationActionFromJSONTyped, TrendingUndergroundNotificationActionToJSON, } from './TrendingUndergroundNotificationAction'; /** * * @export * @interface TrendingUndergroundNotification */ export interface TrendingUndergroundNotification { /** * * @type {string} * @memberof TrendingUndergroundNotification */ type: string; /** * * @type {string} * @memberof TrendingUndergroundNotification */ groupId: string; /** * * @type {boolean} * @memberof TrendingUndergroundNotification */ isSeen: boolean; /** * * @type {number} * @memberof TrendingUndergroundNotification */ seenAt?: number; /** * * @type {Array} * @memberof TrendingUndergroundNotification */ actions: Array; } /** * Check if a given object implements the TrendingUndergroundNotification interface. */ export function instanceOfTrendingUndergroundNotification(value: object): value is TrendingUndergroundNotification { 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 TrendingUndergroundNotificationFromJSON(json: any): TrendingUndergroundNotification { return TrendingUndergroundNotificationFromJSONTyped(json, false); } export function TrendingUndergroundNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrendingUndergroundNotification { 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(TrendingUndergroundNotificationActionFromJSON)), }; } export function TrendingUndergroundNotificationToJSON(value?: TrendingUndergroundNotification | 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(TrendingUndergroundNotificationActionToJSON)), }; }