UNPKG

@space-cow-media/spellbook-client

Version:

An Open Api generated client for the Commander Spellbook backend REST API.

83 lines (71 loc) 2.22 kB
/* tslint:disable */ /* eslint-disable */ /** * Commander Spellbook API * API for Commander Spellbook, the combo database engine for Magic: The Gathering * * The version of the OpenAPI document: 4.8.19 * * * 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 { Feature } from './feature'; import { FeatureFromJSON, FeatureFromJSONTyped, FeatureToJSON, FeatureToJSONTyped, } from './feature'; /** * * @export * @interface FeatureProducedByVariant */ export interface FeatureProducedByVariant { /** * * @type {Feature} * @memberof FeatureProducedByVariant */ readonly feature: Feature; /** * Quantity of the feature produced by the variant. * @type {number} * @memberof FeatureProducedByVariant */ quantity: number; } /** * Check if a given object implements the FeatureProducedByVariant interface. */ export function instanceOfFeatureProducedByVariant(value: object): value is FeatureProducedByVariant { if (!('feature' in value) || value['feature'] === undefined) return false; if (!('quantity' in value) || value['quantity'] === undefined) return false; return true; } export function FeatureProducedByVariantFromJSON(json: any): FeatureProducedByVariant { return FeatureProducedByVariantFromJSONTyped(json, false); } export function FeatureProducedByVariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeatureProducedByVariant { if (json == null) { return json; } return { 'feature': FeatureFromJSON(json['feature']), 'quantity': json['quantity'], }; } export function FeatureProducedByVariantToJSON(json: any): FeatureProducedByVariant { return FeatureProducedByVariantToJSONTyped(json, false); } export function FeatureProducedByVariantToJSONTyped(value?: Omit<FeatureProducedByVariant, 'feature'> | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'quantity': value['quantity'], }; }