/* 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 { BaseTask, BaseTaskFromJSON, BaseTaskFromJSONTyped, BaseTaskToJSON, EnumTaskType, EnumTaskTypeFromJSON, EnumTaskTypeFromJSONTyped, EnumTaskTypeToJSON, SpecWithValue, SpecWithValueFromJSON, SpecWithValueFromJSONTyped, SpecWithValueToJSON, TapisJobTaskAllOf, TapisJobTaskAllOfFromJSON, TapisJobTaskAllOfFromJSONTyped, TapisJobTaskAllOfToJSON, TaskDependency, TaskDependencyFromJSON, TaskDependencyFromJSONTyped, TaskDependencyToJSON, TaskExecutionProfile, TaskExecutionProfileFromJSON, TaskExecutionProfileFromJSONTyped, TaskExecutionProfileToJSON, } from './'; /** * * @export * @interface TapisJobTask */ export interface TapisJobTask { /** * * @type {string} * @memberof TapisJobTask */ id?: string; /** * * @type {EnumTaskType} * @memberof TapisJobTask */ type?: EnumTaskType; /** * * @type {Array} * @memberof TapisJobTask */ depends_on?: Array; /** * * @type {string} * @memberof TapisJobTask */ description?: string; /** * * @type {TaskExecutionProfile} * @memberof TapisJobTask */ execution_profile?: TaskExecutionProfile; /** * * @type {{ [key: string]: SpecWithValue; }} * @memberof TapisJobTask */ input?: { [key: string]: SpecWithValue; }; /** * * @type {{ [key: string]: object; }} * @memberof TapisJobTask */ output?: { [key: string]: object; }; /** * * @type {Array<{ [key: string]: object; }>} * @memberof TapisJobTask */ conditions?: Array<{ [key: string]: object; }>; /** * * @type {Array} * @memberof TapisJobTask */ tags?: Array; /** * * @type {boolean} * @memberof TapisJobTask */ poll?: boolean; /** * * @type {object} * @memberof TapisJobTask */ tapis_job_def?: object; } export function TapisJobTaskFromJSON(json: any): TapisJobTask { return TapisJobTaskFromJSONTyped(json, false); } export function TapisJobTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): TapisJobTask { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'type': !exists(json, 'type') ? undefined : 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'], 'poll': !exists(json, 'poll') ? undefined : json['poll'], 'tapis_job_def': !exists(json, 'tapis_job_def') ? undefined : json['tapis_job_def'], }; } export function TapisJobTaskToJSON(value?: TapisJobTask | 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, 'poll': value.poll, 'tapis_job_def': value.tapis_job_def, }; }