#compdef inductiva

# AUTOMATICALLY GENERATED by `shtab`


_shtab_inductiva_commands() {
  local _commands=(
    "autocomplete:Controls the autocomplete behavior for the inductiva package."
    "logs:Stream the STDOUT of a running task."
    "projects:Projects management utilities."
    "quotas:Quotas management utilities."
    "resources:Computational resource management utilities."
    "simulators:Information about available simulators."
    "storage:Remote storage management utilities."
    "tasks:Task management utilities."
    "user:User management utilities."
  )
  _describe 'inductiva commands' _commands
}

_shtab_inductiva_autocomplete_commands() {
  local _commands=(
    "enable:Enables autocomplete for shell commands."
  )
  _describe 'inductiva autocomplete commands' _commands
}

_shtab_inductiva_projects_commands() {
  local _commands=(
    "download:The \`inductiva projects download\` command provides a way to download the tasks files of your projects."
    "list:The \`inductiva projects list\` command provides an overview of your projects."
    "ls:The \`inductiva projects list\` command provides an overview of your projects."
  )
  _describe 'inductiva projects commands' _commands
}

_shtab_inductiva_quotas_commands() {
  local _commands=(
    "list:The \`inductiva quotas list\` command provides an overview of your quotas."
  )
  _describe 'inductiva quotas commands' _commands
}

_shtab_inductiva_resources_commands() {
  local _commands=(
    "available:The \`inductiva available\` command provides a utility for listing the"
    "cost:The \`inductiva cost\` command provides a utility for estimating the cost"
    "list:The \`inductiva resources list\` command provides a snapshot of your active computational resources."
    "ls:The \`inductiva resources list\` command provides a snapshot of your active computational resources."
    "terminate:The \`inductiva resources terminate\` command provides a utility for terminating"
  )
  _describe 'inductiva resources commands' _commands
}

_shtab_inductiva_simulators_commands() {
  local _commands=(
    "list:The \`list\` sub-command lists all available simulators and"
    "ls:The \`list\` sub-command lists all available simulators and"
  )
  _describe 'inductiva simulators commands' _commands
}

_shtab_inductiva_storage_commands() {
  local _commands=(
    "list:The \`inductiva storage list\` command provides an overview of your data on the platform."
    "ls:The \`inductiva storage list\` command provides an overview of your data on the platform."
    "remove:The \`inductiva storage remove\` command deletes specified data from the platform."
    "rm:The \`inductiva storage remove\` command deletes specified data from the platform."
    "size:The \`inductiva storage size\` command calculates the total size of your data on the platform."
  )
  _describe 'inductiva storage commands' _commands
}

_shtab_inductiva_tasks_commands() {
  local _commands=(
    "download:Download the output files produced in the context of the tasks with"
    "info:The \`inductiva tasks info\` command provides an extensive list of information about a task."
    "kill:The \`inductiva tasks kill\` command terminates specified tasks on the platform."
    "list:The \`inductiva tasks list\` command provides an overview of your tasks on the platform."
  )
  _describe 'inductiva tasks commands' _commands
}

_shtab_inductiva_user_commands() {
  local _commands=(
    "info:The \`inductiva user info\` command provides an overview of your tier, campaigns and credits."
  )
  _describe 'inductiva user commands' _commands
}

_shtab_inductiva_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "(- : *)"{-V,--version}"[show program\'s version number and exit]"
  "--api-key[API key to use. If not provided, it will be read from the INDUCTIVA_API_KEY environment variable.]:api_key:"
)

_shtab_inductiva_autocomplete_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_autocomplete_enable_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--shell[The shell used. Must be zsh]:shell:(zsh)"
)

_shtab_inductiva_logs_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--stdout[Consumes the standard output stream of the task.]"
  "--stderr[Consumes the standard error stream of the task.]"
  "--no-color[Disables the colorized output.]"
  ":Mode of log retrieval. Use \'SUBMITTED\' for the last submitted task, \'SUBMITTED-1\' for the second last submitted task, and so on. \'STARTED\' and \'STARTED-n\' follow the same pattern for started tasks. Or, use a specific \'task_id\' to retrieve logs for a particular task.:"
)

_shtab_inductiva_projects_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_projects_download_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--output-dir[Directory to save the downloaded files.]:output_dir:"
  "--files[Downloads the specified files from every task in the project.]:files:"
  "--std[Downloads the standard output and error files.]"
  ":Name of the project to download.:"
)

_shtab_inductiva_projects_list_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
)

_shtab_inductiva_projects_ls_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
)

_shtab_inductiva_quotas_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_quotas_list_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
)

