#compdef hypothesis

autoload -U is-at-least

_hypothesis() {
    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]' \
'--help[Print help]' \
":: :_hypothesis_commands" \
"*::: :->hypothesis-client" \
&& ret=0
    case $state in
    (hypothesis-client)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-command-$line[1]:"
        case $line[1] in
            (annotations)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_hypothesis__annotations_commands" \
"*::: :->annotations" \
&& ret=0

    case $state in
    (annotations)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-annotations-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'--text=[Annotation text / comment given by user]:TEXT:_default' \
'*--tags=[Tags attached to the annotation]:TAGS:_default' \
'--group=[The unique identifier for the annotation'\''s group]:GROUP:_default' \
'*--references=[Annotation IDs for any annotations this annotation references (e.g. is a reply to)]:REFERENCES:_default' \
'-o+[write created annotation to this file in JSON format]:FILE:_files' \
'--file=[write created annotation to this file in JSON format]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::uri -- URI that this annotation is attached to:_default' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'--text=[Annotation text / comment given by user]:TEXT:_default' \
'*--tags=[Tags attached to the annotation]:TAGS:_default' \
'--group=[The unique identifier for the annotation'\''s group]:GROUP:_default' \
'*--references=[Annotation IDs for any annotations this annotation references (e.g. is a reply to)]:REFERENCES:_default' \
'-o+[write updated annotation to this file in JSON format]:FILE:_files' \
'--file=[write updated annotation to this file in JSON format]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':id -- unique ID of the annotation to update:_default' \
'::uri -- URI that this annotation is attached to:_default' \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
'--limit=[The maximum number of annotations to return]:LIMIT:_default' \
'--sort=[The field by which annotations should be sorted One of created, updated, id, group, user]:SORT:(created updated id group user)' \
'--search-after=[Example\: "2019-01-03T19\:46\:09.334Z"]:SEARCH_AFTER:_default' \
'--offset=[The number of initial annotations to skip in the result set]:OFFSET:_default' \
'--order=[The order in which the results should be sorted. One of asc, desc]:ORDER:(asc desc)' \
'--uri=[Limit the results to annotations matching the specific URI or equivalent URIs]:URI:_default' \
'--uri-parts=[Limit the results to annotations containing the given keyword (tokenized chunk) in the URI. The value must exactly match an individual URI keyword]:URI_PARTS:_default' \
'--wildcard-uri=[Limit the results to annotations whose URIs match the wildcard pattern]:WILDCARD_URI:_default' \
'--user=[Limit the results to annotations made by the specified user. (in the format \`acct\:<username>@<authority>\`)]:USER:_default' \
'*--group=[Limit the results to annotations made in the specified group (by group ID). This can be specified multiple times to retrieve multiple groups]:GROUP:_default' \
'--tag=[Limit the results to annotations tagged with the specified value]:TAG:_default' \
'*--tags=[Similar to tag but allows a list of multiple tags]:TAGS:_default' \
'--any=[Limit the results to annotations who contain the indicated keyword in any of the following fields\: \`quote\`, \`tags\`, \`text\`, \`url\`]:ANY:_default' \
'--quote=[Limit the results to annotations that contain this text inside the text that was annotated]:QUOTE:_default' \
'--references=[Returns annotations that are replies to this parent annotation ID]:REFERENCES:_default' \
'--text=[Limit the results to annotations that contain this text in their textual body]:TEXT:_default' \
'-o+[json file to write search results to, writes to stdout if not given]:FILE:_files' \
'--file=[json file to write search results to, writes to stdout if not given]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" : \
'-o+[json file to write annotation to, writes to stdout if not given]:FILE:_files' \
'--file=[json file to write annotation to, writes to stdout if not given]:FILE:_files' \
'-h[Print help]' \
'--help[Print help]' \
':id -- unique ID of the annotation to fetch:_default' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':id -- unique ID of the annotation to delete:_default' \
&& ret=0
;;
(flag)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':id -- unique ID of the annotation to flag:_default' \
&& ret=0
;;
(hide)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':id -- unique ID of the annotation to hide:_default' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':id -- unique ID of the annotation to show:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_hypothesis__annotations__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-annotations-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(flag)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(hide)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(groups)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_hypothesis__groups_commands" \
"*::: :->groups" \
&& ret=0

    case $state in
    (groups)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-groups-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--authority=[Filter returned groups to this authority. For authenticated requests, the user'\''s associated authority will supersede any provided value]:AUTHORITY:_default' \
'--document-uri=[Only retrieve public (i.e. non-private) groups that apply to a given document URI (i.e. the target document being annotated)]:DOCUMENT_URI:_default' \
'*--expand=[One or more relations to expand for a group resource. Possible values\: organization, scopes]:EXPAND:((organization\:"Expand \`organization\` field to \`Org\`"
scopes\:"Expand \`scopes\` field to \`Scope\`"))' \
'-o+[json file to write filtered groups to, writes to stdout if not given]:FILE:_files' \
'--file=[json file to write filtered groups to, writes to stdout if not given]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" : \
'-o+[write created group to this file in JSON format]:FILE:_files' \
'--file=[write created group to this file in JSON format]:FILE:_files' \
'-h[Print help]' \
'--help[Print help]' \
':name -- group name:_default' \
'::description -- group description:_default' \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" : \
'*-e+[Expand the organization, scope, or both]:EXPAND:((organization\:"Expand \`organization\` field to \`Org\`"
scopes\:"Expand \`scopes\` field to \`Scope\`"))' \
'*--expand=[Expand the organization, scope, or both]:EXPAND:((organization\:"Expand \`organization\` field to \`Org\`"
scopes\:"Expand \`scopes\` field to \`Scope\`"))' \
'-o+[write group to this file in JSON format]:FILE:_files' \
'--file=[write group to this file in JSON format]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':id -- unique Group ID:_default' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'-n+[new group name]:NAME:_default' \
'--name=[new group name]:NAME:_default' \
'-d+[new group description]:DESCRIPTION:_default' \
'--description=[new group description]:DESCRIPTION:_default' \
'-o+[write updated group to this file in JSON format]:FILE:_files' \
'--file=[write updated group to this file in JSON format]:FILE:_files' \
'-h[Print help]' \
'--help[Print help]' \
':id -- unique Group ID:_default' \
&& ret=0
;;
(members)
_arguments "${_arguments_options[@]}" : \
'-o+[json file to write groups members to, writes to stdout if not given]:FILE:_files' \
'--file=[json file to write groups members to, writes to stdout if not given]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':id -- unique Group ID:_default' \
&& ret=0
;;
(leave)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':id:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_hypothesis__groups__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-groups-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(members)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(leave)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(profile)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_hypothesis__profile_commands" \
"*::: :->profile" \
&& ret=0

    case $state in
    (profile)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-profile-command-$line[1]:"
        case $line[1] in
            (user)
