#compdef ifstatecli

# AUTOMATICALLY GENERATED by `shtab`


_shtab_ifstatecli_commands() {
  local _commands=(
    "apply:"
    "check:"
    "identify:"
    "shell:"
    "show:"
    "showall:"
    "validate:"
    "vrrp:"
    "vrrp-fifo:"
    "vrrp-worker:"
  )
  _describe 'ifstatecli commands' _commands
}

_shtab_ifstatecli_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "(- : *)--version[show program\'s version number and exit]"
  "*"{-v,--verbose}"[be more verbose (twice for very verbose)]"
  {-q,--quiet}"[be more quiet, print only warnings and errors]"
  {-s,--soft-schema}"[ignore schema validation errors, expect ifstatecli to trigger internal exceptions]"
  {-S,--show-secrets}"[show secrets when dumping config]"
  {-c,--config}"[configuration YaML filename]:config:_files"
)

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

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

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

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

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

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

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

_shtab_ifstatecli_vrrp_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  ":type of vrrp notification:(group instance)"
  ":name of the vrrp group or instance:"
  ":the new state for the vrrp group or instance:(backup backup_priority fault master master_priority stop unknown master_rx_lower_pri)"
  ":type of vrrp notification:(group instance)"
  ":the new state for the vrrp group or instance:(backup backup_priority fault master master_priority stop unknown master_rx_lower_pri)"
)

_shtab_ifstatecli_vrrp_fifo_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  ":named FIFO to read state changes from:"
)

_shtab_ifstatecli_vrrp_worker_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  ":type of vrrp notification:(group instance)"
  ":name of the vrrp group or instance:"
  ":type of vrrp notification:(group instance)"
)


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

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

  case $state in
    ifstatecli)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_ifstatecli-$line[1]:"
      case $line[1] in
        apply) _arguments -C -s $_shtab_ifstatecli_apply_options ;;
        check) _arguments -C -s $_shtab_ifstatecli_check_options ;;
        identify) _arguments -C -s $_shtab_ifstatecli_identify_options ;;
        shell) _arguments -C -s $_shtab_ifstatecli_shell_options ;;
        show) _arguments -C -s $_shtab_ifstatecli_show_options ;;
        showall) _arguments -C -s $_shtab_ifstatecli_showall_options ;;
        validate) _arguments -C -s $_shtab_ifstatecli_validate_options ;;
        vrrp) _arguments -C -s $_shtab_ifstatecli_vrrp_options ;;
        vrrp-fifo) _arguments -C -s $_shtab_ifstatecli_vrrp_fifo_options ;;
        vrrp-worker) _arguments -C -s $_shtab_ifstatecli_vrrp_worker_options ;;
      esac
  esac
}



typeset -A opt_args

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

