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

import typing
import pathlib
from styxdefs import *
import dataclasses

FSL_SUB_REPORT_METADATA = Metadata(
    id="ce23ba4c898e3d66ad396a3b3d4a8c8a30299bd7.boutiques",
    name="fsl_sub_report",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


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


def fsl_sub_report(
    job_id: str,
    subjob_id: str | None = None,
    parseable_flag: bool = False,
    runner: Runner | None = None,
) -> FslSubReportOutputs:
    """
    FSL cluster job reporting tool.
    
    Author: Oxford Centre for Functional MRI of the Brain (FMRIB)
    
    Args:
        job_id: Report job details for this job ID.
        subjob_id: Report job details for this subjob ID's only.
        parseable_flag: Include all output '|' separated.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FslSubReportOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FSL_SUB_REPORT_METADATA)
    cargs = []
    cargs.append("fsl_sub_report")
    cargs.append(job_id)
    cargs.append("[SUBJOB_ID_FLAG]")
    if subjob_id is not None:
        cargs.extend([
            "--subjob_id",
            subjob_id
        ])
    if parseable_flag:
        cargs.append("--parseable")
    ret = FslSubReportOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FSL_SUB_REPORT_METADATA",
    "FslSubReportOutputs",
    "fsl_sub_report",
]
