#compdef garage

autoload -U is-at-least

_garage() {
    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+[Host to connect to for admin operations, in the format: <full-node-id>@<ip>:<port>]' \
'--rpc-host=[Host to connect to for admin operations, in the format: <full-node-id>@<ip>:<port>]' \
'--allow-world-readable-secrets=[Skip permission check on files containing secrets]' \
'-s+[RPC secret network key, used to replace rpc_secret in config.toml when running the daemon or doing admin operations]' \
'--rpc-secret=[RPC secret network key, used to replace rpc_secret in config.toml when running the daemon or doing admin operations]' \
'--rpc-secret-file=[RPC secret network key, used to replace rpc_secret in config.toml and rpc-secret when running the daemon or doing admin operations]' \
'--admin-token=[Admin API authentication token, replaces admin.admin_token in config.toml when running the Garage daemon]' \
'--admin-token-file=[Admin API authentication token file path, replaces admin.admin_token in config.toml and admin-token when running the Garage daemon]' \
'--metrics-token=[Metrics API authentication token, replaces admin.metrics_token in config.toml when running the Garage daemon]' \
'--metrics-token-file=[Metrics API authentication token file path, replaces admin.metrics_token in config.toml and metrics-token when running the Garage daemon]' \
'-c+[Path to configuration file]' \
'--config=[Path to configuration file]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage_commands" \
"*::: :->garage" \
&& ret=0
    case $state in
    (garage)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-command-$line[1]:"
        case $line[1] in
            (server)
_arguments "${_arguments_options[@]}" \
'--single-node[Automatically configure a single-node layout in the cluster. Garage will refuse to run if the cluster already has other nodes]' \
'--default-access-key[Configure a default S3 API key using environment variables GARAGE_DEFAULT_ACCESS_KEY and GARAGE_DEFAULT_SECRET_KEY. Requires --single-node]' \
'--default-bucket[Configure a default bucket using environment variable GARAGE_DEFAULT_BUCKET. Implies --default-access-key. Requires --single-node]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(node)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__node_commands" \
"*::: :->node" \
&& ret=0
case $state in
    (node)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-node-command-$line[1]:"
        case $line[1] in
            (id)
_arguments "${_arguments_options[@]}" \
'-q[Do not print usage instructions to stderr]' \
'--quiet[Do not print usage instructions to stderr]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(connect)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':node -- Full node ID (public key) and IP address and port, in the format: <full node ID>@<ip or hostname>:<port>. You can retrieve this information on the target node using garage node id:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(layout)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__layout_commands" \
"*::: :->layout" \
&& ret=0
case $state in
    (layout)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-layout-command-$line[1]:"
        case $line[1] in
            (assign)
_arguments "${_arguments_options[@]}" \
'-z+[Location (zone or datacenter) of the node]' \
'--zone=[Location (zone or datacenter) of the node]' \
'-c+[Storage capacity, in bytes (supported suffixes: B, KB, MB, GB, TB, PB)]' \
'--capacity=[Storage capacity, in bytes (supported suffixes: B, KB, MB, GB, TB, PB)]' \
'*-t+[Optional tags to add to node]' \
'*--tag=[Optional tags to add to node]' \
'*--replace=[Replaced node(s): list of node IDs that will be removed from the current cluster]' \
'-g[Gateway-only node]' \
'--gateway[Gateway-only node]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':node-ids -- Node(s) to which to assign role (prefix of hexadecimal node id):_files' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':node-id -- Node whose role to remove (prefix of hexadecimal node id):_files' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" \
'-r+[Zone redundancy parameter ('\''none'\''/'\''max'\'' or integer)]' \
'--redundancy=[Zone redundancy parameter ('\''none'\''/'\''max'\'' or integer)]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(apply)
_arguments "${_arguments_options[@]}" \
'--version=[Version number of new configuration: this command will fail if it is not exactly 1 + the previous configuration'\''s version]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
&& ret=0
;;
(revert)
_arguments "${_arguments_options[@]}" \
'--yes[The revert operation will not be ran unless this flag is added]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(history)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(skip-dead-nodes)
_arguments "${_arguments_options[@]}" \
'--version=[Version number of the layout to assume is currently up-to-date. This will generally be the current layout version]' \
'--allow-missing-data[Allow the skip even if a quorum of nodes could not be found for the data among the remaining nodes]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(bucket)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__bucket_commands" \
"*::: :->bucket" \
&& ret=0
case $state in
    (bucket)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-bucket-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':name -- Bucket name:_files' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':name -- Bucket name:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'--yes[If this flag is not given, the bucket won'\''t be deleted]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':name -- Bucket name:_files' \
