#compdef ocm

autoload -U is-at-least

_ocm() {
    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[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_ocm_commands" \
"*::: :->openvpn-cred-management" \
&& ret=0
    case $state in
    (openvpn-cred-management)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-command-$line[1]:"
        case $line[1] in
            (gen)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_ocm__gen_commands" \
"*::: :->gen" \
&& ret=0

    case $state in
    (gen)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-gen-command-$line[1]:"
        case $line[1] in
            (completion)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::shell -- Specify the shell to generate completion for:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__gen__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-gen-help-command-$line[1]:"
        case $line[1] in
            (completion)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(profile)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_ocm__profile_commands" \
"*::: :->profile" \
&& ret=0

    case $state in
    (profile)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-profile-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__profile__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-profile-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(user)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_ocm__user_commands" \
"*::: :->user" \
&& ret=0

    case $state in
    (user)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-user-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'(-e --expired)-n+[Only show certificates that are a within a specific duration until their expiry]:DURATION:_default' \
'(-e --expired)--near-expiry=[Only show certificates that are a within a specific duration until their expiry]:DURATION:_default' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-e[Only show expired certificates]' \
'--expired[Only show expired certificates]' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'(-e --expired)-n+[Only show certificates that are a within a specific duration until their expiry]:DURATION:_default' \
'(-e --expired)--near-expiry=[Only show certificates that are a within a specific duration until their expiry]:DURATION:_default' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-e[Only show expired certificates]' \
'--expired[Only show expired certificates]' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the certificates to show:_default' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the certificates to show:_default' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the certificates to show:_default' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-d+[The number of days the certificate stays valid]:N:_default' \
'--days=[The number of days the certificate stays valid]:N:_default' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the certificates to generate:_default' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
'-d+[The number of days the certificate stays valid]:N:_default' \
'--days=[The number of days the certificate stays valid]:N:_default' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the certificates to generate:_default' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" : \
'-d+[The number of days the certificate stays valid]:N:_default' \
'--days=[The number of days the certificate stays valid]:N:_default' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the certificates to generate:_default' \
&& ret=0
;;
(renew)
_arguments "${_arguments_options[@]}" : \
'-d+[The number of days the renewed certificate stays valid]:N:_default' \
'--days=[The number of days the renewed certificate stays valid]:N:_default' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-k[Do not revoke the replaced certificates]' \
'--keep-old[Do not revoke the replaced certificates]' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to renew:_default' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to revoke:_default' \
&& ret=0
;;
(rm)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to revoke:_default' \
&& ret=0
;;
(del)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to revoke:_default' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to revoke:_default' \
&& ret=0
;;
(package)
_arguments "${_arguments_options[@]}" : \
'-o+[Output to a directory other than the current working directory]:DIR:_files -/' \
'--output-dir=[Output to a directory other than the current working directory]:DIR:_files -/' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'--add-prefix[Add the profile name as a prefix to the package name]' \
'--pre[Add the profile name as a prefix to the package name]' \
'--keep-temp[Keep temporary intermediate artifacts instead of deleting them. Helpful for debugging]' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to package for:_default' \
&& ret=0
;;
(pkg)
_arguments "${_arguments_options[@]}" : \
'-o+[Output to a directory other than the current working directory]:DIR:_files -/' \
'--output-dir=[Output to a directory other than the current working directory]:DIR:_files -/' \
'-c+[Path to the configuration file]:PATH:_files' \
'--config=[Path to the configuration file]:PATH:_files' \
'-p+[Manually select a profile to operate on]:NAME:_default' \
'--profile=[Manually select a profile to operate on]:NAME:_default' \
'--add-prefix[Add the profile name as a prefix to the package name]' \
'--pre[Add the profile name as a prefix to the package name]' \
'--keep-temp[Keep temporary intermediate artifacts instead of deleting them. Helpful for debugging]' \
'-f[Proceed with potentially destructive actions automatically without confirmation]' \
'--force[Proceed with potentially destructive actions automatically without confirmation]' \
'--no-post-action-scripts[Do not run post-action scripts]' \
'*-v[Increase logging verbosity]' \
'*--verbose[Increase logging verbosity]' \
'(-v --verbose)*-q[Decrease logging verbosity]' \
'(-v --verbose)*--quiet[Decrease logging verbosity]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::usernames -- The usernames of the users to package for:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__user__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-user-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(renew)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(package)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-help-command-$line[1]:"
        case $line[1] in
            (gen)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__help__gen_commands" \
"*::: :->gen" \
&& ret=0

    case $state in
    (gen)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-help-gen-command-$line[1]:"
        case $line[1] in
            (completion)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(profile)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__help__profile_commands" \
"*::: :->profile" \
&& ret=0

    case $state in
    (profile)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-help-profile-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(user)
_arguments "${_arguments_options[@]}" : \
":: :_ocm__help__user_commands" \
"*::: :->user" \
&& ret=0

    case $state in
    (user)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ocm-help-user-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(renew)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(package)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_ocm_commands] )) ||
