/* 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 { SupporterRankUpNotificationAction } from './SupporterRankUpNotificationAction'; import { SupporterRankUpNotificationActionFromJSON, SupporterRankUpNotificationActionFromJSONTyped, SupporterRankUpNotificationActionToJSON, } from './SupporterRankUpNotificationAction'; /** * * @export * @interface SupporterRankUpNotification */ export interface SupporterRankUpNotification { /** * * @type {string} * @memberof SupporterRankUpNotification */ type: string; /** * * @type {string} * @memberof SupporterRankUpNotification */ groupId: string; /** * * @type {boolean} * @memberof SupporterRankUpNotification */ isSeen: boolean; /** * * @type {number} * @memberof SupporterRankUpNotification */ seenAt?: number; /** * * @type {Array} * @memberof SupporterRankUpNotification */ actions: Array; } /** * Check if a given object implements the SupporterRankUpNotification interface. */ export function instanceOfSupporterRankUpNotification(value: object): value is SupporterRankUpNotification { 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 SupporterRankUpNotificationFromJSON(json: any): SupporterRankUpNotification { return SupporterRankUpNotificationFromJSONTyped(json, false); } export function SupporterRankUpNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupporterRankUpNotification { 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(SupporterRankUpNotificationActionFromJSON)), }; } export function SupporterRankUpNotificationToJSON(value?: SupporterRankUpNotification | 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(SupporterRankUpNotificationActionToJSON)), }; }