&& ret=0
;;
(alias)
_arguments "${_arguments_options[@]}" \
'--local=[Make this alias local to the specified access key]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':existing-bucket -- Existing bucket name (its alias in global namespace or its full hex uuid):_files' \
':new-name -- New bucket name:_files' \
&& ret=0
;;
(unalias)
_arguments "${_arguments_options[@]}" \
'--local=[Unalias in bucket namespace local to this access key]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':name -- Bucket name:_files' \
&& ret=0
;;
(allow)
_arguments "${_arguments_options[@]}" \
'--key=[Access key name or ID]' \
'--read[Allow/deny read operations]' \
'--write[Allow/deny write operations]' \
'--owner[Allow/deny administrative operations operations (such as deleting bucket or changing bucket website configuration)]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':bucket -- Bucket name:_files' \
&& ret=0
;;
(deny)
_arguments "${_arguments_options[@]}" \
'--key=[Access key name or ID]' \
'--read[Allow/deny read operations]' \
'--write[Allow/deny write operations]' \
'--owner[Allow/deny administrative operations operations (such as deleting bucket or changing bucket website configuration)]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':bucket -- Bucket name:_files' \
&& ret=0
;;
(website)
_arguments "${_arguments_options[@]}" \
'-i+[Index document: the suffix appended to request paths ending by /]' \
'--index-document=[Index document: the suffix appended to request paths ending by /]' \
'-e+[Error document: the optional document returned when an error occurs]' \
'--error-document=[Error document: the optional document returned when an error occurs]' \
'--allow[Create]' \
'--deny[Delete]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':bucket -- Bucket name:_files' \
&& ret=0
;;
(set-quotas)
_arguments "${_arguments_options[@]}" \
'--max-size=[Set a maximum size for the bucket (specify a size e.g. in MiB or GiB, or none for no size restriction)]' \
'--max-objects=[Set a maximum number of objects for the bucket (or none for no restriction)]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':bucket -- Bucket name:_files' \
&& ret=0
;;
(cleanup-incomplete-uploads)
_arguments "${_arguments_options[@]}" \
'--older-than=[Abort multipart uploads older than this value]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':buckets -- Name of bucket(s) to clean up:_files' \
&& ret=0
;;
(inspect-object)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':bucket -- Name or ID of bucket:_files' \
':key -- Key of object to inspect:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(key)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__key_commands" \
"*::: :->key" \
&& ret=0
case $state in
    (key)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-key-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'--show-secret[Whether to display the secret key]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-pattern -- ID or name of the key:_files' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'--expires-in=[Set an expiration time for the access key (see docs.rs/parse_duration for date format)]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::name -- Name of the key:_files' \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-pattern -- ID or name of the key:_files' \
':new-name -- New name of the key:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'--yes[Confirm deletion]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-pattern -- ID or name of the key:_files' \
&& ret=0
;;
(allow)
_arguments "${_arguments_options[@]}" \
'--create-bucket[Flag that allows key to create buckets using S3'\''s CreateBucket call]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-pattern -- ID or name of the key:_files' \
&& ret=0
;;
(deny)
_arguments "${_arguments_options[@]}" \
'--create-bucket[Flag that allows key to create buckets using S3'\''s CreateBucket call]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-pattern -- ID or name of the key:_files' \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" \
'-n+[Key name]' \
'--yes[Confirm key import]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-id -- Access key ID:_files' \
':secret-key -- Secret access key:_files' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'--expires-in=[Set an expiration time for the access key (see docs.rs/parse_duration for date format)]' \
'--never-expires[Set the access key to never expire]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':key-pattern -- ID or name of the key:_files' \
&& ret=0
;;
(delete-expired)
_arguments "${_arguments_options[@]}" \
'--yes[Confirm deletion]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(admin-token)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__admin-token_commands" \
"*::: :->admin-token" \
&& ret=0
case $state in
    (admin-token)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-admin-token-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':api-token -- Name or prefix of the ID of the token to look up:_files' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'--expires-in=[Set an expiration time for the token (see docs.rs/parse_duration for date format)]' \
