/* 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 { UsdcPurchaseBuyerNotificationAction } from './UsdcPurchaseBuyerNotificationAction'; import { UsdcPurchaseBuyerNotificationActionFromJSON, UsdcPurchaseBuyerNotificationActionFromJSONTyped, UsdcPurchaseBuyerNotificationActionToJSON, } from './UsdcPurchaseBuyerNotificationAction'; /** * * @export * @interface UsdcPurchaseBuyerNotification */ export interface UsdcPurchaseBuyerNotification { /** * * @type {string} * @memberof UsdcPurchaseBuyerNotification */ type: string; /** * * @type {string} * @memberof UsdcPurchaseBuyerNotification */ groupId: string; /** * * @type {boolean} * @memberof UsdcPurchaseBuyerNotification */ isSeen: boolean; /** * * @type {number} * @memberof UsdcPurchaseBuyerNotification */ seenAt?: number; /** * * @type {Array} * @memberof UsdcPurchaseBuyerNotification */ actions: Array; } /** * Check if a given object implements the UsdcPurchaseBuyerNotification interface. */ export function instanceOfUsdcPurchaseBuyerNotification(value: object): value is UsdcPurchaseBuyerNotification { 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 UsdcPurchaseBuyerNotificationFromJSON(json: any): UsdcPurchaseBuyerNotification { return UsdcPurchaseBuyerNotificationFromJSONTyped(json, false); } export function UsdcPurchaseBuyerNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsdcPurchaseBuyerNotification { 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(UsdcPurchaseBuyerNotificationActionFromJSON)), }; } export function UsdcPurchaseBuyerNotificationToJSON(value?: UsdcPurchaseBuyerNotification | 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(UsdcPurchaseBuyerNotificationActionToJSON)), }; }