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

import typing
import pathlib
from styxdefs import *
import dataclasses

GIFTI_CONVERT_METADATA = Metadata(
    id="1119deb060240b3e26f7bbfea7cf6ac914e82758.boutiques",
    name="gifti-convert",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


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


def gifti_convert(
    gifti_encoding: str,
    input_gifti_file: str,
    output_gifti_file: str,
    runner: Runner | None = None,
) -> GiftiConvertOutputs:
    """
    Convert a gifti file to a different encoding.
    
    The value of <gifti-encoding> must be one of the following:
    
    ASCII
    BASE64_BINARY
    GZIP_BASE64_BINARY
    EXTERNAL_FILE_BINARY.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        gifti_encoding: what the output encoding should be.
        input_gifti_file: the input gifti file.
        output_gifti_file: output - the output gifti file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `GiftiConvertOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(GIFTI_CONVERT_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-gifti-convert")
    cargs.append(gifti_encoding)
    cargs.append(input_gifti_file)
    cargs.append(output_gifti_file)
    ret = GiftiConvertOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "GIFTI_CONVERT_METADATA",
    "GiftiConvertOutputs",
    "gifti_convert",
]
