/* 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 { FollowGate, instanceOfFollowGate, FollowGateFromJSON, FollowGateFromJSONTyped, FollowGateToJSON, } from './FollowGate'; import { PurchaseGate, instanceOfPurchaseGate, PurchaseGateFromJSON, PurchaseGateFromJSONTyped, PurchaseGateToJSON, } from './PurchaseGate'; import { TipGate, instanceOfTipGate, TipGateFromJSON, TipGateFromJSONTyped, TipGateToJSON, } from './TipGate'; import { TokenGate, instanceOfTokenGate, TokenGateFromJSON, TokenGateFromJSONTyped, TokenGateToJSON, } from './TokenGate'; /** * @type AccessGate * * @export */ export type AccessGate = FollowGate | PurchaseGate | TipGate | TokenGate; export function AccessGateFromJSON(json: any): AccessGate { return AccessGateFromJSONTyped(json, false); } export function AccessGateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessGate { if ((json === undefined) || (json === null)) { return json; } return { ...FollowGateFromJSONTyped(json, true), ...PurchaseGateFromJSONTyped(json, true), ...TipGateFromJSONTyped(json, true), ...TokenGateFromJSONTyped(json, true) }; } export function AccessGateToJSON(value?: AccessGate | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } if (instanceOfFollowGate(value)) { return FollowGateToJSON(value as FollowGate); } if (instanceOfPurchaseGate(value)) { return PurchaseGateToJSON(value as PurchaseGate); } if (instanceOfTipGate(value)) { return TipGateToJSON(value as TipGate); } if (instanceOfTokenGate(value)) { return TokenGateToJSON(value as TokenGate); } return {}; }