_shtab_inductiva_resources_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_resources_available_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-p,--provider}"[Filter the available types by provider.]:provider:(GCP ICE LOCAL)"
  {-f,--family}"[Filter the available types by CPU series.]:family:"
)

_shtab_inductiva_resources_cost_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--spot[Type of machine to launch.]"
  {-n,--num_machines}"[Number of machines to launch.]:num_machines:"
  ":Type of machine to launch.:"
)

_shtab_inductiva_resources_list_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
)

_shtab_inductiva_resources_ls_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
)

_shtab_inductiva_resources_terminate_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-y,--yes}"[Sets any confirmation values to \"yes\" automatically. Users will not be asked for confirmation to terminate resource(s).]"
  "--all[Terminate all machines.]"
  "(*)::Name(s) of the resource(s) to terminate.:"
)

_shtab_inductiva_simulators_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_simulators_list_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--dev[include development versions of the simulators.]"
)

_shtab_inductiva_simulators_ls_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--dev[include development versions of the simulators.]"
)

_shtab_inductiva_storage_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_storage_list_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-m,--max-results}"[]:max_results:"
  {-o,--order-by}"[Order by creation_time or size.]:order_by:(creation_time size)"
  {-s,--sort-order}"[Sorting order (desc or asc).]:sort_order:(desc asc)"
  ":path:"
)

_shtab_inductiva_storage_ls_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-m,--max-results}"[]:max_results:"
  {-o,--order-by}"[Order by creation_time or size.]:order_by:(creation_time size)"
  {-s,--sort-order}"[Sorting order (desc or asc).]:sort_order:(desc asc)"
  ":path:"
)

_shtab_inductiva_storage_remove_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-y,--yes}"[Sets any confirmation values to \"yes\" automatically. Users will not be asked for confirmation to remove path(s) from remote storage.]"
  "--all[Remove all contents from remote storage.]"
  "(*)::Path(s) to be removed from remote storage. To remove all contents, use \"\*\".:"
)

_shtab_inductiva_storage_rm_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-y,--yes}"[Sets any confirmation values to \"yes\" automatically. Users will not be asked for confirmation to remove path(s) from remote storage.]"
  "--all[Remove all contents from remote storage.]"
  "(*)::Path(s) to be removed from remote storage. To remove all contents, use \"\*\".:"
)

_shtab_inductiva_storage_size_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_tasks_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_tasks_download_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "--filenames[Names of the files to download.]:filenames:"
  "--output_dir[Path of where to download the task outputs.]:output_dir:"
  "(*)::ID(s) of the task(s) to download.:"
)

_shtab_inductiva_tasks_info_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
  ":ID of the task to get information about.:"
)

_shtab_inductiva_tasks_kill_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--wait-timeout}"[Number of seconds to wait for the kill command. If not provided, the system sends the request without waiting a response.]:wait_timeout:"
  {-y,--yes}"[Skip kill confirmation.]"
  "--all[Kill all running tasks.]"
  "(*)::ID(s) of the task(s) to kill.:"
)

_shtab_inductiva_tasks_list_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
  {-n,--last-n}"[List last N tasks. Default\: 10.]:last_n:"
  {-a,--all}"[List all tasks.]"
  {-i,--id}"[List a task with a specific ID.]:task_id:"
  {-p,--project-name}"[List the tasks of a project.]:project_name:"
)

_shtab_inductiva_user_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
)

_shtab_inductiva_user_info_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  {-w,--watch}"[Prompt the command every N seconds.]:watch:"
)


_shtab_inductiva() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_options+=(': :_shtab_inductiva_commands' '*::: :->inductiva')
  fi
  _arguments -C -s $_shtab_inductiva_options

  case $state in
    inductiva)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva-$line[1]:"
      case $line[1] in
        autocomplete) _shtab_inductiva_autocomplete ;;
        logs) _arguments -C -s $_shtab_inductiva_logs_options ;;
        projects) _shtab_inductiva_projects ;;
        quotas) _shtab_inductiva_quotas ;;
        resources) _shtab_inductiva_resources ;;
        simulators) _shtab_inductiva_simulators ;;
        storage) _shtab_inductiva_storage ;;
        tasks) _shtab_inductiva_tasks ;;
        user) _shtab_inductiva_user ;;
      esac
  esac
}

_shtab_inductiva_autocomplete() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_autocomplete_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_autocomplete_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_autocomplete_options+=(': :_shtab_inductiva_autocomplete_commands' '*::: :->autocomplete')
  fi
  _arguments -C -s $_shtab_inductiva_autocomplete_options

  case $state in
    autocomplete)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_autocomplete-$line[1]:"
      case $line[1] in
        enable) _arguments -C -s $_shtab_inductiva_autocomplete_enable_options ;;
      esac
  esac
}

