/* 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 { ReqS3Archive, ReqTapisSystemArchive, ReqS3ArchiveFromJSONTyped, ReqS3ArchiveToJSON, ReqTapisSystemArchiveFromJSONTyped, ReqTapisSystemArchiveToJSON, EnumArchiveType } from './'; /** * @type ReqArchive * * @export */ export type ReqArchive = { type: EnumArchiveType.S3 } & ReqS3Archive | { type: EnumArchiveType.System } & ReqTapisSystemArchive; export function ReqArchiveFromJSON(json: any): ReqArchive { return ReqArchiveFromJSONTyped(json, false); } export function ReqArchiveFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqArchive { if ((json === undefined) || (json === null)) { return json; } switch (json['type']) { case EnumArchiveType.S3: return {...ReqS3ArchiveFromJSONTyped(json, true), type: EnumArchiveType.S3}; case EnumArchiveType.System: return {...ReqTapisSystemArchiveFromJSONTyped(json, true), type: EnumArchiveType.System}; default: throw new Error(`No variant of ReqArchive exists with 'type=${json['type']}'`); } } export function ReqArchiveToJSON(value?: ReqArchive | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } switch (value['type']) { case EnumArchiveType.S3: return ReqS3ArchiveToJSON(value); case EnumArchiveType.System: return ReqTapisSystemArchiveToJSON(value); default: throw new Error(`No variant of ReqArchive exists with 'type=${value['type']}'`); } }