# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

UPDATE_NEEDED_METADATA = Metadata(
    id="81ad1ec598b447ced529bab2b15819d597e08ec9.boutiques",
    name="UpdateNeeded",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class UpdateNeededOutputs(typing.NamedTuple):
    """
    Output object returned when calling `update_needed(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def update_needed(
    target_file: InputPathType,
    source_file: InputPathType,
    runner: Runner | None = None,
) -> UpdateNeededOutputs:
    """
    A command-line tool to update a target file based on one or more source files.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        target_file: The target file that needs to be updated.
        source_file: The primary source file for updating the target file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `UpdateNeededOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(UPDATE_NEEDED_METADATA)
    cargs = []
    cargs.append("UpdateNeeded")
    cargs.append(execution.input_file(target_file))
    cargs.append(execution.input_file(source_file))
    cargs.append("[ADDITIONAL_SOURCE_FILES...]")
    ret = UpdateNeededOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "UPDATE_NEEDED_METADATA",
    "UpdateNeededOutputs",
    "update_needed",
]