_shtab_inductiva_projects() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_projects_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_projects_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_projects_options+=(': :_shtab_inductiva_projects_commands' '*::: :->projects')
  fi
  _arguments -C -s $_shtab_inductiva_projects_options

  case $state in
    projects)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_projects-$line[1]:"
      case $line[1] in
        download) _arguments -C -s $_shtab_inductiva_projects_download_options ;;
        list) _arguments -C -s $_shtab_inductiva_projects_list_options ;;
        ls) _arguments -C -s $_shtab_inductiva_projects_ls_options ;;
      esac
  esac
}

_shtab_inductiva_quotas() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_quotas_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_quotas_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_quotas_options+=(': :_shtab_inductiva_quotas_commands' '*::: :->quotas')
  fi
  _arguments -C -s $_shtab_inductiva_quotas_options

  case $state in
    quotas)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_quotas-$line[1]:"
      case $line[1] in
        list) _arguments -C -s $_shtab_inductiva_quotas_list_options ;;
      esac
  esac
}

_shtab_inductiva_resources() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_resources_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_resources_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_resources_options+=(': :_shtab_inductiva_resources_commands' '*::: :->resources')
  fi
  _arguments -C -s $_shtab_inductiva_resources_options

  case $state in
    resources)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_resources-$line[1]:"
      case $line[1] in
        available) _arguments -C -s $_shtab_inductiva_resources_available_options ;;
        cost) _arguments -C -s $_shtab_inductiva_resources_cost_options ;;
        list) _arguments -C -s $_shtab_inductiva_resources_list_options ;;
        ls) _arguments -C -s $_shtab_inductiva_resources_ls_options ;;
        terminate) _arguments -C -s $_shtab_inductiva_resources_terminate_options ;;
      esac
  esac
}

_shtab_inductiva_simulators() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_simulators_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_simulators_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_simulators_options+=(': :_shtab_inductiva_simulators_commands' '*::: :->simulators')
  fi
  _arguments -C -s $_shtab_inductiva_simulators_options

  case $state in
    simulators)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_simulators-$line[1]:"
      case $line[1] in
        list) _arguments -C -s $_shtab_inductiva_simulators_list_options ;;
        ls) _arguments -C -s $_shtab_inductiva_simulators_ls_options ;;
      esac
  esac
}

_shtab_inductiva_storage() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_storage_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_storage_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_storage_options+=(': :_shtab_inductiva_storage_commands' '*::: :->storage')
  fi
  _arguments -C -s $_shtab_inductiva_storage_options

  case $state in
    storage)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_storage-$line[1]:"
      case $line[1] in
        list) _arguments -C -s $_shtab_inductiva_storage_list_options ;;
        ls) _arguments -C -s $_shtab_inductiva_storage_ls_options ;;
        remove) _arguments -C -s $_shtab_inductiva_storage_remove_options ;;
        rm) _arguments -C -s $_shtab_inductiva_storage_rm_options ;;
        size) _arguments -C -s $_shtab_inductiva_storage_size_options ;;
      esac
  esac
}

_shtab_inductiva_tasks() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_tasks_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_tasks_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_tasks_options+=(': :_shtab_inductiva_tasks_commands' '*::: :->tasks')
  fi
  _arguments -C -s $_shtab_inductiva_tasks_options

  case $state in
    tasks)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_tasks-$line[1]:"
      case $line[1] in
        download) _arguments -C -s $_shtab_inductiva_tasks_download_options ;;
        info) _arguments -C -s $_shtab_inductiva_tasks_info_options ;;
        kill) _arguments -C -s $_shtab_inductiva_tasks_kill_options ;;
        list) _arguments -C -s $_shtab_inductiva_tasks_list_options ;;
      esac
  esac
}

_shtab_inductiva_user() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_inductiva_user_options[(I)${(q)one_or_more}*]} + ${_shtab_inductiva_user_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_inductiva_user_options+=(': :_shtab_inductiva_user_commands' '*::: :->user')
  fi
  _arguments -C -s $_shtab_inductiva_user_options

  case $state in
    user)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_inductiva_user-$line[1]:"
      case $line[1] in
        info) _arguments -C -s $_shtab_inductiva_user_info_options ;;
      esac
  esac
}



typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
  # eval/source/. command, register function for later
  compdef _shtab_inductiva -N inductiva
else
  # autoload from fpath, call function directly
  _shtab_inductiva "$@"
fi