_ocm_commands() {
    local commands; commands=(
'gen:Generate artefacts like completion scripts and config files' \
'profile:Operations on profiles' \
'user:Operations on users' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm commands' commands "$@"
}
(( $+functions[_ocm__gen_commands] )) ||
_ocm__gen_commands() {
    local commands; commands=(
'completion:Generate shell completion to stdout' \
'config:Initialise a config file' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm gen commands' commands "$@"
}
(( $+functions[_ocm__gen__completion_commands] )) ||
_ocm__gen__completion_commands() {
    local commands; commands=()
    _describe -t commands 'ocm gen completion commands' commands "$@"
}
(( $+functions[_ocm__gen__config_commands] )) ||
_ocm__gen__config_commands() {
    local commands; commands=()
    _describe -t commands 'ocm gen config commands' commands "$@"
}
(( $+functions[_ocm__gen__help_commands] )) ||
_ocm__gen__help_commands() {
    local commands; commands=(
'completion:Generate shell completion to stdout' \
'config:Initialise a config file' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm gen help commands' commands "$@"
}
(( $+functions[_ocm__gen__help__completion_commands] )) ||
_ocm__gen__help__completion_commands() {
    local commands; commands=()
    _describe -t commands 'ocm gen help completion commands' commands "$@"
}
(( $+functions[_ocm__gen__help__config_commands] )) ||
_ocm__gen__help__config_commands() {
    local commands; commands=()
    _describe -t commands 'ocm gen help config commands' commands "$@"
}
(( $+functions[_ocm__gen__help__help_commands] )) ||
_ocm__gen__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'ocm gen help help commands' commands "$@"
}
(( $+functions[_ocm__help_commands] )) ||
_ocm__help_commands() {
    local commands; commands=(
'gen:Generate artefacts like completion scripts and config files' \
'profile:Operations on profiles' \
'user:Operations on users' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm help commands' commands "$@"
}
(( $+functions[_ocm__help__gen_commands] )) ||
_ocm__help__gen_commands() {
    local commands; commands=(
'completion:Generate shell completion to stdout' \
'config:Initialise a config file' \
    )
    _describe -t commands 'ocm help gen commands' commands "$@"
}
(( $+functions[_ocm__help__gen__completion_commands] )) ||
_ocm__help__gen__completion_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help gen completion commands' commands "$@"
}
(( $+functions[_ocm__help__gen__config_commands] )) ||
_ocm__help__gen__config_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help gen config commands' commands "$@"
}
(( $+functions[_ocm__help__help_commands] )) ||
_ocm__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help help commands' commands "$@"
}
(( $+functions[_ocm__help__profile_commands] )) ||
_ocm__help__profile_commands() {
    local commands; commands=(
'list:List all known profiles' \
    )
    _describe -t commands 'ocm help profile commands' commands "$@"
}
(( $+functions[_ocm__help__profile__list_commands] )) ||
_ocm__help__profile__list_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help profile list commands' commands "$@"
}
(( $+functions[_ocm__help__user_commands] )) ||
_ocm__help__user_commands() {
    local commands; commands=(
'list:List all certificates, with optional filtering' \
'info:Show info on the certificates of specified users' \
'new:Generate certificates for new users' \
'renew:Renew certificates for existing users' \
'remove:Revoke the certificates for existing users' \
'package:Create redistributable packages for the specified users' \
    )
    _describe -t commands 'ocm help user commands' commands "$@"
}
(( $+functions[_ocm__help__user__info_commands] )) ||
_ocm__help__user__info_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help user info commands' commands "$@"
}
(( $+functions[_ocm__help__user__list_commands] )) ||
_ocm__help__user__list_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help user list commands' commands "$@"
}
(( $+functions[_ocm__help__user__new_commands] )) ||
_ocm__help__user__new_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help user new commands' commands "$@"
}
(( $+functions[_ocm__help__user__package_commands] )) ||
_ocm__help__user__package_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help user package commands' commands "$@"
}
(( $+functions[_ocm__help__user__remove_commands] )) ||
_ocm__help__user__remove_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help user remove commands' commands "$@"
}
(( $+functions[_ocm__help__user__renew_commands] )) ||
_ocm__help__user__renew_commands() {
    local commands; commands=()
    _describe -t commands 'ocm help user renew commands' commands "$@"
}
(( $+functions[_ocm__profile_commands] )) ||
_ocm__profile_commands() {
    local commands; commands=(
'list:List all known profiles' \
'ls:List all known profiles' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm profile commands' commands "$@"
}
(( $+functions[_ocm__profile__help_commands] )) ||
_ocm__profile__help_commands() {
    local commands; commands=(
'list:List all known profiles' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm profile help commands' commands "$@"
}
(( $+functions[_ocm__profile__help__help_commands] )) ||
_ocm__profile__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'ocm profile help help commands' commands "$@"
}
(( $+functions[_ocm__profile__help__list_commands] )) ||
_ocm__profile__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'ocm profile help list commands' commands "$@"
}
(( $+functions[_ocm__profile__list_commands] )) ||
_ocm__profile__list_commands() {
    local commands; commands=()
    _describe -t commands 'ocm profile list commands' commands "$@"
}
(( $+functions[_ocm__user_commands] )) ||
_ocm__user_commands() {
    local commands; commands=(
'list:List all certificates, with optional filtering' \
'ls:List all certificates, with optional filtering' \
'info:Show info on the certificates of specified users' \
'get:Show info on the certificates of specified users' \
'show:Show info on the certificates of specified users' \
'new:Generate certificates for new users' \
'add:Generate certificates for new users' \
'create:Generate certificates for new users' \
'renew:Renew certificates for existing users' \
'remove:Revoke the certificates for existing users' \
'rm:Revoke the certificates for existing users' \
'del:Revoke the certificates for existing users' \
'delete:Revoke the certificates for existing users' \
'package:Create redistributable packages for the specified users' \
'pkg:Create redistributable packages for the specified users' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm user commands' commands "$@"
}
(( $+functions[_ocm__user__help_commands] )) ||
_ocm__user__help_commands() {
    local commands; commands=(
'list:List all certificates, with optional filtering' \
'info:Show info on the certificates of specified users' \
'new:Generate certificates for new users' \
'renew:Renew certificates for existing users' \
'remove:Revoke the certificates for existing users' \
'package:Create redistributable packages for the specified users' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'ocm user help commands' commands "$@"
}
(( $+functions[_ocm__user__help__help_commands] )) ||
_ocm__user__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help help commands' commands "$@"
}
(( $+functions[_ocm__user__help__info_commands] )) ||
_ocm__user__help__info_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help info commands' commands "$@"
}
(( $+functions[_ocm__user__help__list_commands] )) ||
_ocm__user__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help list commands' commands "$@"
}
(( $+functions[_ocm__user__help__new_commands] )) ||
_ocm__user__help__new_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help new commands' commands "$@"
}
(( $+functions[_ocm__user__help__package_commands] )) ||
_ocm__user__help__package_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help package commands' commands "$@"
}
(( $+functions[_ocm__user__help__remove_commands] )) ||
_ocm__user__help__remove_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help remove commands' commands "$@"
}
(( $+functions[_ocm__user__help__renew_commands] )) ||
_ocm__user__help__renew_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user help renew commands' commands "$@"
}
(( $+functions[_ocm__user__info_commands] )) ||
_ocm__user__info_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user info commands' commands "$@"
}
(( $+functions[_ocm__user__list_commands] )) ||
_ocm__user__list_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user list commands' commands "$@"
}
(( $+functions[_ocm__user__new_commands] )) ||
_ocm__user__new_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user new commands' commands "$@"
}
(( $+functions[_ocm__user__package_commands] )) ||
_ocm__user__package_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user package commands' commands "$@"
}
(( $+functions[_ocm__user__remove_commands] )) ||
_ocm__user__remove_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user remove commands' commands "$@"
}
(( $+functions[_ocm__user__renew_commands] )) ||
_ocm__user__renew_commands() {
    local commands; commands=()
    _describe -t commands 'ocm user renew commands' commands "$@"
}

if [ "$funcstack[1]" = "_ocm" ]; then
    _ocm "$@"
else
    compdef _ocm ocm
fi
