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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__DJUNCT_ANONYMIZE_METADATA = Metadata(
    id="b39c604a1cb220842f1bff1090f5403b2eb497f0.boutiques",
    name="@djunct_anonymize",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


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


def v__djunct_anonymize(
    input_: InputPathType,
    add_note: str | None = None,
    copy_to: InputPathType | None = None,
    overwrite: bool = False,
    runner: Runner | None = None,
) -> VDjunctAnonymizeOutputs:
    """
    Helper program to anonymize files.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        input_: Input dataset.
        add_note: Add a note to the history after anonymizing.
        copy_to: Copy the input to a new file, which is then anonymized.
        overwrite: Overwrite the existing file if using -copy_to.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VDjunctAnonymizeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__DJUNCT_ANONYMIZE_METADATA)
    cargs = []
    cargs.append("@djunct_anonymize")
    cargs.append(execution.input_file(input_))
    if add_note is not None:
        cargs.extend([
            "-add_note",
            add_note
        ])
    if copy_to is not None:
        cargs.extend([
            "-copy_to",
            execution.input_file(copy_to)
        ])
    if overwrite:
        cargs.append("-overwrite")
    ret = VDjunctAnonymizeOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VDjunctAnonymizeOutputs",
    "V__DJUNCT_ANONYMIZE_METADATA",
    "v__djunct_anonymize",
]
