/* tslint:disable */ /* eslint-disable */ /** * Tapis Workflows API * Create and manage pipelines * * The version of the OpenAPI document: 1.6.0 * Contact: cicsupport@tacc.utexas.edu * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { ReqDockerhubDestination, ReqLocalDestination, ReqDockerhubDestinationFromJSONTyped, ReqDockerhubDestinationToJSON, ReqLocalDestinationFromJSONTyped, ReqLocalDestinationToJSON, EnumDestinationType } from './'; /** * @type ReqDestination * * @export */ export type ReqDestination = { type: EnumDestinationType.Dockerhub } & ReqDockerhubDestination | { type: EnumDestinationType.Local } & ReqLocalDestination; export function ReqDestinationFromJSON(json: any): ReqDestination { return ReqDestinationFromJSONTyped(json, false); } export function ReqDestinationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqDestination { if ((json === undefined) || (json === null)) { return json; } switch (json['type']) { case EnumDestinationType.Dockerhub: return {...ReqDockerhubDestinationFromJSONTyped(json, true), type: EnumDestinationType.Dockerhub}; case EnumDestinationType.Local: return {...ReqLocalDestinationFromJSONTyped(json, true), type: EnumDestinationType.Local}; default: throw new Error(`No variant of ReqDestination exists with 'type=${json['type']}'`); } } export function ReqDestinationToJSON(value?: ReqDestination | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } switch (value['type']) { case EnumDestinationType.Dockerhub: return ReqDockerhubDestinationToJSON(value); case EnumDestinationType.Local: return ReqLocalDestinationToJSON(value); default: throw new Error(`No variant of ReqDestination exists with 'type=${value['type']}'`); } }