/* tslint:disable */ /* eslint-disable */ /** * Fabric 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 type { StoreListingIntegration } from './StoreListingIntegration'; import { instanceOfStoreListingIntegration, StoreListingIntegrationFromJSON, StoreListingIntegrationFromJSONTyped, StoreListingIntegrationToJSON, } from './StoreListingIntegration'; import type { StoreListingPlugin } from './StoreListingPlugin'; import { instanceOfStoreListingPlugin, StoreListingPluginFromJSON, StoreListingPluginFromJSONTyped, StoreListingPluginToJSON, } from './StoreListingPlugin'; /** * @type StoreListing * * @export */ export type StoreListing = { kind: 'INTEGRATION' } & StoreListingIntegration | { kind: 'PLUGIN' } & StoreListingPlugin; export function StoreListingFromJSON(json: any): StoreListing { return StoreListingFromJSONTyped(json, false); } export function StoreListingFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreListing { if (json == null) { return json; } switch (json['kind']) { case 'INTEGRATION': return Object.assign({}, StoreListingIntegrationFromJSONTyped(json, true), { kind: 'INTEGRATION' } as const); case 'PLUGIN': return Object.assign({}, StoreListingPluginFromJSONTyped(json, true), { kind: 'PLUGIN' } as const); default: return json; } } export function StoreListingToJSON(json: any): any { return StoreListingToJSONTyped(json, false); } export function StoreListingToJSONTyped(value?: StoreListing | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } switch (value['kind']) { case 'INTEGRATION': return Object.assign({}, StoreListingIntegrationToJSON(value), { kind: 'INTEGRATION' } as const); case 'PLUGIN': return Object.assign({}, StoreListingPluginToJSON(value), { kind: 'PLUGIN' } as const); default: return value; } }