/* tslint:disable */ /* eslint-disable */ /** * EAS API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.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 { mapValues } from '../runtime'; import type { DrawMetadata } from './DrawMetadata'; import { DrawMetadataFromJSON, DrawMetadataFromJSONTyped, DrawMetadataToJSON, } from './DrawMetadata'; import type { ParticipantField } from './ParticipantField'; import { ParticipantFieldFromJSON, ParticipantFieldFromJSONTyped, ParticipantFieldToJSON, } from './ParticipantField'; import type { BaseDraw } from './BaseDraw'; import { BaseDrawFromJSON, BaseDrawFromJSONTyped, BaseDrawToJSON, } from './BaseDraw'; import type { RaffleResult } from './RaffleResult'; import { RaffleResultFromJSON, RaffleResultFromJSONTyped, RaffleResultToJSON, } from './RaffleResult'; import type { PrizeField } from './PrizeField'; import { PrizeFieldFromJSON, PrizeFieldFromJSONTyped, PrizeFieldToJSON, } from './PrizeField'; /** * * @export * @interface Raffle */ export interface Raffle extends BaseDraw { /** * * @type {Array} * @memberof Raffle */ prizes: Array; /** * * @type {Array} * @memberof Raffle */ participants: Array; /** * * @type {Array} * @memberof Raffle */ readonly results: Array; } /** * Check if a given object implements the Raffle interface. */ export function instanceOfRaffle(value: object): value is Raffle { if (!('prizes' in value) || value['prizes'] === undefined) return false; if (!('participants' in value) || value['participants'] === undefined) return false; if (!('results' in value) || value['results'] === undefined) return false; return true; } export function RaffleFromJSON(json: any): Raffle { return RaffleFromJSONTyped(json, false); } export function RaffleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Raffle { if (json == null) { return json; } return { ...BaseDrawFromJSONTyped(json, ignoreDiscriminator), 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), 'participants': ((json['participants'] as Array).map(ParticipantFieldFromJSON)), 'results': ((json['results'] as Array).map(RaffleResultFromJSON)), }; } export function RaffleToJSON(value?: Omit | null): any { if (value == null) { return value; } return { ...BaseDrawToJSON(value), 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), 'participants': ((value['participants'] as Array).map(ParticipantFieldToJSON)), }; }