/* 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 { exists, mapValues } from '../runtime'; import { EnumTaskType, EnumTaskTypeFromJSON, EnumTaskTypeFromJSONTyped, EnumTaskTypeToJSON, SpecWithValue, SpecWithValueFromJSON, SpecWithValueFromJSONTyped, SpecWithValueToJSON, TaskDependency, TaskDependencyFromJSON, TaskDependencyFromJSONTyped, TaskDependencyToJSON, TaskExecutionProfile, TaskExecutionProfileFromJSON, TaskExecutionProfileFromJSONTyped, TaskExecutionProfileToJSON, } from './'; /** * * @export * @interface ReqBaseTask */ export interface ReqBaseTask { /** * * @type {string} * @memberof ReqBaseTask */ id: string; /** * * @type {EnumTaskType} * @memberof ReqBaseTask */ type: EnumTaskType; /** * * @type {Array} * @memberof ReqBaseTask */ depends_on?: Array; /** * * @type {string} * @memberof ReqBaseTask */ description?: string; /** * * @type {TaskExecutionProfile} * @memberof ReqBaseTask */ execution_profile?: TaskExecutionProfile; /** * * @type {{ [key: string]: SpecWithValue; }} * @memberof ReqBaseTask */ input?: { [key: string]: SpecWithValue; }; /** * * @type {{ [key: string]: object; }} * @memberof ReqBaseTask */ output?: { [key: string]: object; }; /** * * @type {Array<{ [key: string]: object; }>} * @memberof ReqBaseTask */ conditions?: Array<{ [key: string]: object; }>; /** * * @type {Array} * @memberof ReqBaseTask */ tags?: Array; } export function ReqBaseTaskFromJSON(json: any): ReqBaseTask { return ReqBaseTaskFromJSONTyped(json, false); } export function ReqBaseTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqBaseTask { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'type': EnumTaskTypeFromJSON(json['type']), 'depends_on': !exists(json, 'depends_on') ? undefined : ((json['depends_on'] as Array).map(TaskDependencyFromJSON)), 'description': !exists(json, 'description') ? undefined : json['description'], 'execution_profile': !exists(json, 'execution_profile') ? undefined : TaskExecutionProfileFromJSON(json['execution_profile']), 'input': !exists(json, 'input') ? undefined : (mapValues(json['input'], SpecWithValueFromJSON)), 'output': !exists(json, 'output') ? undefined : json['output'], 'conditions': !exists(json, 'conditions') ? undefined : json['conditions'], 'tags': !exists(json, 'tags') ? undefined : json['tags'], }; } export function ReqBaseTaskToJSON(value?: ReqBaseTask | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'type': EnumTaskTypeToJSON(value.type), 'depends_on': value.depends_on === undefined ? undefined : ((value.depends_on as Array).map(TaskDependencyToJSON)), 'description': value.description, 'execution_profile': TaskExecutionProfileToJSON(value.execution_profile), 'input': value.input === undefined ? undefined : (mapValues(value.input, SpecWithValueToJSON)), 'output': value.output, 'conditions': value.conditions, 'tags': value.tags, }; }