# bash completion for noobaa                               -*- shell-script -*-

__noobaa_debug()
{
    if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then
        echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
    fi
}

# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
# _init_completion. This is a very minimal version of that function.
__noobaa_init_completion()
{
    COMPREPLY=()
    _get_comp_words_by_ref "$@" cur prev words cword
}

__noobaa_index_of_word()
{
    local w word=$1
    shift
    index=0
    for w in "$@"; do
        [[ $w = "$word" ]] && return
        index=$((index+1))
    done
    index=-1
}

__noobaa_contains_word()
{
    local w word=$1; shift
    for w in "$@"; do
        [[ $w = "$word" ]] && return
    done
    return 1
}

__noobaa_handle_go_custom_completion()
{
    __noobaa_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}"

    local shellCompDirectiveError=1
    local shellCompDirectiveNoSpace=2
    local shellCompDirectiveNoFileComp=4
    local shellCompDirectiveFilterFileExt=8
    local shellCompDirectiveFilterDirs=16

    local out requestComp lastParam lastChar comp directive args

    # Prepare the command to request completions for the program.
    # Calling ${words[0]} instead of directly noobaa allows handling aliases
    args=("${words[@]:1}")
    # Disable ActiveHelp which is not supported for bash completion v1
    requestComp="NOOBAA_ACTIVE_HELP=0 ${words[0]} __completeNoDesc ${args[*]}"

    lastParam=${words[$((${#words[@]}-1))]}
    lastChar=${lastParam:$((${#lastParam}-1)):1}
    __noobaa_debug "${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}"

    if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then
        # If the last parameter is complete (there is a space following it)
        # We add an extra empty parameter so we can indicate this to the go method.
        __noobaa_debug "${FUNCNAME[0]}: Adding extra empty parameter"
        requestComp="${requestComp} \"\""
    fi

    __noobaa_debug "${FUNCNAME[0]}: calling ${requestComp}"
    # Use eval to handle any environment variables and such
    out=$(eval "${requestComp}" 2>/dev/null)

    # Extract the directive integer at the very end of the output following a colon (:)
    directive=${out##*:}
    # Remove the directive
    out=${out%:*}
    if [ "${directive}" = "${out}" ]; then
        # There is not directive specified
        directive=0
    fi
    __noobaa_debug "${FUNCNAME[0]}: the completion directive is: ${directive}"
    __noobaa_debug "${FUNCNAME[0]}: the completions are: ${out}"

    if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
        # Error code.  No completion.
        __noobaa_debug "${FUNCNAME[0]}: received error from custom completion go code"
        return
    else
        if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
            if [[ $(type -t compopt) = "builtin" ]]; then
                __noobaa_debug "${FUNCNAME[0]}: activating no space"
                compopt -o nospace
            fi
        fi
        if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
            if [[ $(type -t compopt) = "builtin" ]]; then
                __noobaa_debug "${FUNCNAME[0]}: activating no file completion"
                compopt +o default
            fi
        fi
    fi

    if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
        # File extension filtering
        local fullFilter filter filteringCmd
        # Do not use quotes around the $out variable or else newline
        # characters will be kept.
        for filter in ${out}; do
            fullFilter+="$filter|"
        done

        filteringCmd="_filedir $fullFilter"
        __noobaa_debug "File filtering command: $filteringCmd"
        $filteringCmd
    elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
        # File completion for directories only
        local subdir
        # Use printf to strip any trailing newline
        subdir=$(printf "%s" "${out}")
        if [ -n "$subdir" ]; then
            __noobaa_debug "Listing directories in $subdir"
            __noobaa_handle_subdirs_in_dir_flag "$subdir"
        else
            __noobaa_debug "Listing directories in ."
            _filedir -d
        fi
    else
        while IFS='' read -r comp; do
            COMPREPLY+=("$comp")
        done < <(compgen -W "${out}" -- "$cur")
    fi
}

__noobaa_handle_reply()
{
    __noobaa_debug "${FUNCNAME[0]}"
    local comp
    case $cur in
        -*)
            if [[ $(type -t compopt) = "builtin" ]]; then
                compopt -o nospace
            fi
            local allflags
            if [ ${#must_have_one_flag[@]} -ne 0 ]; then
                allflags=("${must_have_one_flag[@]}")
            else
                allflags=("${flags[*]} ${two_word_flags[*]}")
            fi
            while IFS='' read -r comp; do
                COMPREPLY+=("$comp")
            done < <(compgen -W "${allflags[*]}" -- "$cur")
            if [[ $(type -t compopt) = "builtin" ]]; then
                [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
            fi

            # complete after --flag=abc
            if [[ $cur == *=* ]]; then
                if [[ $(type -t compopt) = "builtin" ]]; then
                    compopt +o nospace
                fi

                local index flag
                flag="${cur%=*}"
                __noobaa_index_of_word "${flag}" "${flags_with_completion[@]}"
                COMPREPLY=()
                if [[ ${index} -ge 0 ]]; then
                    PREFIX=""
                    cur="${cur#*=}"
                    ${flags_completion[${index}]}
                    if [ -n "${ZSH_VERSION:-}" ]; then
                        # zsh completion needs --flag= prefix
                        eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )"
                    fi
                fi
            fi

            if [[ -z "${flag_parsing_disabled}" ]]; then
                # If flag parsing is enabled, we have completed the flags and can return.
                # If flag parsing is disabled, we may not know all (or any) of the flags, so we fallthrough
                # to possibly call handle_go_custom_completion.
                return 0;
            fi
            ;;
    esac

    # check if we are handling a flag with special work handling
    local index
    __noobaa_index_of_word "${prev}" "${flags_with_completion[@]}"
    if [[ ${index} -ge 0 ]]; then
        ${flags_completion[${index}]}
        return
    fi

    # we are parsing a flag and don't have a special handler, no completion
    if [[ ${cur} != "${words[cword]}" ]]; then
        return
    fi

    local completions
    completions=("${commands[@]}")
    if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then
        completions+=("${must_have_one_noun[@]}")
    elif [[ -n "${has_completion_function}" ]]; then
        # if a go completion function is provided, defer to that function
        __noobaa_handle_go_custom_completion
    fi
    if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
        completions+=("${must_have_one_flag[@]}")
    fi
    while IFS='' read -r comp; do
        COMPREPLY+=("$comp")
    done < <(compgen -W "${completions[*]}" -- "$cur")

    if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
        while IFS='' read -r comp; do
            COMPREPLY+=("$comp")
        done < <(compgen -W "${noun_aliases[*]}" -- "$cur")
    fi

    if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
        if declare -F __noobaa_custom_func >/dev/null; then
            # try command name qualified custom func
            __noobaa_custom_func
        else
            # otherwise fall back to unqualified for compatibility
            declare -F __custom_func >/dev/null && __custom_func
        fi
    fi

    # available in bash-completion >= 2, not always present on macOS
    if declare -F __ltrim_colon_completions >/dev/null; then
        __ltrim_colon_completions "$cur"
    fi

    # If there is only 1 completion and it is a flag with an = it will be completed
    # but we don't want a space after the =
    if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then
       compopt -o nospace
    fi
}

# The arguments should be in the form "ext1|ext2|extn"
__noobaa_handle_filename_extension_flag()
{
    local ext="$1"
    _filedir "@(${ext})"
}

__noobaa_handle_subdirs_in_dir_flag()
{
    local dir="$1"
    pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
}

__noobaa_handle_flag()
{
    __noobaa_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    # if a command required a flag, and we found it, unset must_have_one_flag()
    local flagname=${words[c]}
    local flagvalue=""
    # if the word contained an =
    if [[ ${words[c]} == *"="* ]]; then
        flagvalue=${flagname#*=} # take in as flagvalue after the =
        flagname=${flagname%=*} # strip everything after the =
        flagname="${flagname}=" # but put the = back
    fi
    __noobaa_debug "${FUNCNAME[0]}: looking for ${flagname}"
    if __noobaa_contains_word "${flagname}" "${must_have_one_flag[@]}"; then
        must_have_one_flag=()
    fi

    # if you set a flag which only applies to this command, don't show subcommands
    if __noobaa_contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then
      commands=()
    fi

    # keep flag value with flagname as flaghash
    # flaghash variable is an associative array which is only supported in bash > 3.
    if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then
        if [ -n "${flagvalue}" ] ; then
            flaghash[${flagname}]=${flagvalue}
        elif [ -n "${words[ $((c+1)) ]}" ] ; then
            flaghash[${flagname}]=${words[ $((c+1)) ]}
        else
            flaghash[${flagname}]="true" # pad "true" for bool flag
        fi
    fi

    # skip the argument to a two word flag
    if [[ ${words[c]} != *"="* ]] && __noobaa_contains_word "${words[c]}" "${two_word_flags[@]}"; then
        __noobaa_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument"
        c=$((c+1))
        # if we are looking for a flags value, don't show commands
        if [[ $c -eq $cword ]]; then
            commands=()
        fi
    fi

    c=$((c+1))

}

__noobaa_handle_noun()
{
    __noobaa_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    if __noobaa_contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
        must_have_one_noun=()
    elif __noobaa_contains_word "${words[c]}" "${noun_aliases[@]}"; then
        must_have_one_noun=()
    fi

    nouns+=("${words[c]}")
    c=$((c+1))
}

__noobaa_handle_command()
{
    __noobaa_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    local next_command
    if [[ -n ${last_command} ]]; then
        next_command="_${last_command}_${words[c]//:/__}"
    else
        if [[ $c -eq 0 ]]; then
            next_command="_noobaa_root_command"
        else
            next_command="_${words[c]//:/__}"
        fi
    fi
    c=$((c+1))
    __noobaa_debug "${FUNCNAME[0]}: looking for ${next_command}"
    declare -F "$next_command" >/dev/null && $next_command
}

__noobaa_handle_word()
{
    if [[ $c -ge $cword ]]; then
        __noobaa_handle_reply
        return
    fi
    __noobaa_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
    if [[ "${words[c]}" == -* ]]; then
        __noobaa_handle_flag
    elif __noobaa_contains_word "${words[c]}" "${commands[@]}"; then
        __noobaa_handle_command
    elif [[ $c -eq 0 ]]; then
        __noobaa_handle_command
    elif __noobaa_contains_word "${words[c]}" "${command_aliases[@]}"; then
        # aliashash variable is an associative array which is only supported in bash > 3.
        if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then
            words[c]=${aliashash[${words[c]}]}
            __noobaa_handle_command
        else
            __noobaa_handle_noun
        fi
    else
        __noobaa_handle_noun
    fi
    __noobaa_handle_word
}

_noobaa_account_create()
{
    last_command="noobaa_account_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--allow_bucket_create")
    local_nonpersistent_flags+=("--allow_bucket_create")
    flags+=("--default_resource=")
    two_word_flags+=("--default_resource")
    local_nonpersistent_flags+=("--default_resource")
    local_nonpersistent_flags+=("--default_resource=")
    flags+=("--force_md5_etag")
    local_nonpersistent_flags+=("--force_md5_etag")
    flags+=("--gid=")
    two_word_flags+=("--gid")
    local_nonpersistent_flags+=("--gid")
    local_nonpersistent_flags+=("--gid=")
    flags+=("--new_buckets_path=")
    two_word_flags+=("--new_buckets_path")
    local_nonpersistent_flags+=("--new_buckets_path")
    local_nonpersistent_flags+=("--new_buckets_path=")
    flags+=("--nsfs_account_config")
    local_nonpersistent_flags+=("--nsfs_account_config")
    flags+=("--nsfs_only")
    local_nonpersistent_flags+=("--nsfs_only")
    flags+=("--uid=")
    two_word_flags+=("--uid")
    local_nonpersistent_flags+=("--uid")
    local_nonpersistent_flags+=("--uid=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account_credentials()
{
    last_command="noobaa_account_credentials"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account_delete()
{
    last_command="noobaa_account_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account_list()
{
    last_command="noobaa_account_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account_regenerate()
{
    last_command="noobaa_account_regenerate"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account_status()
{
    last_command="noobaa_account_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account_update()
{
    last_command="noobaa_account_update"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--force_md5_etag")
    local_nonpersistent_flags+=("--force_md5_etag")
    flags+=("--new_default_resource=")
    two_word_flags+=("--new_default_resource")
    local_nonpersistent_flags+=("--new_default_resource")
    local_nonpersistent_flags+=("--new_default_resource=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_account()
{
    last_command="noobaa_account"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("credentials")
    commands+=("delete")
    commands+=("list")
    commands+=("regenerate")
    commands+=("status")
    commands+=("update")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_api()
{
    last_command="noobaa_api"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--output=")
    two_word_flags+=("--output")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output")
    local_nonpersistent_flags+=("--output=")
    local_nonpersistent_flags+=("-o")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_aws-s3()
{
    last_command="noobaa_backingstore_create_aws-s3"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--region=")
    two_word_flags+=("--region")
    local_nonpersistent_flags+=("--region")
    local_nonpersistent_flags+=("--region=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_aws-sts-s3()
{
    last_command="noobaa_backingstore_create_aws-sts-s3"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    local_nonpersistent_flags+=("--aws-sts-arn")
    local_nonpersistent_flags+=("--aws-sts-arn=")
    flags+=("--region=")
    two_word_flags+=("--region")
    local_nonpersistent_flags+=("--region")
    local_nonpersistent_flags+=("--region=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_azure-blob()
{
    last_command="noobaa_backingstore_create_azure-blob"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--account-key=")
    two_word_flags+=("--account-key")
    local_nonpersistent_flags+=("--account-key")
    local_nonpersistent_flags+=("--account-key=")
    flags+=("--account-name=")
    two_word_flags+=("--account-name")
    local_nonpersistent_flags+=("--account-name")
    local_nonpersistent_flags+=("--account-name=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-blob-container=")
    two_word_flags+=("--target-blob-container")
    local_nonpersistent_flags+=("--target-blob-container")
    local_nonpersistent_flags+=("--target-blob-container=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_google-cloud-storage()
{
    last_command="noobaa_backingstore_create_google-cloud-storage"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--private-key-json-file=")
    two_word_flags+=("--private-key-json-file")
    local_nonpersistent_flags+=("--private-key-json-file")
    local_nonpersistent_flags+=("--private-key-json-file=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_ibm-cos()
{
    last_command="noobaa_backingstore_create_ibm-cos"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--endpoint=")
    two_word_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_pv-pool()
{
    last_command="noobaa_backingstore_create_pv-pool"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--limit-cpu=")
    two_word_flags+=("--limit-cpu")
    local_nonpersistent_flags+=("--limit-cpu")
    local_nonpersistent_flags+=("--limit-cpu=")
    flags+=("--limit-memory=")
    two_word_flags+=("--limit-memory")
    local_nonpersistent_flags+=("--limit-memory")
    local_nonpersistent_flags+=("--limit-memory=")
    flags+=("--num-volumes=")
    two_word_flags+=("--num-volumes")
    local_nonpersistent_flags+=("--num-volumes")
    local_nonpersistent_flags+=("--num-volumes=")
    flags+=("--pv-size-gb=")
    two_word_flags+=("--pv-size-gb")
    local_nonpersistent_flags+=("--pv-size-gb")
    local_nonpersistent_flags+=("--pv-size-gb=")
    flags+=("--request-cpu=")
    two_word_flags+=("--request-cpu")
    local_nonpersistent_flags+=("--request-cpu")
    local_nonpersistent_flags+=("--request-cpu=")
    flags+=("--request-memory=")
    two_word_flags+=("--request-memory")
    local_nonpersistent_flags+=("--request-memory")
    local_nonpersistent_flags+=("--request-memory=")
    flags+=("--storage-class=")
    two_word_flags+=("--storage-class")
    local_nonpersistent_flags+=("--storage-class")
    local_nonpersistent_flags+=("--storage-class=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create_s3-compatible()
{
    last_command="noobaa_backingstore_create_s3-compatible"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--endpoint=")
    two_word_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--signature-version=")
    two_word_flags+=("--signature-version")
    local_nonpersistent_flags+=("--signature-version")
    local_nonpersistent_flags+=("--signature-version=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_create()
{
    last_command="noobaa_backingstore_create"

    command_aliases=()

    commands=()
    commands+=("aws-s3")
    commands+=("aws-sts-s3")
    commands+=("azure-blob")
    commands+=("google-cloud-storage")
    commands+=("ibm-cos")
    commands+=("pv-pool")
    commands+=("s3-compatible")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_delete()
{
    last_command="noobaa_backingstore_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_list()
{
    last_command="noobaa_backingstore_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_remove_pending()
{
    last_command="noobaa_backingstore_remove_pending"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore_status()
{
    last_command="noobaa_backingstore_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_backingstore()
{
    last_command="noobaa_backingstore"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("remove_pending")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bench_warp()
{
    last_command="noobaa_bench_warp"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--bucket=")
    two_word_flags+=("--bucket")
    local_nonpersistent_flags+=("--bucket")
    local_nonpersistent_flags+=("--bucket=")
    flags+=("--clients=")
    two_word_flags+=("--clients")
    local_nonpersistent_flags+=("--clients")
    local_nonpersistent_flags+=("--clients=")
    flags+=("--endpoint-type=")
    two_word_flags+=("--endpoint-type")
    local_nonpersistent_flags+=("--endpoint-type")
    local_nonpersistent_flags+=("--endpoint-type=")
    flags+=("--image=")
    two_word_flags+=("--image")
    local_nonpersistent_flags+=("--image")
    local_nonpersistent_flags+=("--image=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--use-https")
    local_nonpersistent_flags+=("--use-https")
    flags+=("--warp-args=")
    two_word_flags+=("--warp-args")
    local_nonpersistent_flags+=("--warp-args")
    local_nonpersistent_flags+=("--warp-args=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bench()
{
    last_command="noobaa_bench"

    command_aliases=()

    commands=()
    commands+=("warp")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucket_create()
{
    last_command="noobaa_bucket_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--force_md5_etag")
    local_nonpersistent_flags+=("--force_md5_etag")
    flags+=("--max-objects=")
    two_word_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects=")
    flags+=("--max-size=")
    two_word_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucket_delete()
{
    last_command="noobaa_bucket_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucket_list()
{
    last_command="noobaa_bucket_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucket_status()
{
    last_command="noobaa_bucket_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucket_update()
{
    last_command="noobaa_bucket_update"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--force_md5_etag")
    local_nonpersistent_flags+=("--force_md5_etag")
    flags+=("--max-objects=")
    two_word_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects=")
    flags+=("--max-size=")
    two_word_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucket()
{
    last_command="noobaa_bucket"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")
    commands+=("update")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_create_namespace-bucketclass_cache()
{
    last_command="noobaa_bucketclass_create_namespace-bucketclass_cache"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--backingstores=")
    two_word_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores=")
    flags+=("--hub-resource=")
    two_word_flags+=("--hub-resource")
    local_nonpersistent_flags+=("--hub-resource")
    local_nonpersistent_flags+=("--hub-resource=")
    flags+=("--placement=")
    two_word_flags+=("--placement")
    local_nonpersistent_flags+=("--placement")
    local_nonpersistent_flags+=("--placement=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--ttl=")
    two_word_flags+=("--ttl")
    local_nonpersistent_flags+=("--ttl")
    local_nonpersistent_flags+=("--ttl=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_create_namespace-bucketclass_multi()
{
    last_command="noobaa_bucketclass_create_namespace-bucketclass_multi"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--read-resources=")
    two_word_flags+=("--read-resources")
    local_nonpersistent_flags+=("--read-resources")
    local_nonpersistent_flags+=("--read-resources=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--write-resource=")
    two_word_flags+=("--write-resource")
    local_nonpersistent_flags+=("--write-resource")
    local_nonpersistent_flags+=("--write-resource=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_create_namespace-bucketclass_single()
{
    last_command="noobaa_bucketclass_create_namespace-bucketclass_single"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--resource=")
    two_word_flags+=("--resource")
    local_nonpersistent_flags+=("--resource")
    local_nonpersistent_flags+=("--resource=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_create_namespace-bucketclass()
{
    last_command="noobaa_bucketclass_create_namespace-bucketclass"

    command_aliases=()

    commands=()
    commands+=("cache")
    commands+=("multi")
    commands+=("single")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_create_placement-bucketclass()
{
    last_command="noobaa_bucketclass_create_placement-bucketclass"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--backingstores=")
    two_word_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores=")
    flags+=("--max-objects=")
    two_word_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects=")
    flags+=("--max-size=")
    two_word_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size=")
    flags+=("--placement=")
    two_word_flags+=("--placement")
    local_nonpersistent_flags+=("--placement")
    local_nonpersistent_flags+=("--placement=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_create()
{
    last_command="noobaa_bucketclass_create"

    command_aliases=()

    commands=()
    commands+=("namespace-bucketclass")
    commands+=("placement-bucketclass")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_delete()
{
    last_command="noobaa_bucketclass_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_list()
{
    last_command="noobaa_bucketclass_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass_status()
{
    last_command="noobaa_bucketclass_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_bucketclass()
{
    last_command="noobaa_bucketclass"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cnpg_install()
{
    last_command="noobaa_cnpg_install"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cnpg_status()
{
    last_command="noobaa_cnpg_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cnpg_uninstall()
{
    last_command="noobaa_cnpg_uninstall"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cnpg_yaml()
{
    last_command="noobaa_cnpg_yaml"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cnpg()
{
    last_command="noobaa_cnpg"

    command_aliases=()

    commands=()
    commands+=("install")
    commands+=("status")
    commands+=("uninstall")
    commands+=("yaml")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_completion()
{
    last_command="noobaa_completion"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--alias=")
    two_word_flags+=("--alias")
    local_nonpersistent_flags+=("--alias")
    local_nonpersistent_flags+=("--alias=")
    flags+=("--help")
    flags+=("-h")
    local_nonpersistent_flags+=("--help")
    local_nonpersistent_flags+=("-h")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclaim_create()
{
    last_command="noobaa_cosi_accessclaim_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--bucket-access-class=")
    two_word_flags+=("--bucket-access-class")
    local_nonpersistent_flags+=("--bucket-access-class")
    local_nonpersistent_flags+=("--bucket-access-class=")
    flags+=("--bucket-claim=")
    two_word_flags+=("--bucket-claim")
    local_nonpersistent_flags+=("--bucket-claim")
    local_nonpersistent_flags+=("--bucket-claim=")
    flags+=("--creds-secret-name=")
    two_word_flags+=("--creds-secret-name")
    local_nonpersistent_flags+=("--creds-secret-name")
    local_nonpersistent_flags+=("--creds-secret-name=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclaim_delete()
{
    last_command="noobaa_cosi_accessclaim_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclaim_list()
{
    last_command="noobaa_cosi_accessclaim_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclaim_status()
{
    last_command="noobaa_cosi_accessclaim_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclaim()
{
    last_command="noobaa_cosi_accessclaim"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclass_create()
{
    last_command="noobaa_cosi_accessclass_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclass_delete()
{
    last_command="noobaa_cosi_accessclass_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclass_list()
{
    last_command="noobaa_cosi_accessclass_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclass_status()
{
    last_command="noobaa_cosi_accessclass_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_accessclass()
{
    last_command="noobaa_cosi_accessclass"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclaim_create()
{
    last_command="noobaa_cosi_bucketclaim_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--bucketclass=")
    two_word_flags+=("--bucketclass")
    local_nonpersistent_flags+=("--bucketclass")
    local_nonpersistent_flags+=("--bucketclass=")
    flags+=("--path=")
    two_word_flags+=("--path")
    local_nonpersistent_flags+=("--path")
    local_nonpersistent_flags+=("--path=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclaim_delete()
{
    last_command="noobaa_cosi_bucketclaim_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclaim_list()
{
    last_command="noobaa_cosi_bucketclaim_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclaim_status()
{
    last_command="noobaa_cosi_bucketclaim_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclaim()
{
    last_command="noobaa_cosi_bucketclaim"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_create_namespace-bucketclass_cache()
{
    last_command="noobaa_cosi_bucketclass_create_namespace-bucketclass_cache"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--backingstores=")
    two_word_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores=")
    flags+=("--deletion-policy=")
    two_word_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy=")
    flags+=("--hub-resource=")
    two_word_flags+=("--hub-resource")
    local_nonpersistent_flags+=("--hub-resource")
    local_nonpersistent_flags+=("--hub-resource=")
    flags+=("--placement=")
    two_word_flags+=("--placement")
    local_nonpersistent_flags+=("--placement")
    local_nonpersistent_flags+=("--placement=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--ttl=")
    two_word_flags+=("--ttl")
    local_nonpersistent_flags+=("--ttl")
    local_nonpersistent_flags+=("--ttl=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_create_namespace-bucketclass_multi()
{
    last_command="noobaa_cosi_bucketclass_create_namespace-bucketclass_multi"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--deletion-policy=")
    two_word_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy=")
    flags+=("--read-resources=")
    two_word_flags+=("--read-resources")
    local_nonpersistent_flags+=("--read-resources")
    local_nonpersistent_flags+=("--read-resources=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--write-resource=")
    two_word_flags+=("--write-resource")
    local_nonpersistent_flags+=("--write-resource")
    local_nonpersistent_flags+=("--write-resource=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_create_namespace-bucketclass_single()
{
    last_command="noobaa_cosi_bucketclass_create_namespace-bucketclass_single"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--deletion-policy=")
    two_word_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--resource=")
    two_word_flags+=("--resource")
    local_nonpersistent_flags+=("--resource")
    local_nonpersistent_flags+=("--resource=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_create_namespace-bucketclass()
{
    last_command="noobaa_cosi_bucketclass_create_namespace-bucketclass"

    command_aliases=()

    commands=()
    commands+=("cache")
    commands+=("multi")
    commands+=("single")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_create_placement-bucketclass()
{
    last_command="noobaa_cosi_bucketclass_create_placement-bucketclass"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--backingstores=")
    two_word_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores")
    local_nonpersistent_flags+=("--backingstores=")
    flags+=("--deletion-policy=")
    two_word_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy")
    local_nonpersistent_flags+=("--deletion-policy=")
    flags+=("--max-objects=")
    two_word_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects=")
    flags+=("--max-size=")
    two_word_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size=")
    flags+=("--placement=")
    two_word_flags+=("--placement")
    local_nonpersistent_flags+=("--placement")
    local_nonpersistent_flags+=("--placement=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_create()
{
    last_command="noobaa_cosi_bucketclass_create"

    command_aliases=()

    commands=()
    commands+=("namespace-bucketclass")
    commands+=("placement-bucketclass")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_delete()
{
    last_command="noobaa_cosi_bucketclass_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_list()
{
    last_command="noobaa_cosi_bucketclass_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass_status()
{
    last_command="noobaa_cosi_bucketclass_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi_bucketclass()
{
    last_command="noobaa_cosi_bucketclass"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_cosi()
{
    last_command="noobaa_cosi"

    command_aliases=()

    commands=()
    commands+=("accessclaim")
    commands+=("accessclass")
    commands+=("bucketclaim")
    commands+=("bucketclass")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_crd_create()
{
    last_command="noobaa_crd_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_crd_delete()
{
    last_command="noobaa_crd_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_crd_status()
{
    last_command="noobaa_crd_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_crd_wait()
{
    last_command="noobaa_crd_wait"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_crd_yaml()
{
    last_command="noobaa_crd_yaml"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_crd()
{
    last_command="noobaa_crd"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("status")
    commands+=("wait")
    commands+=("yaml")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_analyze_backingstore()
{
    last_command="noobaa_diagnostics_analyze_backingstore"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--bucket=")
    two_word_flags+=("--bucket")
    local_nonpersistent_flags+=("--bucket")
    local_nonpersistent_flags+=("--bucket=")
    flags+=("--dir=")
    two_word_flags+=("--dir")
    local_nonpersistent_flags+=("--dir")
    local_nonpersistent_flags+=("--dir=")
    flags+=("--job-resources=")
    two_word_flags+=("--job-resources")
    local_nonpersistent_flags+=("--job-resources")
    local_nonpersistent_flags+=("--job-resources=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_analyze_namespacestore()
{
    last_command="noobaa_diagnostics_analyze_namespacestore"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--bucket=")
    two_word_flags+=("--bucket")
    local_nonpersistent_flags+=("--bucket")
    local_nonpersistent_flags+=("--bucket=")
    flags+=("--dir=")
    two_word_flags+=("--dir")
    local_nonpersistent_flags+=("--dir")
    local_nonpersistent_flags+=("--dir=")
    flags+=("--job-resources=")
    two_word_flags+=("--job-resources")
    local_nonpersistent_flags+=("--job-resources")
    local_nonpersistent_flags+=("--job-resources=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_analyze_resources()
{
    last_command="noobaa_diagnostics_analyze_resources"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dir=")
    two_word_flags+=("--dir")
    local_nonpersistent_flags+=("--dir")
    local_nonpersistent_flags+=("--dir=")
    flags+=("--job-resources=")
    two_word_flags+=("--job-resources")
    local_nonpersistent_flags+=("--job-resources")
    local_nonpersistent_flags+=("--job-resources=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_analyze()
{
    last_command="noobaa_diagnostics_analyze"

    command_aliases=()

    commands=()
    commands+=("backingstore")
    commands+=("namespacestore")
    commands+=("resources")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_collect()
{
    last_command="noobaa_diagnostics_collect"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--db-dump")
    local_nonpersistent_flags+=("--db-dump")
    flags+=("--dir=")
    two_word_flags+=("--dir")
    local_nonpersistent_flags+=("--dir")
    local_nonpersistent_flags+=("--dir=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_db-dump()
{
    last_command="noobaa_diagnostics_db-dump"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dir=")
    two_word_flags+=("--dir")
    local_nonpersistent_flags+=("--dir")
    local_nonpersistent_flags+=("--dir=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics_report()
{
    last_command="noobaa_diagnostics_report"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_diagnostics()
{
    last_command="noobaa_diagnostics"

    command_aliases=()

    commands=()
    commands+=("analyze")
    commands+=("collect")
    commands+=("db-dump")
    commands+=("report")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_help()
{
    last_command="noobaa_help"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    has_completion_function=1
    noun_aliases=()
}

_noobaa_install_cnpg_install()
{
    last_command="noobaa_install_cnpg_install"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_install_cnpg_status()
{
    last_command="noobaa_install_cnpg_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_install_cnpg_uninstall()
{
    last_command="noobaa_install_cnpg_uninstall"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_install_cnpg_yaml()
{
    last_command="noobaa_install_cnpg_yaml"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_install_cnpg()
{
    last_command="noobaa_install_cnpg"

    command_aliases=()

    commands=()
    commands+=("install")
    commands+=("status")
    commands+=("uninstall")
    commands+=("yaml")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_install_yaml()
{
    last_command="noobaa_install_yaml"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_install()
{
    last_command="noobaa_install"

    command_aliases=()

    commands=()
    commands+=("cnpg")
    commands+=("yaml")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--no-wait")
    local_nonpersistent_flags+=("--no-wait")
    flags+=("--use-obc-cleanup-policy")
    local_nonpersistent_flags+=("--use-obc-cleanup-policy")
    flags+=("--use-standalone-db")
    local_nonpersistent_flags+=("--use-standalone-db")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create_aws-s3()
{
    last_command="noobaa_namespacestore_create_aws-s3"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--access-mode=")
    two_word_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode=")
    flags+=("--region=")
    two_word_flags+=("--region")
    local_nonpersistent_flags+=("--region")
    local_nonpersistent_flags+=("--region=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create_aws-sts-s3()
{
    last_command="noobaa_namespacestore_create_aws-sts-s3"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    local_nonpersistent_flags+=("--aws-sts-arn")
    local_nonpersistent_flags+=("--aws-sts-arn=")
    flags+=("--region=")
    two_word_flags+=("--region")
    local_nonpersistent_flags+=("--region")
    local_nonpersistent_flags+=("--region=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create_azure-blob()
{
    last_command="noobaa_namespacestore_create_azure-blob"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-mode=")
    two_word_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode=")
    flags+=("--account-key=")
    two_word_flags+=("--account-key")
    local_nonpersistent_flags+=("--account-key")
    local_nonpersistent_flags+=("--account-key=")
    flags+=("--account-name=")
    two_word_flags+=("--account-name")
    local_nonpersistent_flags+=("--account-name")
    local_nonpersistent_flags+=("--account-name=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-blob-container=")
    two_word_flags+=("--target-blob-container")
    local_nonpersistent_flags+=("--target-blob-container")
    local_nonpersistent_flags+=("--target-blob-container=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create_ibm-cos()
{
    last_command="noobaa_namespacestore_create_ibm-cos"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--access-mode=")
    two_word_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode=")
    flags+=("--endpoint=")
    two_word_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create_nsfs()
{
    last_command="noobaa_namespacestore_create_nsfs"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-mode=")
    two_word_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode=")
    flags+=("--fs-backend=")
    two_word_flags+=("--fs-backend")
    local_nonpersistent_flags+=("--fs-backend")
    local_nonpersistent_flags+=("--fs-backend=")
    flags+=("--pvc-name=")
    two_word_flags+=("--pvc-name")
    local_nonpersistent_flags+=("--pvc-name")
    local_nonpersistent_flags+=("--pvc-name=")
    flags+=("--sub-path=")
    two_word_flags+=("--sub-path")
    local_nonpersistent_flags+=("--sub-path")
    local_nonpersistent_flags+=("--sub-path=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create_s3-compatible()
{
    last_command="noobaa_namespacestore_create_s3-compatible"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--access-key=")
    two_word_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key")
    local_nonpersistent_flags+=("--access-key=")
    flags+=("--access-mode=")
    two_word_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode")
    local_nonpersistent_flags+=("--access-mode=")
    flags+=("--endpoint=")
    two_word_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint")
    local_nonpersistent_flags+=("--endpoint=")
    flags+=("--secret-key=")
    two_word_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key")
    local_nonpersistent_flags+=("--secret-key=")
    flags+=("--secret-name=")
    two_word_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--signature-version=")
    two_word_flags+=("--signature-version")
    local_nonpersistent_flags+=("--signature-version")
    local_nonpersistent_flags+=("--signature-version=")
    flags+=("--target-bucket=")
    two_word_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket")
    local_nonpersistent_flags+=("--target-bucket=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_create()
{
    last_command="noobaa_namespacestore_create"

    command_aliases=()

    commands=()
    commands+=("aws-s3")
    commands+=("aws-sts-s3")
    commands+=("azure-blob")
    commands+=("ibm-cos")
    commands+=("nsfs")
    commands+=("s3-compatible")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_delete()
{
    last_command="noobaa_namespacestore_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_list()
{
    last_command="noobaa_namespacestore_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore_status()
{
    last_command="noobaa_namespacestore_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_namespacestore()
{
    last_command="noobaa_namespacestore"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_obc_create()
{
    last_command="noobaa_obc_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--bucketclass=")
    two_word_flags+=("--bucketclass")
    local_nonpersistent_flags+=("--bucketclass")
    local_nonpersistent_flags+=("--bucketclass=")
    flags+=("--distinguished-name=")
    two_word_flags+=("--distinguished-name")
    local_nonpersistent_flags+=("--distinguished-name")
    local_nonpersistent_flags+=("--distinguished-name=")
    flags+=("--exact")
    local_nonpersistent_flags+=("--exact")
    flags+=("--gid=")
    two_word_flags+=("--gid")
    local_nonpersistent_flags+=("--gid")
    local_nonpersistent_flags+=("--gid=")
    flags+=("--max-objects=")
    two_word_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects")
    local_nonpersistent_flags+=("--max-objects=")
    flags+=("--max-size=")
    two_word_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size")
    local_nonpersistent_flags+=("--max-size=")
    flags+=("--path=")
    two_word_flags+=("--path")
    local_nonpersistent_flags+=("--path")
    local_nonpersistent_flags+=("--path=")
    flags+=("--replication-policy=")
    two_word_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy")
    local_nonpersistent_flags+=("--replication-policy=")
    flags+=("--uid=")
    two_word_flags+=("--uid")
    local_nonpersistent_flags+=("--uid")
    local_nonpersistent_flags+=("--uid=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_obc_delete()
{
    last_command="noobaa_obc_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_obc_list()
{
    last_command="noobaa_obc_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_obc_regenerate()
{
    last_command="noobaa_obc_regenerate"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_obc_status()
{
    last_command="noobaa_obc_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--app-namespace=")
    two_word_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace")
    local_nonpersistent_flags+=("--app-namespace=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_obc()
{
    last_command="noobaa_obc"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")
    commands+=("regenerate")
    commands+=("status")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_olm_catalog()
{
    last_command="noobaa_olm_catalog"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--csv-name=")
    two_word_flags+=("--csv-name")
    local_nonpersistent_flags+=("--csv-name")
    local_nonpersistent_flags+=("--csv-name=")
    flags+=("--dir=")
    two_word_flags+=("--dir")
    local_nonpersistent_flags+=("--dir")
    local_nonpersistent_flags+=("--dir=")
    flags+=("--include-cnpg")
    local_nonpersistent_flags+=("--include-cnpg")
    flags+=("--obc-crd=")
    two_word_flags+=("--obc-crd")
    local_nonpersistent_flags+=("--obc-crd")
    local_nonpersistent_flags+=("--obc-crd=")
    flags+=("--odf")
    local_nonpersistent_flags+=("--odf")
    flags+=("--replaces=")
    two_word_flags+=("--replaces")
    local_nonpersistent_flags+=("--replaces")
    local_nonpersistent_flags+=("--replaces=")
    flags+=("--skip-range=")
    two_word_flags+=("--skip-range")
    local_nonpersistent_flags+=("--skip-range")
    local_nonpersistent_flags+=("--skip-range=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_olm_csv()
{
    last_command="noobaa_olm_csv"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_olm_install()
{
    last_command="noobaa_olm_install"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_olm_status()
{
    last_command="noobaa_olm_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_olm_uninstall()
{
    last_command="noobaa_olm_uninstall"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_olm()
{
    last_command="noobaa_olm"

    command_aliases=()

    commands=()
    commands+=("catalog")
    commands+=("csv")
    commands+=("install")
    commands+=("status")
    commands+=("uninstall")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_operator_install()
{
    last_command="noobaa_operator_install"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--no-deploy")
    local_nonpersistent_flags+=("--no-deploy")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_operator_run()
{
    last_command="noobaa_operator_run"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_operator_status()
{
    last_command="noobaa_operator_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_operator_uninstall()
{
    last_command="noobaa_operator_uninstall"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cleanup")
    local_nonpersistent_flags+=("--cleanup")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_operator_yaml()
{
    last_command="noobaa_operator_yaml"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_operator()
{
    last_command="noobaa_operator"

    command_aliases=()

    commands=()
    commands+=("install")
    commands+=("run")
    commands+=("status")
    commands+=("uninstall")
    commands+=("yaml")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_options()
{
    last_command="noobaa_options"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_pvstore_create()
{
    last_command="noobaa_pvstore_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--num-volumes=")
    two_word_flags+=("--num-volumes")
    local_nonpersistent_flags+=("--num-volumes")
    local_nonpersistent_flags+=("--num-volumes=")
    flags+=("--pv-size-gb=")
    two_word_flags+=("--pv-size-gb")
    local_nonpersistent_flags+=("--pv-size-gb")
    local_nonpersistent_flags+=("--pv-size-gb=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_pvstore_delete()
{
    last_command="noobaa_pvstore_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_pvstore_list()
{
    last_command="noobaa_pvstore_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_pvstore()
{
    last_command="noobaa_pvstore"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("delete")
    commands+=("list")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_status()
{
    last_command="noobaa_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_sts_assign-role()
{
    last_command="noobaa_sts_assign-role"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--email=")
    two_word_flags+=("--email")
    local_nonpersistent_flags+=("--email")
    local_nonpersistent_flags+=("--email=")
    flags+=("--role_config=")
    two_word_flags+=("--role_config")
    local_nonpersistent_flags+=("--role_config")
    local_nonpersistent_flags+=("--role_config=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_flag+=("--email=")
    must_have_one_flag+=("--role_config=")
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_sts_remove-role()
{
    last_command="noobaa_sts_remove-role"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--email=")
    two_word_flags+=("--email")
    local_nonpersistent_flags+=("--email")
    local_nonpersistent_flags+=("--email=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_flag+=("--email=")
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_sts()
{
    last_command="noobaa_sts"

    command_aliases=()

    commands=()
    commands+=("assign-role")
    commands+=("remove-role")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_create()
{
    last_command="noobaa_system_create"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--core-resources=")
    two_word_flags+=("--core-resources")
    local_nonpersistent_flags+=("--core-resources")
    local_nonpersistent_flags+=("--core-resources=")
    flags+=("--db-resources=")
    two_word_flags+=("--db-resources")
    local_nonpersistent_flags+=("--db-resources")
    local_nonpersistent_flags+=("--db-resources=")
    flags+=("--endpoint-resources=")
    two_word_flags+=("--endpoint-resources")
    local_nonpersistent_flags+=("--endpoint-resources")
    local_nonpersistent_flags+=("--endpoint-resources=")
    flags+=("--use-obc-cleanup-policy")
    local_nonpersistent_flags+=("--use-obc-cleanup-policy")
    flags+=("--use-standalone-db")
    local_nonpersistent_flags+=("--use-standalone-db")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_db-backup()
{
    last_command="noobaa_system_db-backup"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--name=")
    two_word_flags+=("--name")
    local_nonpersistent_flags+=("--name")
    local_nonpersistent_flags+=("--name=")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_delete()
{
    last_command="noobaa_system_delete"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cleanup_data")
    local_nonpersistent_flags+=("--cleanup_data")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_list()
{
    last_command="noobaa_system_list"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_set-debug-level()
{
    last_command="noobaa_system_set-debug-level"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_status()
{
    last_command="noobaa_system_status"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system_yaml()
{
    last_command="noobaa_system_yaml"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_system()
{
    last_command="noobaa_system"

    command_aliases=()

    commands=()
    commands+=("create")
    commands+=("db-backup")
    commands+=("delete")
    commands+=("list")
    commands+=("set-debug-level")
    commands+=("status")
    commands+=("yaml")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_uninstall()
{
    last_command="noobaa_uninstall"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cleanup")
    local_nonpersistent_flags+=("--cleanup")
    flags+=("--cleanup_data")
    local_nonpersistent_flags+=("--cleanup_data")
    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_upgrade()
{
    last_command="noobaa_upgrade"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_version()
{
    last_command="noobaa_version"

    command_aliases=()

    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_noobaa_root_command()
{
    last_command="noobaa"

    command_aliases=()

    commands=()
    commands+=("account")
    commands+=("api")
    commands+=("backingstore")
    commands+=("bench")
    commands+=("bucket")
    commands+=("bucketclass")
    commands+=("cnpg")
    commands+=("completion")
    commands+=("cosi")
    commands+=("crd")
    commands+=("diagnostics")
    commands+=("help")
    commands+=("install")
    commands+=("namespacestore")
    commands+=("obc")
    commands+=("olm")
    commands+=("operator")
    commands+=("options")
    commands+=("pvstore")
    commands+=("status")
    commands+=("sts")
    commands+=("system")
    commands+=("uninstall")
    commands+=("upgrade")
    commands+=("version")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admission")
    flags+=("--autoscaler-type=")
    two_word_flags+=("--autoscaler-type")
    flags+=("--aws-sts-arn=")
    two_word_flags+=("--aws-sts-arn")
    flags+=("--cnpg-image=")
    two_word_flags+=("--cnpg-image")
    flags+=("--cnpg-version=")
    two_word_flags+=("--cnpg-version")
    flags+=("--cosi-driver-path=")
    two_word_flags+=("--cosi-driver-path")
    flags+=("--cosi-sidecar-image=")
    two_word_flags+=("--cosi-sidecar-image")
    flags+=("--db-image=")
    two_word_flags+=("--db-image")
    flags+=("--db-storage-class=")
    two_word_flags+=("--db-storage-class")
    flags+=("--db-volume-size-gb=")
    two_word_flags+=("--db-volume-size-gb")
    flags+=("--debug-level=")
    two_word_flags+=("--debug-level")
    flags+=("--dev")
    flags+=("--disable-load-balancer")
    flags+=("--disable-routes")
    flags+=("--image-pull-secret=")
    two_word_flags+=("--image-pull-secret")
    flags+=("--kubeconfig=")
    two_word_flags+=("--kubeconfig")
    flags+=("--manual-default-backingstore")
    flags+=("--mini")
    flags+=("--namespace=")
    two_word_flags+=("--namespace")
    two_word_flags+=("-n")
    flags+=("--noobaa-image=")
    two_word_flags+=("--noobaa-image")
    flags+=("--operator-image=")
    two_word_flags+=("--operator-image")
    flags+=("--pg-ssl-cert=")
    two_word_flags+=("--pg-ssl-cert")
    flags+=("--pg-ssl-key=")
    two_word_flags+=("--pg-ssl-key")
    flags+=("--pg-ssl-required")
    flags+=("--pg-ssl-unauthorized")
    flags+=("--postgres-url=")
    two_word_flags+=("--postgres-url")
    flags+=("--prometheus-namespace=")
    two_word_flags+=("--prometheus-namespace")
    flags+=("--psql-12-image=")
    two_word_flags+=("--psql-12-image")
    flags+=("--pv-pool-default-storage-class=")
    two_word_flags+=("--pv-pool-default-storage-class")
    flags+=("--s3-load-balancer-source-subnets=")
    two_word_flags+=("--s3-load-balancer-source-subnets")
    flags+=("--show-secrets")
    flags+=("--sts-load-balancer-source-subnets=")
    two_word_flags+=("--sts-load-balancer-source-subnets")
    flags+=("--test-env")
    flags+=("--use-cnpg-api-group")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

__start_noobaa()
{
    local cur prev words cword split
    declare -A flaghash 2>/dev/null || :
    declare -A aliashash 2>/dev/null || :
    if declare -F _init_completion >/dev/null 2>&1; then
        _init_completion -s || return
    else
        __noobaa_init_completion -n "=" || return
    fi

    local c=0
    local flag_parsing_disabled=
    local flags=()
    local two_word_flags=()
    local local_nonpersistent_flags=()
    local flags_with_completion=()
    local flags_completion=()
    local commands=("noobaa")
    local command_aliases=()
    local must_have_one_flag=()
    local must_have_one_noun=()
    local has_completion_function=""
    local last_command=""
    local nouns=()
    local noun_aliases=()

    __noobaa_handle_word
}

if [[ $(type -t compopt) = "builtin" ]]; then
    complete -o default -F __start_noobaa noobaa
else
    complete -o default -o nospace -F __start_noobaa noobaa
fi

# ex: ts=4 sw=4 et filetype=sh
