/* 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 { EnumInstaller, EnumInstallerFromJSON, EnumInstallerFromJSONTyped, EnumInstallerToJSON, EnumRuntimeEnvironment, EnumRuntimeEnvironmentFromJSON, EnumRuntimeEnvironmentFromJSONTyped, EnumRuntimeEnvironmentToJSON, EnumTaskType, EnumTaskTypeFromJSON, EnumTaskTypeFromJSONTyped, EnumTaskTypeToJSON, GitCloneDetails, GitCloneDetailsFromJSON, GitCloneDetailsFromJSONTyped, GitCloneDetailsToJSON, ReqBaseTask, ReqBaseTaskFromJSON, ReqBaseTaskFromJSONTyped, ReqBaseTaskToJSON, ReqFunctionTaskAllOf, ReqFunctionTaskAllOfFromJSON, ReqFunctionTaskAllOfFromJSONTyped, ReqFunctionTaskAllOfToJSON, SpecWithValue, SpecWithValueFromJSON, SpecWithValueFromJSONTyped, SpecWithValueToJSON, TaskDependency, TaskDependencyFromJSON, TaskDependencyFromJSONTyped, TaskDependencyToJSON, TaskExecutionProfile, TaskExecutionProfileFromJSON, TaskExecutionProfileFromJSONTyped, TaskExecutionProfileToJSON, } from './'; /** * * @export * @interface ReqFunctionTask */ export interface ReqFunctionTask { /** * * @type {string} * @memberof ReqFunctionTask */ id: string; /** * * @type {EnumTaskType} * @memberof ReqFunctionTask */ type: EnumTaskType; /** * * @type {Array} * @memberof ReqFunctionTask */ depends_on?: Array; /** * * @type {string} * @memberof ReqFunctionTask */ description?: string; /** * * @type {TaskExecutionProfile} * @memberof ReqFunctionTask */ execution_profile?: TaskExecutionProfile; /** * * @type {{ [key: string]: SpecWithValue; }} * @memberof ReqFunctionTask */ input?: { [key: string]: SpecWithValue; }; /** * * @type {{ [key: string]: object; }} * @memberof ReqFunctionTask */ output?: { [key: string]: object; }; /** * * @type {Array<{ [key: string]: object; }>} * @memberof ReqFunctionTask */ conditions?: Array<{ [key: string]: object; }>; /** * * @type {Array} * @memberof ReqFunctionTask */ tags?: Array; /** * * @type {Array} * @memberof ReqFunctionTask */ git_repositories?: Array; /** * * @type {EnumRuntimeEnvironment} * @memberof ReqFunctionTask */ runtime: EnumRuntimeEnvironment; /** * * @type {EnumInstaller} * @memberof ReqFunctionTask */ installer: EnumInstaller; /** * * @type {string} * @memberof ReqFunctionTask */ command?: string; /** * * @type {string} * @memberof ReqFunctionTask */ entrypoint?: string; /** * * @type {string} * @memberof ReqFunctionTask */ code?: string; /** * * @type {Array} * @memberof ReqFunctionTask */ packages?: Array; } export function ReqFunctionTaskFromJSON(json: any): ReqFunctionTask { return ReqFunctionTaskFromJSONTyped(json, false); } export function ReqFunctionTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqFunctionTask { 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'], 'git_repositories': !exists(json, 'git_repositories') ? undefined : ((json['git_repositories'] as Array).map(GitCloneDetailsFromJSON)), 'runtime': EnumRuntimeEnvironmentFromJSON(json['runtime']), 'installer': EnumInstallerFromJSON(json['installer']), 'command': !exists(json, 'command') ? undefined : json['command'], 'entrypoint': !exists(json, 'entrypoint') ? undefined : json['entrypoint'], 'code': !exists(json, 'code') ? undefined : json['code'], 'packages': !exists(json, 'packages') ? undefined : json['packages'], }; } export function ReqFunctionTaskToJSON(value?: ReqFunctionTask | 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, 'git_repositories': value.git_repositories === undefined ? undefined : ((value.git_repositories as Array).map(GitCloneDetailsToJSON)), 'runtime': EnumRuntimeEnvironmentToJSON(value.runtime), 'installer': EnumInstallerToJSON(value.installer), 'command': value.command, 'entrypoint': value.entrypoint, 'code': value.code, 'packages': value.packages, }; }