/* 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 { SendTipNotificationAction } from './SendTipNotificationAction'; import { SendTipNotificationActionFromJSON, SendTipNotificationActionFromJSONTyped, SendTipNotificationActionToJSON, } from './SendTipNotificationAction'; /** * * @export * @interface SendTipNotification */ export interface SendTipNotification { /** * * @type {string} * @memberof SendTipNotification */ type: string; /** * * @type {string} * @memberof SendTipNotification */ groupId: string; /** * * @type {boolean} * @memberof SendTipNotification */ isSeen: boolean; /** * * @type {number} * @memberof SendTipNotification */ seenAt?: number; /** * * @type {Array} * @memberof SendTipNotification */ actions: Array; } /** * Check if a given object implements the SendTipNotification interface. */ export function instanceOfSendTipNotification(value: object): value is SendTipNotification { 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 SendTipNotificationFromJSON(json: any): SendTipNotification { return SendTipNotificationFromJSONTyped(json, false); } export function SendTipNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTipNotification { 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(SendTipNotificationActionFromJSON)), }; } export function SendTipNotificationToJSON(value?: SendTipNotification | 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(SendTipNotificationActionToJSON)), }; }