'--scope=[Set a limited scope for the token, as a comma-separated list of admin API functions (e.g. GetClusterStatus, etc.). The default scope is *, which allows access to all admin API functions. Note that granting a scope that allows CreateAdminToken or UpdateAdminToken allows for privilege escalation, and is therefore equivalent to *]' \
'-q[Print only the newly generated API token to stdout]' \
'--quiet[Print only the newly generated API token to stdout]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::name -- Set a name for the token:_files' \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':api-token -- Name or prefix of the ID of the token to rename:_files' \
':new-name -- New name of the admintoken:_files' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'--expires-in=[Set an expiration time for the token (see docs.rs/parse_duration for date format)]' \
'--scope=[Set a limited scope for the token, as a comma-separated list of admin API functions (e.g. GetClusterStatus, etc.), or * to allow all admin API functions. Use --scope=+Scope1,Scope2 to add scopes to the existing list, and --scope=-Scope1,Scope2 to remove scopes from the existing list. Note that granting a scope that allows CreateAdminToken or UpdateAdminToken allows for privilege escalation, and is therefore equivalent to *]' \
'--never-expires[Set the token to never expire]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':api-token -- Name or prefix of the ID of the token to modify:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" \
'--yes[Confirm deletion]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':api-token -- Name or prefix of the ID of the token to delete:_files' \
&& ret=0
;;
(delete-expired)
_arguments "${_arguments_options[@]}" \
'--yes[Confirm deletion]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(repair)
_arguments "${_arguments_options[@]}" \
'-a[Launch repair operation on all nodes]' \
'--all-nodes[Launch repair operation on all nodes]' \
'--yes[Confirm the launch of the repair operation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__repair_commands" \
"*::: :->repair" \
&& ret=0
case $state in
    (repair)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-repair-command-$line[1]:"
        case $line[1] in
            (tables)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(blocks)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(clear-resync-queue)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(versions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(mpu)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(block-refs)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(block-rc)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(aliases)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(scrub)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__repair__scrub_commands" \
"*::: :->scrub" \
&& ret=0
case $state in
    (scrub)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-repair-scrub-command-$line[1]:"
        case $line[1] in
            (start)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(pause)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(cancel)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(rebalance)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(offline-repair)
_arguments "${_arguments_options[@]}" \
'--yes[Confirm the launch of the repair operation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__offline-repair_commands" \
"*::: :->offline-repair" \
&& ret=0
case $state in
    (offline-repair)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-offline-repair-command-$line[1]:"
        case $line[1] in
            (k2v_item_counters)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(object_counters)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(stats)
_arguments "${_arguments_options[@]}" \
'-a[Gather statistics from all nodes]' \
'--all-nodes[Gather statistics from all nodes]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(worker)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__worker_commands" \
"*::: :->worker" \
&& ret=0
case $state in
    (worker)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-worker-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-b[Show only busy workers]' \
'--busy[Show only busy workers]' \
'-e[Show only workers with errors]' \
'--errors[Show only workers with errors]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':tid:_files' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-a[Gather variable values from all nodes]' \
'--all-nodes[Gather variable values from all nodes]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::variable -- Variable name to get, or none to get all variables:_files' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'-a[Set variable values on all nodes]' \
'--all-nodes[Set variable values on all nodes]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':variable -- Variable node to set:_files' \
':value -- Value to set the variable to:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(block)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__block_commands" \
"*::: :->block" \
&& ret=0
case $state in
    (block)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-block-command-$line[1]:"
        case $line[1] in
            (list-errors)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':hash -- Hash of the block for which to retrieve information:_files' \
&& ret=0
;;
(retry-now)
_arguments "${_arguments_options[@]}" \
'--all[Retry all blocks that have a resync error]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::blocks -- Hashes of the block to retry to resync now:_files' \
&& ret=0
;;
(purge)
_arguments "${_arguments_options[@]}" \
'--yes[Mandatory to confirm this operation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':blocks -- Hashes of the block to purge:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(meta)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_garage__meta_commands" \
"*::: :->meta" \
&& ret=0
case $state in
    (meta)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:garage-meta-command-$line[1]:"
        case $line[1] in
            (snapshot)
_arguments "${_arguments_options[@]}" \
'--all[Run on all nodes instead of only local node]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(convert-db)
_arguments "${_arguments_options[@]}" \
'-i+[Input database path (not the same as metadata_dir, see <https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db_engine>]' \
'-a+[Input database engine (lmdb or sqlite; limited by db engines enabled in this build)]' \
'-o+[Output database path]' \
'-b+[Output database engine]' \
'--lmdb-map-size=[LMDB map size override (supported suffixes: B, KiB, MiB, GiB, TiB, PiB)]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(admin-api-schema)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(json-api)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':endpoint -- The admin API endpoint to invoke, e.g. GetClusterStatus:_files' \
'::payload -- The JSON payload, or - to read from stdin:_files' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':shell:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_garage_commands] )) ||
_garage_commands() {
    local commands; commands=(
        "server:Run Garage server" \
"status:Get network status" \
"node:Operations on individual Garage nodes" \
"layout:Operations on the assignment of node roles in the cluster layout" \
"bucket:Operations on buckets" \
"key:Operations on S3 access keys" \
"admin-token:Operations on admin API tokens" \
"repair:Start repair of node data on remote node" \
"offline-repair:Offline reparation of node data (these repairs must be run offline directly on the server node)" \
"stats:Gather node statistics" \
"worker:Manage background workers" \
"block:Low-level node-local debug operations on data blocks" \
"meta:Operations on the metadata db" \
"convert-db:Convert metadata db between database engine formats" \
"admin-api-schema:Output openapi JSON schema for admin api" \
"json-api:Directly invoke the admin API using a JSON payload. The result is printed to stdout in JSON format" \
"completions:Generate completions for a shell" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage commands' commands "$@"
}
(( $+functions[_garage__admin-api-schema_commands] )) ||
_garage__admin-api-schema_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-api-schema commands' commands "$@"
}
(( $+functions[_garage__admin-token_commands] )) ||
_garage__admin-token_commands() {
    local commands; commands=(
        "list:List all admin API tokens" \
"info:Fetch info about a specific admin API token" \
"create:Create new admin API token" \
"rename:Rename an admin API token" \
"set:Set parameters for an admin API token" \
"delete:Delete an admin API token" \
"delete-expired:Delete all expired admin API tokens" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage admin-token commands' commands "$@"
}
(( $+functions[_garage__bucket__alias_commands] )) ||
_garage__bucket__alias_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket alias commands' commands "$@"
}
(( $+functions[_garage__repair__aliases_commands] )) ||
_garage__repair__aliases_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair aliases commands' commands "$@"
}
(( $+functions[_garage__bucket__allow_commands] )) ||
_garage__bucket__allow_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket allow commands' commands "$@"
}
(( $+functions[_garage__key__allow_commands] )) ||
_garage__key__allow_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key allow commands' commands "$@"
}
(( $+functions[_garage__layout__apply_commands] )) ||
_garage__layout__apply_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout apply commands' commands "$@"
}
(( $+functions[_garage__layout__assign_commands] )) ||
_garage__layout__assign_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout assign commands' commands "$@"
}
(( $+functions[_garage__block_commands] )) ||
_garage__block_commands() {
    local commands; commands=(
        "list-errors:List all blocks that currently have a resync error" \
"info:Get detailed information about a single block" \
"retry-now:Retry now the resync of one or many blocks" \
"purge:Delete all objects referencing a missing block" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage block commands' commands "$@"
}
(( $+functions[_garage__repair__block-rc_commands] )) ||
_garage__repair__block-rc_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair block-rc commands' commands "$@"
}
(( $+functions[_garage__repair__block-refs_commands] )) ||
_garage__repair__block-refs_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair block-refs commands' commands "$@"
}
(( $+functions[_garage__repair__blocks_commands] )) ||
_garage__repair__blocks_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair blocks commands' commands "$@"
}
(( $+functions[_garage__bucket_commands] )) ||
_garage__bucket_commands() {
    local commands; commands=(
        "list:List buckets" \
"info:Get bucket info" \
"create:Create bucket" \
"delete:Delete bucket" \
"alias:Alias bucket under new name" \
"unalias:Remove bucket alias" \
"allow:Allow key to read or write to bucket" \
"deny:Deny key from reading or writing to bucket" \
"website:Expose as website or not" \
"set-quotas:Set the quotas for this bucket" \
"cleanup-incomplete-uploads:Clean up (abort) old incomplete multipart uploads" \
"inspect-object:Inspect an object in a bucket" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage bucket commands' commands "$@"
}
(( $+functions[_garage__repair__scrub__cancel_commands] )) ||
_garage__repair__scrub__cancel_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair scrub cancel commands' commands "$@"
}
(( $+functions[_garage__bucket__cleanup-incomplete-uploads_commands] )) ||
_garage__bucket__cleanup-incomplete-uploads_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket cleanup-incomplete-uploads commands' commands "$@"
}
(( $+functions[_garage__repair__clear-resync-queue_commands] )) ||
_garage__repair__clear-resync-queue_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair clear-resync-queue commands' commands "$@"
}
(( $+functions[_garage__completions_commands] )) ||
_garage__completions_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage completions commands' commands "$@"
}
(( $+functions[_garage__layout__config_commands] )) ||
_garage__layout__config_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout config commands' commands "$@"
}
(( $+functions[_garage__node__connect_commands] )) ||
_garage__node__connect_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage node connect commands' commands "$@"
}
(( $+functions[_garage__convert-db_commands] )) ||
_garage__convert-db_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage convert-db commands' commands "$@"
}
(( $+functions[_garage__admin-token__create_commands] )) ||
_garage__admin-token__create_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token create commands' commands "$@"
}
(( $+functions[_garage__bucket__create_commands] )) ||
_garage__bucket__create_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket create commands' commands "$@"
}
(( $+functions[_garage__key__create_commands] )) ||
_garage__key__create_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key create commands' commands "$@"
}
(( $+functions[_garage__admin-token__delete_commands] )) ||
_garage__admin-token__delete_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token delete commands' commands "$@"
}
(( $+functions[_garage__bucket__delete_commands] )) ||
_garage__bucket__delete_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket delete commands' commands "$@"
}
(( $+functions[_garage__key__delete_commands] )) ||
_garage__key__delete_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key delete commands' commands "$@"
}
(( $+functions[_garage__admin-token__delete-expired_commands] )) ||
_garage__admin-token__delete-expired_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token delete-expired commands' commands "$@"
}
(( $+functions[_garage__key__delete-expired_commands] )) ||
_garage__key__delete-expired_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key delete-expired commands' commands "$@"
}
(( $+functions[_garage__bucket__deny_commands] )) ||
_garage__bucket__deny_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket deny commands' commands "$@"
}
(( $+functions[_garage__key__deny_commands] )) ||
_garage__key__deny_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key deny commands' commands "$@"
}
(( $+functions[_garage__worker__get_commands] )) ||
_garage__worker__get_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage worker get commands' commands "$@"
}
(( $+functions[_garage__admin-token__help_commands] )) ||
_garage__admin-token__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token help commands' commands "$@"
}
(( $+functions[_garage__block__help_commands] )) ||
_garage__block__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage block help commands' commands "$@"
}
(( $+functions[_garage__bucket__help_commands] )) ||
_garage__bucket__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket help commands' commands "$@"
}
(( $+functions[_garage__help_commands] )) ||
_garage__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage help commands' commands "$@"
}
(( $+functions[_garage__key__help_commands] )) ||
_garage__key__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key help commands' commands "$@"
}
(( $+functions[_garage__layout__help_commands] )) ||
_garage__layout__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout help commands' commands "$@"
}
(( $+functions[_garage__meta__help_commands] )) ||
_garage__meta__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage meta help commands' commands "$@"
}
(( $+functions[_garage__node__help_commands] )) ||
_garage__node__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage node help commands' commands "$@"
}
(( $+functions[_garage__offline-repair__help_commands] )) ||
_garage__offline-repair__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage offline-repair help commands' commands "$@"
}
(( $+functions[_garage__repair__help_commands] )) ||
_garage__repair__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair help commands' commands "$@"
}
(( $+functions[_garage__repair__scrub__help_commands] )) ||
_garage__repair__scrub__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair scrub help commands' commands "$@"
}
(( $+functions[_garage__worker__help_commands] )) ||
_garage__worker__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage worker help commands' commands "$@"
}
(( $+functions[_garage__layout__history_commands] )) ||
_garage__layout__history_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout history commands' commands "$@"
}
(( $+functions[_garage__node__id_commands] )) ||
_garage__node__id_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage node id commands' commands "$@"
}
(( $+functions[_garage__key__import_commands] )) ||
_garage__key__import_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key import commands' commands "$@"
}
(( $+functions[_garage__admin-token__info_commands] )) ||
_garage__admin-token__info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token info commands' commands "$@"
}
(( $+functions[_garage__block__info_commands] )) ||
_garage__block__info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage block info commands' commands "$@"
}
(( $+functions[_garage__bucket__info_commands] )) ||
_garage__bucket__info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket info commands' commands "$@"
}
(( $+functions[_garage__key__info_commands] )) ||
_garage__key__info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key info commands' commands "$@"
}
(( $+functions[_garage__worker__info_commands] )) ||
_garage__worker__info_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage worker info commands' commands "$@"
}
(( $+functions[_garage__bucket__inspect-object_commands] )) ||
_garage__bucket__inspect-object_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket inspect-object commands' commands "$@"
}
(( $+functions[_garage__json-api_commands] )) ||
_garage__json-api_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage json-api commands' commands "$@"
}
(( $+functions[_garage__offline-repair__k2v_item_counters_commands] )) ||
_garage__offline-repair__k2v_item_counters_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage offline-repair k2v_item_counters commands' commands "$@"
}
(( $+functions[_garage__key_commands] )) ||
_garage__key_commands() {
    local commands; commands=(
        "list:List keys" \
"info:Get key info" \
"create:Create new key" \
"rename:Rename key" \
"delete:Delete key" \
"allow:Set permission flags for key" \
"deny:Unset permission flags for key" \
"import:Import key" \
"set:Set parameters for an access key" \
"delete-expired:Delete all expired access keys" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage key commands' commands "$@"
}
(( $+functions[_garage__layout_commands] )) ||
_garage__layout_commands() {
    local commands; commands=(
        "assign:Assign role to Garage node" \
"remove:Remove role from Garage cluster node" \
"config:Configure parameters value for the layout computation" \
"show:Show roles currently assigned to nodes and changes staged for commit" \
"apply:Apply staged changes to cluster layout" \
"revert:Revert staged changes to cluster layout" \
"history:View the history of layouts in the cluster" \
"skip-dead-nodes:Skip dead nodes when awaiting for a new layout version to be synchronized" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage layout commands' commands "$@"
}
(( $+functions[_garage__admin-token__list_commands] )) ||
_garage__admin-token__list_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token list commands' commands "$@"
}
(( $+functions[_garage__bucket__list_commands] )) ||
_garage__bucket__list_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket list commands' commands "$@"
}
(( $+functions[_garage__key__list_commands] )) ||
_garage__key__list_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key list commands' commands "$@"
}
(( $+functions[_garage__worker__list_commands] )) ||
_garage__worker__list_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage worker list commands' commands "$@"
}
(( $+functions[_garage__block__list-errors_commands] )) ||
_garage__block__list-errors_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage block list-errors commands' commands "$@"
}
(( $+functions[_garage__meta_commands] )) ||
_garage__meta_commands() {
    local commands; commands=(
        "snapshot:Save a snapshot of the metadata db file" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage meta commands' commands "$@"
}
(( $+functions[_garage__repair__mpu_commands] )) ||
_garage__repair__mpu_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair mpu commands' commands "$@"
}
(( $+functions[_garage__node_commands] )) ||
_garage__node_commands() {
    local commands; commands=(
        "id:Print the full node ID (public key) of this Garage node, and its publicly reachable IP address and port if they are specified in config file under rpc_public_addr" \
"connect:Connect to Garage node that is currently isolated from the system" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage node commands' commands "$@"
}
(( $+functions[_garage__offline-repair__object_counters_commands] )) ||
_garage__offline-repair__object_counters_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage offline-repair object_counters commands' commands "$@"
}
(( $+functions[_garage__offline-repair_commands] )) ||
_garage__offline-repair_commands() {
    local commands; commands=(
        "k2v_item_counters:Repair K2V item counters" \
"object_counters:Repair object counters" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage offline-repair commands' commands "$@"
}
(( $+functions[_garage__repair__scrub__pause_commands] )) ||
_garage__repair__scrub__pause_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair scrub pause commands' commands "$@"
}
(( $+functions[_garage__block__purge_commands] )) ||
_garage__block__purge_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage block purge commands' commands "$@"
}
(( $+functions[_garage__repair__rebalance_commands] )) ||
_garage__repair__rebalance_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair rebalance commands' commands "$@"
}
(( $+functions[_garage__layout__remove_commands] )) ||
_garage__layout__remove_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout remove commands' commands "$@"
}
(( $+functions[_garage__admin-token__rename_commands] )) ||
_garage__admin-token__rename_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token rename commands' commands "$@"
}
(( $+functions[_garage__key__rename_commands] )) ||
_garage__key__rename_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key rename commands' commands "$@"
}
(( $+functions[_garage__repair_commands] )) ||
_garage__repair_commands() {
    local commands; commands=(
        "tables:Do a full sync of metadata tables" \
"blocks:Repair (resync/rebalance) the set of stored blocks in the cluster" \
"clear-resync-queue:Clear the block resync queue. The list of blocks in errored state is cleared as well. You MUST run garage repair blocks after invoking this" \
"versions:Repropagate object deletions to the version table" \
"mpu:Repropagate object deletions to the multipart upload table" \
"block-refs:Repropagate version deletions to the block ref table" \
"block-rc:Recalculate block reference counters" \
"aliases:Fix inconsistency in bucket aliases (WARNING: EXPERIMENTAL)" \
"scrub:Verify integrity of all blocks on disc" \
"rebalance:Rebalance data blocks among HDDs on individual nodes" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage repair commands' commands "$@"
}
(( $+functions[_garage__repair__scrub__resume_commands] )) ||
_garage__repair__scrub__resume_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair scrub resume commands' commands "$@"
}
(( $+functions[_garage__block__retry-now_commands] )) ||
_garage__block__retry-now_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage block retry-now commands' commands "$@"
}
(( $+functions[_garage__layout__revert_commands] )) ||
_garage__layout__revert_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout revert commands' commands "$@"
}
(( $+functions[_garage__repair__scrub_commands] )) ||
_garage__repair__scrub_commands() {
    local commands; commands=(
        "start:Start scrub" \
"pause:Pause scrub (it will resume automatically after 24 hours)" \
"resume:Resume paused scrub" \
"cancel:Cancel scrub in progress" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage repair scrub commands' commands "$@"
}
(( $+functions[_garage__server_commands] )) ||
_garage__server_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage server commands' commands "$@"
}
(( $+functions[_garage__admin-token__set_commands] )) ||
_garage__admin-token__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage admin-token set commands' commands "$@"
}
(( $+functions[_garage__key__set_commands] )) ||
_garage__key__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage key set commands' commands "$@"
}
(( $+functions[_garage__worker__set_commands] )) ||
_garage__worker__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage worker set commands' commands "$@"
}
(( $+functions[_garage__bucket__set-quotas_commands] )) ||
_garage__bucket__set-quotas_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket set-quotas commands' commands "$@"
}
(( $+functions[_garage__layout__show_commands] )) ||
_garage__layout__show_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout show commands' commands "$@"
}
(( $+functions[_garage__layout__skip-dead-nodes_commands] )) ||
_garage__layout__skip-dead-nodes_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage layout skip-dead-nodes commands' commands "$@"
}
(( $+functions[_garage__meta__snapshot_commands] )) ||
_garage__meta__snapshot_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage meta snapshot commands' commands "$@"
}
(( $+functions[_garage__repair__scrub__start_commands] )) ||
_garage__repair__scrub__start_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair scrub start commands' commands "$@"
}
(( $+functions[_garage__stats_commands] )) ||
_garage__stats_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage stats commands' commands "$@"
}
(( $+functions[_garage__status_commands] )) ||
_garage__status_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage status commands' commands "$@"
}
(( $+functions[_garage__repair__tables_commands] )) ||
_garage__repair__tables_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair tables commands' commands "$@"
}
(( $+functions[_garage__bucket__unalias_commands] )) ||
_garage__bucket__unalias_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket unalias commands' commands "$@"
}
(( $+functions[_garage__repair__versions_commands] )) ||
_garage__repair__versions_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage repair versions commands' commands "$@"
}
(( $+functions[_garage__bucket__website_commands] )) ||
_garage__bucket__website_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'garage bucket website commands' commands "$@"
}
(( $+functions[_garage__worker_commands] )) ||
_garage__worker_commands() {
    local commands; commands=(
        "list:List all workers on Garage node" \
"info:Get detailed information about a worker" \
"get:Get worker parameter" \
"set:Set worker parameter" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'garage worker commands' commands "$@"
}

_garage "$@"