#compdef kanidm

autoload -U is-at-least

_kanidm() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm_commands" \
"*::: :->kanidm_tools" \
&& ret=0
    case $state in
    (kanidm_tools)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-w[]' \
'--webauthn[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-C+[]:CA_PATH: ' \
'--ca=[]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
'::username:' \
&& ret=0
;;
(session)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__session_commands" \
"*::: :->session" \
&& ret=0

    case $state in
    (session)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-session-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(cleanup)
_arguments "${_arguments_options[@]}" \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(self)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__self_commands" \
"*::: :->self" \
&& ret=0

    case $state in
    (self)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-self-command-$line[1]:"
        case $line[1] in
            (whoami)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(set_password)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(account)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account_commands" \
"*::: :->account" \
&& ret=0

    case $state in
    (account)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-command-$line[1]:"
        case $line[1] in
            (credential)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account__credential_commands" \
"*::: :->credential" \
&& ret=0

    case $state in
    (credential)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-credential-command-$line[1]:"
        case $line[1] in
            (update)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(use_reset_token)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':token:' \
&& ret=0
;;
(create_reset_token)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(radius)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account__radius_commands" \
"*::: :->radius" \
&& ret=0

    case $state in
    (radius)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-radius-command-$line[1]:"
        case $line[1] in
            (show_secret)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(generate_secret)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(delete_secret)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(posix)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account__posix_commands" \
"*::: :->posix" \
&& ret=0

    case $state in
    (posix)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-posix-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'--gidnumber=[]:GIDNUMBER: ' \
'--shell=[]:SHELL: ' \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(set_password)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(person)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account__person_commands" \
"*::: :->person" \
&& ret=0

    case $state in
    (person)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-person-command-$line[1]:"
        case $line[1] in
            (extend)
_arguments "${_arguments_options[@]}" \
'*-m+[Set the mail address, can be set multiple times for multiple addresses.]:MAIL: ' \
'*--mail=[Set the mail address, can be set multiple times for multiple addresses.]:MAIL: ' \
'-l+[Set the legal name for the person.]:LEGALNAME: ' \
'--legalname=[Set the legal name for the person.]:LEGALNAME: ' \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'*-m+[Set the mail address, can be set multiple times for multiple addresses.]:MAIL: ' \
'*--mail=[Set the mail address, can be set multiple times for multiple addresses.]:MAIL: ' \
'-l+[Set the legal name for the person.]:LEGALNAME: ' \
'--legalname=[Set the legal name for the person.]:LEGALNAME: ' \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(ssh)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account__ssh_commands" \
"*::: :->ssh" \
&& ret=0

    case $state in
    (ssh)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-ssh-command-$line[1]:"
        case $line[1] in
            (list_publickeys)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(add_publickey)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
':tag:' \
':pubkey:' \
&& ret=0
;;
(delete_publickey)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
':tag:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(list)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
':display_name:' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(validity)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__account__validity_commands" \
"*::: :->validity" \
&& ret=0

    case $state in
    (validity)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-account-validity-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
&& ret=0
;;
(expire_at)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
':datetime -- An rfc3339 time of the format "YYYY-MM-DDTHH\:MM\:SS+TZ", "2020-09-25T11\:22\:02+10\:00" or the word "never", "clear" to remove account expiry:' \
&& ret=0
;;
(begin_from)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':account-id:' \
':datetime -- An rfc3339 time of the format "YYYY-MM-DDTHH\:MM\:SS+TZ", "2020-09-25T11\:22\:02+10\:00" or the word "any", "clear" to remove valid from enforcement:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(group)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__group_commands" \
"*::: :->group" \
&& ret=0

    case $state in
    (group)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-group-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(list_members)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(set_members)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
'*::members:' \
&& ret=0
;;
(purge_members)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(add_members)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
'*::members:' \
&& ret=0
;;
(remove_members)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
'*::members:' \
&& ret=0
;;
(posix)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__group__posix_commands" \
"*::: :->posix" \
&& ret=0

    case $state in
    (posix)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-group-posix-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'--gidnumber=[]:GIDNUMBER: ' \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(system)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__system_commands" \
"*::: :->system" \
&& ret=0

    case $state in
    (system)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-system-command-$line[1]:"
        case $line[1] in
            (oauth2)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__system__oauth2_commands" \
"*::: :->oauth2" \
&& ret=0

    case $state in
    (oauth2)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-system-oauth2-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
':displayname:' \
':origin:' \
&& ret=0
;;
(set_implicit_scopes)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
'*::scopes:' \
&& ret=0
;;
(create_scope_map)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
':group:' \
'*::scopes:' \
&& ret=0
;;
(delete_scope_map)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
':group:' \
&& ret=0
;;
(reset_secrets)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(set_displayname)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
':displayname:' \
&& ret=0
;;
(enable_pkce)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(warning_insecure_client_disable_pkce)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(warning_enable_legacy_crypto)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(disable_legacy_crypto)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(domain)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__system__domain_commands" \
"*::: :->domain" \
&& ret=0

    case $state in
    (domain)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-system-domain-command-$line[1]:"
        case $line[1] in
            (set_domain_display_name)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':new_display_Name:' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(reset_token_key)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(recycle_bin)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__recycle_bin_commands" \
"*::: :->recycle_bin" \
&& ret=0

    case $state in
    (recycle_bin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-recycle_bin-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(revive)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':name:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(raw)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_kanidm__raw_commands" \
"*::: :->raw" \
&& ret=0

    case $state in
    (raw)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kanidm-raw-command-$line[1]:"
        case $line[1] in
            (search)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':filter:' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':file:' \
&& ret=0
;;
(modify)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':filter:' \
':file:' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'-H+[]:ADDR: ' \
'--url=[]:ADDR: ' \
'-D+[User which will initiate requests]:USERNAME: ' \
'--name=[User which will initiate requests]:USERNAME: ' \
'-C+[Path to a CA certificate file]:CA_PATH: ' \
'--ca=[Path to a CA certificate file]:CA_PATH: ' \
'-d[]' \
'--debug[]' \
'-h[Print help information]' \
'--help[Print help information]' \
':filter:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_kanidm_commands] )) ||
_kanidm_commands() {
    local commands; commands=(
'login:Login to an account to use with future cli operations' \
'logout:Logout of an active cli session' \
'session:Manage active cli sessions' \
'self:Actions for the current authenticated account' \
'account:Account operations' \
'group:Group operations' \
'system:System configuration operations' \
'recycle_bin:Recycle Bin operations' \
'raw:Unsafe - low level, raw database operations' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm commands' commands "$@"
}
(( $+functions[_kanidm__account_commands] )) ||
_kanidm__account_commands() {
    local commands; commands=(
'credential:' \
'radius:RADIUS secret management' \
'posix:' \
'person:' \
'ssh:' \
'list:' \
'get:' \
'create:' \
'delete:' \
'validity:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account commands' commands "$@"
}
(( $+functions[_kanidm__group__add_members_commands] )) ||
_kanidm__group__add_members_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group add_members commands' commands "$@"
}
(( $+functions[_kanidm__account__ssh__add_publickey_commands] )) ||
_kanidm__account__ssh__add_publickey_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account ssh add_publickey commands' commands "$@"
}
(( $+functions[_kanidm__account__validity__begin_from_commands] )) ||
_kanidm__account__validity__begin_from_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account validity begin_from commands' commands "$@"
}
(( $+functions[_kanidm__session__cleanup_commands] )) ||
_kanidm__session__cleanup_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm session cleanup commands' commands "$@"
}
(( $+functions[_kanidm__account__create_commands] )) ||
_kanidm__account__create_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account create commands' commands "$@"
}
(( $+functions[_kanidm__group__create_commands] )) ||
_kanidm__group__create_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group create commands' commands "$@"
}
(( $+functions[_kanidm__raw__create_commands] )) ||
_kanidm__raw__create_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm raw create commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__create_commands] )) ||
_kanidm__system__oauth2__create_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 create commands' commands "$@"
}
(( $+functions[_kanidm__account__credential__create_reset_token_commands] )) ||
_kanidm__account__credential__create_reset_token_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account credential create_reset_token commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__create_scope_map_commands] )) ||
_kanidm__system__oauth2__create_scope_map_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 create_scope_map commands' commands "$@"
}
(( $+functions[_kanidm__account__credential_commands] )) ||
_kanidm__account__credential_commands() {
    local commands; commands=(
'update:Interactively update/change the credentials for an account' \
'use_reset_token:Using a reset token, interactively reset credentials for a user' \
'create_reset_token:Create a reset token that can be given to another person so they can recover or reset their account credentials' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account credential commands' commands "$@"
}
(( $+functions[_kanidm__account__delete_commands] )) ||
_kanidm__account__delete_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account delete commands' commands "$@"
}
(( $+functions[_kanidm__group__delete_commands] )) ||
_kanidm__group__delete_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group delete commands' commands "$@"
}
(( $+functions[_kanidm__raw__delete_commands] )) ||
_kanidm__raw__delete_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm raw delete commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__delete_commands] )) ||
_kanidm__system__oauth2__delete_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 delete commands' commands "$@"
}
(( $+functions[_kanidm__account__ssh__delete_publickey_commands] )) ||
_kanidm__account__ssh__delete_publickey_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account ssh delete_publickey commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__delete_scope_map_commands] )) ||
_kanidm__system__oauth2__delete_scope_map_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 delete_scope_map commands' commands "$@"
}
(( $+functions[_kanidm__account__radius__delete_secret_commands] )) ||
_kanidm__account__radius__delete_secret_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account radius delete_secret commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__disable_legacy_crypto_commands] )) ||
_kanidm__system__oauth2__disable_legacy_crypto_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 disable_legacy_crypto commands' commands "$@"
}
(( $+functions[_kanidm__system__domain_commands] )) ||
_kanidm__system__domain_commands() {
    local commands; commands=(
'set_domain_display_name:Set the domain display name' \
'show:Show information about this system'\''s domain' \
'reset_token_key:Reset this domain token signing key. This will cause all user sessions to be invalidated (logged out)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm system domain commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__enable_pkce_commands] )) ||
_kanidm__system__oauth2__enable_pkce_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 enable_pkce commands' commands "$@"
}
(( $+functions[_kanidm__account__validity__expire_at_commands] )) ||
_kanidm__account__validity__expire_at_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account validity expire_at commands' commands "$@"
}
(( $+functions[_kanidm__account__person__extend_commands] )) ||
_kanidm__account__person__extend_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account person extend commands' commands "$@"
}
(( $+functions[_kanidm__account__radius__generate_secret_commands] )) ||
_kanidm__account__radius__generate_secret_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account radius generate_secret commands' commands "$@"
}
(( $+functions[_kanidm__account__get_commands] )) ||
_kanidm__account__get_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account get commands' commands "$@"
}
(( $+functions[_kanidm__group__get_commands] )) ||
_kanidm__group__get_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group get commands' commands "$@"
}
(( $+functions[_kanidm__recycle_bin__get_commands] )) ||
_kanidm__recycle_bin__get_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm recycle_bin get commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__get_commands] )) ||
_kanidm__system__oauth2__get_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 get commands' commands "$@"
}
(( $+functions[_kanidm__group_commands] )) ||
_kanidm__group_commands() {
    local commands; commands=(
'list:' \
'get:' \
'create:' \
'delete:' \
'list_members:' \
'set_members:' \
'purge_members:' \
'add_members:' \
'remove_members:' \
'posix:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm group commands' commands "$@"
}
(( $+functions[_kanidm__account__credential__help_commands] )) ||
_kanidm__account__credential__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account credential help commands' commands "$@"
}
(( $+functions[_kanidm__account__help_commands] )) ||
_kanidm__account__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account help commands' commands "$@"
}
(( $+functions[_kanidm__account__person__help_commands] )) ||
_kanidm__account__person__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account person help commands' commands "$@"
}
(( $+functions[_kanidm__account__posix__help_commands] )) ||
_kanidm__account__posix__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account posix help commands' commands "$@"
}
(( $+functions[_kanidm__account__radius__help_commands] )) ||
_kanidm__account__radius__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account radius help commands' commands "$@"
}
(( $+functions[_kanidm__account__ssh__help_commands] )) ||
_kanidm__account__ssh__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account ssh help commands' commands "$@"
}
(( $+functions[_kanidm__account__validity__help_commands] )) ||
_kanidm__account__validity__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account validity help commands' commands "$@"
}
(( $+functions[_kanidm__group__help_commands] )) ||
_kanidm__group__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group help commands' commands "$@"
}
(( $+functions[_kanidm__group__posix__help_commands] )) ||
_kanidm__group__posix__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group posix help commands' commands "$@"
}
(( $+functions[_kanidm__help_commands] )) ||
_kanidm__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm help commands' commands "$@"
}
(( $+functions[_kanidm__raw__help_commands] )) ||
_kanidm__raw__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm raw help commands' commands "$@"
}
(( $+functions[_kanidm__recycle_bin__help_commands] )) ||
_kanidm__recycle_bin__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm recycle_bin help commands' commands "$@"
}
(( $+functions[_kanidm__self__help_commands] )) ||
_kanidm__self__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm self help commands' commands "$@"
}
(( $+functions[_kanidm__session__help_commands] )) ||
_kanidm__session__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm session help commands' commands "$@"
}
(( $+functions[_kanidm__system__domain__help_commands] )) ||
_kanidm__system__domain__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system domain help commands' commands "$@"
}
(( $+functions[_kanidm__system__help_commands] )) ||
_kanidm__system__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system help commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__help_commands] )) ||
_kanidm__system__oauth2__help_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 help commands' commands "$@"
}
(( $+functions[_kanidm__account__list_commands] )) ||
_kanidm__account__list_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account list commands' commands "$@"
}
(( $+functions[_kanidm__group__list_commands] )) ||
_kanidm__group__list_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group list commands' commands "$@"
}
(( $+functions[_kanidm__recycle_bin__list_commands] )) ||
_kanidm__recycle_bin__list_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm recycle_bin list commands' commands "$@"
}
(( $+functions[_kanidm__session__list_commands] )) ||
_kanidm__session__list_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm session list commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__list_commands] )) ||
_kanidm__system__oauth2__list_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 list commands' commands "$@"
}
(( $+functions[_kanidm__group__list_members_commands] )) ||
_kanidm__group__list_members_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group list_members commands' commands "$@"
}
(( $+functions[_kanidm__account__ssh__list_publickeys_commands] )) ||
_kanidm__account__ssh__list_publickeys_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account ssh list_publickeys commands' commands "$@"
}
(( $+functions[_kanidm__login_commands] )) ||
_kanidm__login_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm login commands' commands "$@"
}
(( $+functions[_kanidm__logout_commands] )) ||
_kanidm__logout_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm logout commands' commands "$@"
}
(( $+functions[_kanidm__raw__modify_commands] )) ||
_kanidm__raw__modify_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm raw modify commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2_commands] )) ||
_kanidm__system__oauth2_commands() {
    local commands; commands=(
'list:List all configured oauth2 resource servers' \
'get:Display a selected oauth2 resource server' \
'create:Create a new oauth2 resource server' \
'set_implicit_scopes:Set the list of scopes that are granted to all valid accounts' \
'create_scope_map:Add a new mapping from a group to what scopes it provides' \
'delete_scope_map:Remove a mapping from groups to scopes' \
'reset_secrets:Reset the secrets associated to this resource server' \
'delete:Delete a oauth2 resource server' \
'set_displayname:Set a new displayname for a resource server' \
'enable_pkce:Enable PKCE on this oauth2 resource server. This defaults to being enabled' \
'warning_insecure_client_disable_pkce:Disable PKCE on this oauth2 resource server to work around insecure clients that may not support it. You should request the client to enable PKCE!' \
'warning_enable_legacy_crypto:Enable legacy signing crypto on this oauth2 resource server. This defaults to being disabled. You only need to enable this for openid clients that do not support modern crytopgraphic operations' \
'disable_legacy_crypto:Disable legacy signing crypto on this oauth2 resource server. This is the default' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm system oauth2 commands' commands "$@"
}
(( $+functions[_kanidm__account__person_commands] )) ||
_kanidm__account__person_commands() {
    local commands; commands=(
'extend:' \
'set:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account person commands' commands "$@"
}
(( $+functions[_kanidm__account__posix_commands] )) ||
_kanidm__account__posix_commands() {
    local commands; commands=(
'show:' \
'set:' \
'set_password:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account posix commands' commands "$@"
}
(( $+functions[_kanidm__group__posix_commands] )) ||
_kanidm__group__posix_commands() {
    local commands; commands=(
'show:' \
'set:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm group posix commands' commands "$@"
}
(( $+functions[_kanidm__group__purge_members_commands] )) ||
_kanidm__group__purge_members_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group purge_members commands' commands "$@"
}
(( $+functions[_kanidm__account__radius_commands] )) ||
_kanidm__account__radius_commands() {
    local commands; commands=(
'show_secret:Show the RADIUS secret for a user' \
'generate_secret:Generate a randomized RADIUS secret for a user' \
'delete_secret:Remove the configured RADIUS secret for the user' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account radius commands' commands "$@"
}
(( $+functions[_kanidm__raw_commands] )) ||
_kanidm__raw_commands() {
    local commands; commands=(
'search:' \
'create:' \
'modify:' \
'delete:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm raw commands' commands "$@"
}
(( $+functions[_kanidm__recycle_bin_commands] )) ||
_kanidm__recycle_bin_commands() {
    local commands; commands=(
'list:List objects that are in the recycle bin' \
'get:Display an object from the recycle bin' \
'revive:Revive a recycled object into a live (accessible) state - this is the opposite of "delete"' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm recycle_bin commands' commands "$@"
}
(( $+functions[_kanidm__group__remove_members_commands] )) ||
_kanidm__group__remove_members_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group remove_members commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__reset_secrets_commands] )) ||
_kanidm__system__oauth2__reset_secrets_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 reset_secrets commands' commands "$@"
}
(( $+functions[_kanidm__system__domain__reset_token_key_commands] )) ||
_kanidm__system__domain__reset_token_key_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system domain reset_token_key commands' commands "$@"
}
(( $+functions[_kanidm__recycle_bin__revive_commands] )) ||
_kanidm__recycle_bin__revive_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm recycle_bin revive commands' commands "$@"
}
(( $+functions[_kanidm__raw__search_commands] )) ||
_kanidm__raw__search_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm raw search commands' commands "$@"
}
(( $+functions[_kanidm__self_commands] )) ||
_kanidm__self_commands() {
    local commands; commands=(
'whoami:Show the current authenticated user'\''s identity' \
'set_password:Set the current user'\''s password' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm self commands' commands "$@"
}
(( $+functions[_kanidm__session_commands] )) ||
_kanidm__session_commands() {
    local commands; commands=(
'list:List current active sessions' \
'cleanup:Remove sessions that have expired or are invalid' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm session commands' commands "$@"
}
(( $+functions[_kanidm__account__person__set_commands] )) ||
_kanidm__account__person__set_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account person set commands' commands "$@"
}
(( $+functions[_kanidm__account__posix__set_commands] )) ||
_kanidm__account__posix__set_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account posix set commands' commands "$@"
}
(( $+functions[_kanidm__group__posix__set_commands] )) ||
_kanidm__group__posix__set_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group posix set commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__set_displayname_commands] )) ||
_kanidm__system__oauth2__set_displayname_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 set_displayname commands' commands "$@"
}
(( $+functions[_kanidm__system__domain__set_domain_display_name_commands] )) ||
_kanidm__system__domain__set_domain_display_name_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system domain set_domain_display_name commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__set_implicit_scopes_commands] )) ||
_kanidm__system__oauth2__set_implicit_scopes_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 set_implicit_scopes commands' commands "$@"
}
(( $+functions[_kanidm__group__set_members_commands] )) ||
_kanidm__group__set_members_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group set_members commands' commands "$@"
}
(( $+functions[_kanidm__account__posix__set_password_commands] )) ||
_kanidm__account__posix__set_password_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account posix set_password commands' commands "$@"
}
(( $+functions[_kanidm__self__set_password_commands] )) ||
_kanidm__self__set_password_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm self set_password commands' commands "$@"
}
(( $+functions[_kanidm__account__posix__show_commands] )) ||
_kanidm__account__posix__show_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account posix show commands' commands "$@"
}
(( $+functions[_kanidm__account__validity__show_commands] )) ||
_kanidm__account__validity__show_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account validity show commands' commands "$@"
}
(( $+functions[_kanidm__group__posix__show_commands] )) ||
_kanidm__group__posix__show_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm group posix show commands' commands "$@"
}
(( $+functions[_kanidm__system__domain__show_commands] )) ||
_kanidm__system__domain__show_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system domain show commands' commands "$@"
}
(( $+functions[_kanidm__account__radius__show_secret_commands] )) ||
_kanidm__account__radius__show_secret_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account radius show_secret commands' commands "$@"
}
(( $+functions[_kanidm__account__ssh_commands] )) ||
_kanidm__account__ssh_commands() {
    local commands; commands=(
'list_publickeys:' \
'add_publickey:' \
'delete_publickey:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account ssh commands' commands "$@"
}
(( $+functions[_kanidm__system_commands] )) ||
_kanidm__system_commands() {
    local commands; commands=(
'oauth2:Configure and display oauth2/oidc resource server configuration' \
'domain:Configure and display domain configuration' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm system commands' commands "$@"
}
(( $+functions[_kanidm__account__credential__update_commands] )) ||
_kanidm__account__credential__update_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account credential update commands' commands "$@"
}
(( $+functions[_kanidm__account__credential__use_reset_token_commands] )) ||
_kanidm__account__credential__use_reset_token_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm account credential use_reset_token commands' commands "$@"
}
(( $+functions[_kanidm__account__validity_commands] )) ||
_kanidm__account__validity_commands() {
    local commands; commands=(
'show:' \
'expire_at:' \
'begin_from:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kanidm account validity commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__warning_enable_legacy_crypto_commands] )) ||
_kanidm__system__oauth2__warning_enable_legacy_crypto_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 warning_enable_legacy_crypto commands' commands "$@"
}
(( $+functions[_kanidm__system__oauth2__warning_insecure_client_disable_pkce_commands] )) ||
_kanidm__system__oauth2__warning_insecure_client_disable_pkce_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm system oauth2 warning_insecure_client_disable_pkce commands' commands "$@"
}
(( $+functions[_kanidm__self__whoami_commands] )) ||
_kanidm__self__whoami_commands() {
    local commands; commands=()
    _describe -t commands 'kanidm self whoami commands' commands "$@"
}

_kanidm "$@"