_arguments "${_arguments_options[@]}" : \
'-o+[json file to write user profile to, writes to stdout if not given]:FILE:_files' \
'--file=[json file to write user profile to, writes to stdout if not given]:FILE:_files' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(groups)
_arguments "${_arguments_options[@]}" : \
'-o+[json file to write groups to, writes to stdout if not given]:FILE:_files' \
'--file=[json file to write groups to, writes to stdout if not given]:FILE:_files' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_hypothesis__profile__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-profile-help-command-$line[1]:"
        case $line[1] in
            (user)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(groups)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(complete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_hypothesis__help_commands" \
"*::: :->help" \
&& ret=0

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

    case $state in
    (annotations)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-help-annotations-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(flag)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(hide)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(groups)
_arguments "${_arguments_options[@]}" : \
":: :_hypothesis__help__groups_commands" \
"*::: :->groups" \
&& ret=0

    case $state in
    (groups)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hypothesis-help-groups-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(members)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(leave)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(profile)
_arguments "${_arguments_options[@]}" : \
":: :_hypothesis__help__profile_commands" \
"*::: :->profile" \
&& ret=0

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

(( $+functions[_hypothesis_commands] )) ||
_hypothesis_commands() {
    local commands; commands=(
'annotations:Manage annotations' \
'groups:Manage groups' \
'profile:Manage user profile' \
'complete:Generate shell completions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis commands' commands "$@"
}
(( $+functions[_hypothesis__annotations_commands] )) ||
_hypothesis__annotations_commands() {
    local commands; commands=(
'create:Create a new annotation (TODO\: add Target somehow)' \
'update:Update an existing annotation' \
'search:Search for annotations with optional filters' \
'fetch:Fetch annotation by ID' \
'delete:Delete annotation by ID' \
'flag:Flag an annotation' \
'hide:Hide an annotation' \
'show:Show an annotation' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis annotations commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__create_commands] )) ||
_hypothesis__annotations__create_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations create commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__delete_commands] )) ||
_hypothesis__annotations__delete_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations delete commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__fetch_commands] )) ||
_hypothesis__annotations__fetch_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations fetch commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__flag_commands] )) ||
_hypothesis__annotations__flag_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations flag commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help_commands] )) ||
_hypothesis__annotations__help_commands() {
    local commands; commands=(
'create:Create a new annotation (TODO\: add Target somehow)' \
'update:Update an existing annotation' \
'search:Search for annotations with optional filters' \
'fetch:Fetch annotation by ID' \
'delete:Delete annotation by ID' \
'flag:Flag an annotation' \
'hide:Hide an annotation' \
'show:Show an annotation' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis annotations help commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__create_commands] )) ||
_hypothesis__annotations__help__create_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help create commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__delete_commands] )) ||
_hypothesis__annotations__help__delete_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help delete commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__fetch_commands] )) ||
_hypothesis__annotations__help__fetch_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help fetch commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__flag_commands] )) ||
_hypothesis__annotations__help__flag_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help flag commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__help_commands] )) ||
_hypothesis__annotations__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help help commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__hide_commands] )) ||
_hypothesis__annotations__help__hide_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help hide commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__search_commands] )) ||
_hypothesis__annotations__help__search_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help search commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__show_commands] )) ||
_hypothesis__annotations__help__show_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help show commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__help__update_commands] )) ||
_hypothesis__annotations__help__update_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations help update commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__hide_commands] )) ||
_hypothesis__annotations__hide_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations hide commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__search_commands] )) ||
_hypothesis__annotations__search_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations search commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__show_commands] )) ||
_hypothesis__annotations__show_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations show commands' commands "$@"
}
(( $+functions[_hypothesis__annotations__update_commands] )) ||
_hypothesis__annotations__update_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis annotations update commands' commands "$@"
}
(( $+functions[_hypothesis__complete_commands] )) ||
_hypothesis__complete_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis complete commands' commands "$@"
}
(( $+functions[_hypothesis__groups_commands] )) ||
_hypothesis__groups_commands() {
    local commands; commands=(
'list:Retrieve a list of applicable Groups, filtered by authority and target document (document_uri). Also retrieve user'\''s private Groups' \
'create:Create a new, private group for the currently-authenticated user' \
'fetch:Fetch a single Group resource' \
'update:Update a Group resource' \
'members:Fetch a list of all members (users) in a group' \
'leave:Remove yourself from a group' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis groups commands' commands "$@"
}
(( $+functions[_hypothesis__groups__create_commands] )) ||
_hypothesis__groups__create_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups create commands' commands "$@"
}
(( $+functions[_hypothesis__groups__fetch_commands] )) ||
_hypothesis__groups__fetch_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups fetch commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help_commands] )) ||
_hypothesis__groups__help_commands() {
    local commands; commands=(
'list:Retrieve a list of applicable Groups, filtered by authority and target document (document_uri). Also retrieve user'\''s private Groups' \
'create:Create a new, private group for the currently-authenticated user' \
'fetch:Fetch a single Group resource' \
'update:Update a Group resource' \
'members:Fetch a list of all members (users) in a group' \
'leave:Remove yourself from a group' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis groups help commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__create_commands] )) ||
_hypothesis__groups__help__create_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help create commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__fetch_commands] )) ||
_hypothesis__groups__help__fetch_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help fetch commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__help_commands] )) ||
_hypothesis__groups__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help help commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__leave_commands] )) ||
_hypothesis__groups__help__leave_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help leave commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__list_commands] )) ||
_hypothesis__groups__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help list commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__members_commands] )) ||
_hypothesis__groups__help__members_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help members commands' commands "$@"
}
(( $+functions[_hypothesis__groups__help__update_commands] )) ||
_hypothesis__groups__help__update_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups help update commands' commands "$@"
}
(( $+functions[_hypothesis__groups__leave_commands] )) ||
_hypothesis__groups__leave_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups leave commands' commands "$@"
}
(( $+functions[_hypothesis__groups__list_commands] )) ||
_hypothesis__groups__list_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups list commands' commands "$@"
}
(( $+functions[_hypothesis__groups__members_commands] )) ||
_hypothesis__groups__members_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups members commands' commands "$@"
}
(( $+functions[_hypothesis__groups__update_commands] )) ||
_hypothesis__groups__update_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis groups update commands' commands "$@"
}
(( $+functions[_hypothesis__help_commands] )) ||
_hypothesis__help_commands() {
    local commands; commands=(
'annotations:Manage annotations' \
'groups:Manage groups' \
'profile:Manage user profile' \
'complete:Generate shell completions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis help commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations_commands] )) ||
_hypothesis__help__annotations_commands() {
    local commands; commands=(
'create:Create a new annotation (TODO\: add Target somehow)' \
'update:Update an existing annotation' \
'search:Search for annotations with optional filters' \
'fetch:Fetch annotation by ID' \
'delete:Delete annotation by ID' \
'flag:Flag an annotation' \
'hide:Hide an annotation' \
'show:Show an annotation' \
    )
    _describe -t commands 'hypothesis help annotations commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__create_commands] )) ||
_hypothesis__help__annotations__create_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations create commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__delete_commands] )) ||
_hypothesis__help__annotations__delete_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations delete commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__fetch_commands] )) ||
_hypothesis__help__annotations__fetch_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations fetch commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__flag_commands] )) ||
_hypothesis__help__annotations__flag_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations flag commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__hide_commands] )) ||
_hypothesis__help__annotations__hide_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations hide commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__search_commands] )) ||
_hypothesis__help__annotations__search_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations search commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__show_commands] )) ||
_hypothesis__help__annotations__show_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations show commands' commands "$@"
}
(( $+functions[_hypothesis__help__annotations__update_commands] )) ||
_hypothesis__help__annotations__update_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help annotations update commands' commands "$@"
}
(( $+functions[_hypothesis__help__complete_commands] )) ||
_hypothesis__help__complete_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help complete commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups_commands] )) ||
_hypothesis__help__groups_commands() {
    local commands; commands=(
'list:Retrieve a list of applicable Groups, filtered by authority and target document (document_uri). Also retrieve user'\''s private Groups' \
'create:Create a new, private group for the currently-authenticated user' \
'fetch:Fetch a single Group resource' \
'update:Update a Group resource' \
'members:Fetch a list of all members (users) in a group' \
'leave:Remove yourself from a group' \
    )
    _describe -t commands 'hypothesis help groups commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups__create_commands] )) ||
_hypothesis__help__groups__create_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help groups create commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups__fetch_commands] )) ||
_hypothesis__help__groups__fetch_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help groups fetch commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups__leave_commands] )) ||
_hypothesis__help__groups__leave_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help groups leave commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups__list_commands] )) ||
_hypothesis__help__groups__list_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help groups list commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups__members_commands] )) ||
_hypothesis__help__groups__members_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help groups members commands' commands "$@"
}
(( $+functions[_hypothesis__help__groups__update_commands] )) ||
_hypothesis__help__groups__update_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help groups update commands' commands "$@"
}
(( $+functions[_hypothesis__help__help_commands] )) ||
_hypothesis__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help help commands' commands "$@"
}
(( $+functions[_hypothesis__help__profile_commands] )) ||
_hypothesis__help__profile_commands() {
    local commands; commands=(
'user:Fetch profile information for the currently-authenticated user' \
'groups:Fetch the groups for which the currently-authenticated user is a member' \
    )
    _describe -t commands 'hypothesis help profile commands' commands "$@"
}
(( $+functions[_hypothesis__help__profile__groups_commands] )) ||
_hypothesis__help__profile__groups_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help profile groups commands' commands "$@"
}
(( $+functions[_hypothesis__help__profile__user_commands] )) ||
_hypothesis__help__profile__user_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis help profile user commands' commands "$@"
}
(( $+functions[_hypothesis__profile_commands] )) ||
_hypothesis__profile_commands() {
    local commands; commands=(
'user:Fetch profile information for the currently-authenticated user' \
'groups:Fetch the groups for which the currently-authenticated user is a member' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis profile commands' commands "$@"
}
(( $+functions[_hypothesis__profile__groups_commands] )) ||
_hypothesis__profile__groups_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis profile groups commands' commands "$@"
}
(( $+functions[_hypothesis__profile__help_commands] )) ||
_hypothesis__profile__help_commands() {
    local commands; commands=(
'user:Fetch profile information for the currently-authenticated user' \
'groups:Fetch the groups for which the currently-authenticated user is a member' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'hypothesis profile help commands' commands "$@"
}
(( $+functions[_hypothesis__profile__help__groups_commands] )) ||
_hypothesis__profile__help__groups_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis profile help groups commands' commands "$@"
}
(( $+functions[_hypothesis__profile__help__help_commands] )) ||
_hypothesis__profile__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis profile help help commands' commands "$@"
}
(( $+functions[_hypothesis__profile__help__user_commands] )) ||
_hypothesis__profile__help__user_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis profile help user commands' commands "$@"
}
(( $+functions[_hypothesis__profile__user_commands] )) ||
_hypothesis__profile__user_commands() {
    local commands; commands=()
    _describe -t commands 'hypothesis profile user commands' commands "$@"
}

if [ "$funcstack[1]" = "_hypothesis" ]; then
    _hypothesis "$@"
else
    compdef _hypothesis hypothesis
fi
