#!/usr/bin/env bash
#
# astra Bash Completion
# =======================
#
# Bash completion support for the `astra` command,
# generated by [picocli](https://picocli.info/) version 4.7.7.
#
# Installation
# ------------
#
# 1. Source all completion scripts in your .bash_profile
#
#   cd $YOUR_APP_HOME/bin
#   for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done
#
# 2. Open a new bash console, and type `astra [TAB][TAB]`
#
# 1a. Alternatively, if you have [bash-completion](https://github.com/scop/bash-completion) installed:
#     Place this file in a `bash-completion.d` folder:
#
#   * /etc/bash-completion.d
#   * /usr/local/etc/bash-completion.d
#   * ~/bash-completion.d
#
# Documentation
# -------------
# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after
# 'astra (..)'. By reading entered command line parameters,
# it determines possible bash completions and writes them to the COMPREPLY variable.
# Bash then completes the user input if only one entry is listed in the variable or
# shows the options if more than one is listed in COMPREPLY.
#
# References
# ----------
# [1] http://stackoverflow.com/a/12495480/1440785
# [2] http://tiswww.case.edu/php/chet/bash/FAQ
# [3] https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
# [4] http://zsh.sourceforge.net/Doc/Release/Options.html#index-COMPLETE_005fALIASES
# [5] https://stackoverflow.com/questions/17042057/bash-check-element-in-array-for-elements-in-another-array/17042655#17042655
# [6] https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion
# [7] https://stackoverflow.com/questions/3249432/can-a-bash-tab-completion-script-be-used-in-zsh/27853970#27853970
#
  get_profile(){ for ((i=0;i<${#COMP_WORDS[@]};i++));do [[ ${COMP_WORDS[i]} == --profile ]]&&((i+1<${#COMP_WORDS[@]}))&&echo ${COMP_WORDS[i+1]}&&return;done; echo default;};

  get_astra_dir(){ [ -n "${ASTRA_HOME:-}" ]&&echo "$ASTRA_HOME"||{ [ -n "${XDG_DATA_HOME:-}" ]&&echo "$XDG_DATA_HOME/astra"||echo "$HOME/.astra";};}

  get_astra_rc(){ [ -n "${ASTRARC:-}" ]&&echo "$ASTRARC"||{ [ -n "${XDG_CONFIG_HOME:-}" ]&&echo "$XDG_CONFIG_HOME/astra/.astrarc"||echo "$HOME/.astrarc";};}

export ASTRA_COMPLETIONS_SETUP=true

DbNamesCompletion_arr=()
function DbNamesCompletion_fn() {
  [ "${#DbNamesCompletion_arr[@]}" -ne 0 ] && return

  DbNamesCompletion_arr=( $(cat "$(get_astra_dir)/completions-cache/$(get_profile)/db_names" 2>/dev/null | tr '\n' ' ') )
}

PcuAssocTargetsCompletion_arr=()
function PcuAssocTargetsCompletion_fn() {
  [ "${#PcuAssocTargetsCompletion_arr[@]}" -ne 0 ] && return

  PcuAssocTargetsCompletion_arr=( $(cat "$(get_astra_dir)/completions-cache/$(get_profile)/db_names" 2>/dev/null | tr '\n' ' ') )
}

RoleNamesCompletion_arr=()
function RoleNamesCompletion_fn() {
  [ "${#RoleNamesCompletion_arr[@]}" -ne 0 ] && return

  RoleNamesCompletion_arr=( $(cat "$(get_astra_dir)/completions-cache/role_names" 2>/dev/null | tr '\n' ' ') )
  
  if [ -z "$names" ]; then
      RoleNamesCompletion_arr=("R/W Svc Acct" "Admin User" "API Admin User" "Organization Administrator" "RO Svc Acct" "API RO Svc Acct" "API R/W User" "API Admin Svc Acct" "API R/W Svc Acct" "Billing Admin" "API RO User" "Database Administrator" "R/W User" "RO User" "UI View Only" "Admin Svc Acct")
  fi
}

UserEmailsCompletion_arr=()
function UserEmailsCompletion_fn() {
  [ "${#UserEmailsCompletion_arr[@]}" -ne 0 ] && return

  UserEmailsCompletion_arr=( $(cat "$(get_astra_dir)/completions-cache/$(get_profile)/user_emails" 2>/dev/null | tr '\n' ' ') )
}

TenantNamesCompletion_arr=()
function TenantNamesCompletion_fn() {
  [ "${#TenantNamesCompletion_arr[@]}" -ne 0 ] && return

  TenantNamesCompletion_arr=( $(cat "$(get_astra_dir)/completions-cache/$(get_profile)/tenant_names" 2>/dev/null | tr '\n' ' ') )
}

PcuGroupsCompletion_arr=()
function PcuGroupsCompletion_fn() {
  [ "${#PcuGroupsCompletion_arr[@]}" -ne 0 ] && return

  PcuGroupsCompletion_arr=( $(cat "$(get_astra_dir)/completions-cache/$(get_profile)/pcu_groups" 2>/dev/null | tr '\n' ' ') )
}

AvailableProfilesCompletion_arr=()
function AvailableProfilesCompletion_fn() {
  [ "${#AvailableProfilesCompletion_arr[@]}" -ne 0 ] && return

  RC_FILE=$(get_astra_rc);
  AvailableProfilesCompletion_arr=();
  
  if [ -f "$RC_FILE" ]; then
    while IFS= read -r line; do
      AvailableProfilesCompletion_arr+=("$line");
    done < <(grep '^\[.*\]$' "$RC_FILE" | tr -d '[]');
  fi
}

if [ -n "$BASH_VERSION" ]; then
  # Enable programmable completion facilities when using bash (see [3])
  shopt -s progcomp
elif [ -n "$ZSH_VERSION" ]; then
  # Make alias a distinct command for completion purposes when using zsh (see [4])
  setopt COMPLETE_ALIASES
  alias compopt=complete

  # Enable bash completion in zsh (see [7])
  # Only initialize completions module once to avoid unregistering existing completions.
  if ! type compdef > /dev/null; then
    autoload -U +X compinit && compinit
  fi
  autoload -U +X bashcompinit && bashcompinit
fi

# CompWordsContainsArray takes an array and then checks
# if all elements of this array are in the global COMP_WORDS array.
#
# Returns zero (no error) if all elements of the array are in the COMP_WORDS array,
# otherwise returns 1 (error).
function CompWordsContainsArray() {
  declare -a localArray
  localArray=("$@")
  local findme
  for findme in "${localArray[@]}"; do
    if ElementNotInCompWords "$findme"; then return 1; fi
  done
  return 0
}
function ElementNotInCompWords() {
  local findme="$1"
  local element
  for element in "${COMP_WORDS[@]}"; do
    if [[ "$findme" = "$element" ]]; then return 1; fi
  done
  return 0
}

# The `currentPositionalIndex` function calculates the index of the current positional parameter.
#
# currentPositionalIndex takes three parameters:
# the command name,
# a space-separated string with the names of options that take a parameter, and
# a space-separated string with the names of boolean options (that don't take any params).
# When done, this function echos the current positional index to std_out.
#
# Example usage:
# local currIndex=$(currentPositionalIndex "mysubcommand" "$ARG_OPTS" "$FLAG_OPTS")
function currentPositionalIndex() {
  local commandName="$1"
  local optionsWithArgs="$2"
  local booleanOptions="$3"
  local previousWord
  local result=0

  for i in $(seq $((COMP_CWORD - 1)) -1 0); do
    previousWord=${COMP_WORDS[i]}
    if [ "${previousWord}" = "$commandName" ]; then
      break
    fi
    if [[ "${optionsWithArgs}" =~ ${previousWord} ]]; then
      ((result-=2)) # Arg option and its value not counted as positional param
    elif [[ "${booleanOptions}" =~ ${previousWord} ]]; then
      ((result-=1)) # Flag option itself not counted as positional param
    fi
    ((result++))
  done
  echo "$result"
}

# compReplyArray generates a list of completion suggestions based on an array, ensuring all values are properly escaped.
#
# compReplyArray takes a single parameter: the array of options to be displayed
#
# The output is echoed to std_out, one option per line.
#
# Example usage:
# local options=("foo", "bar", "baz")
# local IFS=$'\n'
# COMPREPLY=($(compReplyArray "${options[@]}"))
function compReplyArray() {
  declare -a options
  options=("$@")
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local i
  local quoted
  local optionList=()

  for (( i=0; i<${#options[@]}; i++ )); do
    # Double escape, since we want escaped values, but compgen -W expands the argument
    printf -v quoted %q "${options[i]}"
    quoted=\'${quoted//\'/\'\\\'\'}\'

    optionList[i]=$quoted
  done

  # We also have to add another round of escaping to $curr_word.
  curr_word=${curr_word//\\/\\\\}
  curr_word=${curr_word//\'/\\\'}

  # Actually generate completions.
  local IFS=$'\n'
  echo -e "$(compgen -W "${optionList[*]}" -- "$curr_word")"
}

# Bash completion entry point function.
# _complete_astra finds which commands and subcommands have been specified
# on the command line and delegates to the appropriate function
# to generate possible options and subcommands for the last specified subcommand.
function _complete_astra() {
  # Edge case: if command line has no space after subcommand, then don't assume this subcommand is selected (remkop/picocli#1468).
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} setup" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} org" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} role" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} token" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} user" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} upgrade" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} shellenv" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} nuke" ];    then _picocli_astra; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config list" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config create" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config get" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config describe" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config delete" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config rename" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config use" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config path" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config home" ];    then _picocli_astra_config; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} config home path" ];    then _picocli_astra_config_home; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db get" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db describe" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db create" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db delete" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db status" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db cqlsh" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db dsbulk" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db create-dotenv" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db download-scb" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db resume" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-keyspaces" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db create-keyspace" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db delete-keyspace" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-collections" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db create-collection" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db describe-collection" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db delete-collection" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db truncate-collection" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-tables" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db describe-table" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db delete-table" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db truncate-table" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-embedding-providers" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-cdcs" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db create-cdc" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db delete-cdc" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db create-region" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db delete-region" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-regions" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db list-clouds" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db regions" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db endpoints" ];    then _picocli_astra_db; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db cqlsh start" ];    then _picocli_astra_db_cqlsh; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db cqlsh exec" ];    then _picocli_astra_db_cqlsh; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db cqlsh version" ];    then _picocli_astra_db_cqlsh; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db cqlsh path" ];    then _picocli_astra_db_cqlsh; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db dsbulk count" ];    then _picocli_astra_db_dsbulk; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db dsbulk load" ];    then _picocli_astra_db_dsbulk; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db dsbulk unload" ];    then _picocli_astra_db_dsbulk; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db dsbulk version" ];    then _picocli_astra_db_dsbulk; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db dsbulk path" ];    then _picocli_astra_db_dsbulk; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db regions classic" ];    then _picocli_astra_db_regions; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db regions serverless" ];    then _picocli_astra_db_regions; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db regions vector" ];    then _picocli_astra_db_regions; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db endpoints list" ];    then _picocli_astra_db_endpoints; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db endpoints api" ];    then _picocli_astra_db_endpoints; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db endpoints data-api" ];    then _picocli_astra_db_endpoints; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db endpoints swagger" ];    then _picocli_astra_db_endpoints; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} db endpoints playground" ];    then _picocli_astra_db_endpoints; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu list" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu get" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu describe" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu status" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu park" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu unpark" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu create" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu update" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu delete" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu associate" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu disassociate" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu list-associations" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} pcu transfer-association" ];    then _picocli_astra_pcu; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} org get" ];    then _picocli_astra_org; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} org id" ];    then _picocli_astra_org; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} org name" ];    then _picocli_astra_org; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} role list" ];    then _picocli_astra_role; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} role get" ];    then _picocli_astra_role; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} role describe" ];    then _picocli_astra_role; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming list" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming get" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming describe" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming create" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming delete" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming status" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming pulsar" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming pulsar-token" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming list-regions" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming list-clouds" ];    then _picocli_astra_streaming; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming pulsar shell" ];    then _picocli_astra_streaming_pulsar; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming pulsar version" ];    then _picocli_astra_streaming_pulsar; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} streaming pulsar path" ];    then _picocli_astra_streaming_pulsar; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} token list" ];    then _picocli_astra_token; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} token get" ];    then _picocli_astra_token; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} token create" ];    then _picocli_astra_token; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} token delete" ];    then _picocli_astra_token; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} token revoke" ];    then _picocli_astra_token; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} user list" ];    then _picocli_astra_user; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} user get" ];    then _picocli_astra_user; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} user describe" ];    then _picocli_astra_user; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} user invite" ];    then _picocli_astra_user; return $?; fi
  if [ "${COMP_LINE}" = "${COMP_WORDS[0]} user delete" ];    then _picocli_astra_user; return $?; fi

  # Find the longest sequence of subcommands and call the bash function for that subcommand.
  local cmds0=(setup)
  local cmds1=(config)
  local cmds2=(db)
  local cmds3=(pcu)
  local cmds4=(org)
  local cmds5=(role)
  local cmds6=(streaming)
  local cmds7=(token)
  local cmds8=(user)
  local cmds9=(upgrade)
  local cmds10=(shellenv)
  local cmds11=(nuke)
  local cmds12=(config list)
  local cmds13=(config create)
  local cmds14=(config get)
  local cmds15=(config describe)
  local cmds16=(config delete)
  local cmds17=(config rename)
  local cmds18=(config use)
  local cmds19=(config path)
  local cmds20=(config home)
  local cmds21=(config home path)
  local cmds22=(db list)
  local cmds23=(db get)
  local cmds24=(db describe)
  local cmds25=(db create)
  local cmds26=(db delete)
  local cmds27=(db status)
  local cmds28=(db cqlsh)
  local cmds29=(db dsbulk)
  local cmds30=(db create-dotenv)
  local cmds31=(db download-scb)
  local cmds32=(db resume)
  local cmds33=(db list-keyspaces)
  local cmds34=(db create-keyspace)
  local cmds35=(db delete-keyspace)
  local cmds36=(db list-collections)
  local cmds37=(db create-collection)
  local cmds38=(db describe-collection)
  local cmds39=(db delete-collection)
  local cmds40=(db truncate-collection)
  local cmds41=(db list-tables)
  local cmds42=(db describe-table)
  local cmds43=(db delete-table)
  local cmds44=(db truncate-table)
  local cmds45=(db list-embedding-providers)
  local cmds46=(db list-cdcs)
  local cmds47=(db create-cdc)
  local cmds48=(db delete-cdc)
  local cmds49=(db create-region)
  local cmds50=(db delete-region)
  local cmds51=(db list-regions)
  local cmds52=(db list-clouds)
  local cmds53=(db regions)
  local cmds54=(db endpoints)
  local cmds55=(db cqlsh start)
  local cmds56=(db cqlsh exec)
  local cmds57=(db cqlsh version)
  local cmds58=(db cqlsh path)
  local cmds59=(db dsbulk count)
  local cmds60=(db dsbulk load)
  local cmds61=(db dsbulk unload)
  local cmds62=(db dsbulk version)
  local cmds63=(db dsbulk path)
  local cmds64=(db regions classic)
  local cmds65=(db regions serverless)
  local cmds66=(db regions vector)
  local cmds67=(db endpoints list)
  local cmds68=(db endpoints api)
  local cmds69=(db endpoints data-api)
  local cmds70=(db endpoints swagger)
  local cmds71=(db endpoints playground)
  local cmds72=(pcu list)
  local cmds73=(pcu get)
  local cmds74=(pcu describe)
  local cmds75=(pcu status)
  local cmds76=(pcu park)
  local cmds77=(pcu unpark)
  local cmds78=(pcu create)
  local cmds79=(pcu update)
  local cmds80=(pcu delete)
  local cmds81=(pcu associate)
  local cmds82=(pcu disassociate)
  local cmds83=(pcu list-associations)
  local cmds84=(pcu transfer-association)
  local cmds85=(org get)
  local cmds86=(org id)
  local cmds87=(org name)
  local cmds88=(role list)
  local cmds89=(role get)
  local cmds90=(role describe)
  local cmds91=(streaming list)
  local cmds92=(streaming get)
  local cmds93=(streaming describe)
  local cmds94=(streaming create)
  local cmds95=(streaming delete)
  local cmds96=(streaming status)
  local cmds97=(streaming pulsar)
  local cmds98=(streaming pulsar-token)
  local cmds99=(streaming list-regions)
  local cmds100=(streaming list-clouds)
  local cmds101=(streaming pulsar shell)
  local cmds102=(streaming pulsar version)
  local cmds103=(streaming pulsar path)
  local cmds104=(token list)
  local cmds105=(token get)
  local cmds106=(token create)
  local cmds107=(token delete)
  local cmds108=(token revoke)
  local cmds109=(user list)
  local cmds110=(user get)
  local cmds111=(user describe)
  local cmds112=(user invite)
  local cmds113=(user delete)

  if CompWordsContainsArray "${cmds113[@]}"; then _picocli_astra_user_delete; return $?; fi
  if CompWordsContainsArray "${cmds112[@]}"; then _picocli_astra_user_invite; return $?; fi
  if CompWordsContainsArray "${cmds111[@]}"; then _picocli_astra_user_describe; return $?; fi
  if CompWordsContainsArray "${cmds110[@]}"; then _picocli_astra_user_get; return $?; fi
  if CompWordsContainsArray "${cmds109[@]}"; then _picocli_astra_user_list; return $?; fi
  if CompWordsContainsArray "${cmds108[@]}"; then _picocli_astra_token_revoke; return $?; fi
  if CompWordsContainsArray "${cmds107[@]}"; then _picocli_astra_token_delete; return $?; fi
  if CompWordsContainsArray "${cmds106[@]}"; then _picocli_astra_token_create; return $?; fi
  if CompWordsContainsArray "${cmds105[@]}"; then _picocli_astra_token_get; return $?; fi
  if CompWordsContainsArray "${cmds104[@]}"; then _picocli_astra_token_list; return $?; fi
  if CompWordsContainsArray "${cmds103[@]}"; then _picocli_astra_streaming_pulsar_path; return $?; fi
  if CompWordsContainsArray "${cmds102[@]}"; then _picocli_astra_streaming_pulsar_version; return $?; fi
  if CompWordsContainsArray "${cmds101[@]}"; then _picocli_astra_streaming_pulsar_shell; return $?; fi
  if CompWordsContainsArray "${cmds100[@]}"; then _picocli_astra_streaming_listclouds; return $?; fi
  if CompWordsContainsArray "${cmds99[@]}"; then _picocli_astra_streaming_listregions; return $?; fi
  if CompWordsContainsArray "${cmds98[@]}"; then _picocli_astra_streaming_pulsartoken; return $?; fi
  if CompWordsContainsArray "${cmds97[@]}"; then _picocli_astra_streaming_pulsar; return $?; fi
  if CompWordsContainsArray "${cmds96[@]}"; then _picocli_astra_streaming_status; return $?; fi
  if CompWordsContainsArray "${cmds95[@]}"; then _picocli_astra_streaming_delete; return $?; fi
  if CompWordsContainsArray "${cmds94[@]}"; then _picocli_astra_streaming_create; return $?; fi
  if CompWordsContainsArray "${cmds93[@]}"; then _picocli_astra_streaming_describe; return $?; fi
  if CompWordsContainsArray "${cmds92[@]}"; then _picocli_astra_streaming_get; return $?; fi
  if CompWordsContainsArray "${cmds91[@]}"; then _picocli_astra_streaming_list; return $?; fi
  if CompWordsContainsArray "${cmds90[@]}"; then _picocli_astra_role_describe; return $?; fi
  if CompWordsContainsArray "${cmds89[@]}"; then _picocli_astra_role_get; return $?; fi
  if CompWordsContainsArray "${cmds88[@]}"; then _picocli_astra_role_list; return $?; fi
  if CompWordsContainsArray "${cmds87[@]}"; then _picocli_astra_org_name; return $?; fi
  if CompWordsContainsArray "${cmds86[@]}"; then _picocli_astra_org_id; return $?; fi
  if CompWordsContainsArray "${cmds85[@]}"; then _picocli_astra_org_get; return $?; fi
  if CompWordsContainsArray "${cmds84[@]}"; then _picocli_astra_pcu_transferassociation; return $?; fi
  if CompWordsContainsArray "${cmds83[@]}"; then _picocli_astra_pcu_listassociations; return $?; fi
  if CompWordsContainsArray "${cmds82[@]}"; then _picocli_astra_pcu_disassociate; return $?; fi
  if CompWordsContainsArray "${cmds81[@]}"; then _picocli_astra_pcu_associate; return $?; fi
  if CompWordsContainsArray "${cmds80[@]}"; then _picocli_astra_pcu_delete; return $?; fi
  if CompWordsContainsArray "${cmds79[@]}"; then _picocli_astra_pcu_update; return $?; fi
  if CompWordsContainsArray "${cmds78[@]}"; then _picocli_astra_pcu_create; return $?; fi
  if CompWordsContainsArray "${cmds77[@]}"; then _picocli_astra_pcu_unpark; return $?; fi
  if CompWordsContainsArray "${cmds76[@]}"; then _picocli_astra_pcu_park; return $?; fi
  if CompWordsContainsArray "${cmds75[@]}"; then _picocli_astra_pcu_status; return $?; fi
  if CompWordsContainsArray "${cmds74[@]}"; then _picocli_astra_pcu_describe; return $?; fi
  if CompWordsContainsArray "${cmds73[@]}"; then _picocli_astra_pcu_get; return $?; fi
  if CompWordsContainsArray "${cmds72[@]}"; then _picocli_astra_pcu_list; return $?; fi
  if CompWordsContainsArray "${cmds71[@]}"; then _picocli_astra_db_endpoints_playground; return $?; fi
  if CompWordsContainsArray "${cmds70[@]}"; then _picocli_astra_db_endpoints_swagger; return $?; fi
  if CompWordsContainsArray "${cmds69[@]}"; then _picocli_astra_db_endpoints_dataapi; return $?; fi
  if CompWordsContainsArray "${cmds68[@]}"; then _picocli_astra_db_endpoints_api; return $?; fi
  if CompWordsContainsArray "${cmds67[@]}"; then _picocli_astra_db_endpoints_list; return $?; fi
  if CompWordsContainsArray "${cmds66[@]}"; then _picocli_astra_db_regions_vector; return $?; fi
  if CompWordsContainsArray "${cmds65[@]}"; then _picocli_astra_db_regions_serverless; return $?; fi
  if CompWordsContainsArray "${cmds64[@]}"; then _picocli_astra_db_regions_classic; return $?; fi
  if CompWordsContainsArray "${cmds63[@]}"; then _picocli_astra_db_dsbulk_path; return $?; fi
  if CompWordsContainsArray "${cmds62[@]}"; then _picocli_astra_db_dsbulk_version; return $?; fi
  if CompWordsContainsArray "${cmds61[@]}"; then _picocli_astra_db_dsbulk_unload; return $?; fi
  if CompWordsContainsArray "${cmds60[@]}"; then _picocli_astra_db_dsbulk_load; return $?; fi
  if CompWordsContainsArray "${cmds59[@]}"; then _picocli_astra_db_dsbulk_count; return $?; fi
  if CompWordsContainsArray "${cmds58[@]}"; then _picocli_astra_db_cqlsh_path; return $?; fi
  if CompWordsContainsArray "${cmds57[@]}"; then _picocli_astra_db_cqlsh_version; return $?; fi
  if CompWordsContainsArray "${cmds56[@]}"; then _picocli_astra_db_cqlsh_exec; return $?; fi
  if CompWordsContainsArray "${cmds55[@]}"; then _picocli_astra_db_cqlsh_start; return $?; fi
  if CompWordsContainsArray "${cmds54[@]}"; then _picocli_astra_db_endpoints; return $?; fi
  if CompWordsContainsArray "${cmds53[@]}"; then _picocli_astra_db_regions; return $?; fi
  if CompWordsContainsArray "${cmds52[@]}"; then _picocli_astra_db_listclouds; return $?; fi
  if CompWordsContainsArray "${cmds51[@]}"; then _picocli_astra_db_listregions; return $?; fi
  if CompWordsContainsArray "${cmds50[@]}"; then _picocli_astra_db_deleteregion; return $?; fi
  if CompWordsContainsArray "${cmds49[@]}"; then _picocli_astra_db_createregion; return $?; fi
  if CompWordsContainsArray "${cmds48[@]}"; then _picocli_astra_db_deletecdc; return $?; fi
  if CompWordsContainsArray "${cmds47[@]}"; then _picocli_astra_db_createcdc; return $?; fi
  if CompWordsContainsArray "${cmds46[@]}"; then _picocli_astra_db_listcdcs; return $?; fi
  if CompWordsContainsArray "${cmds45[@]}"; then _picocli_astra_db_listembeddingproviders; return $?; fi
  if CompWordsContainsArray "${cmds44[@]}"; then _picocli_astra_db_truncatetable; return $?; fi
  if CompWordsContainsArray "${cmds43[@]}"; then _picocli_astra_db_deletetable; return $?; fi
  if CompWordsContainsArray "${cmds42[@]}"; then _picocli_astra_db_describetable; return $?; fi
  if CompWordsContainsArray "${cmds41[@]}"; then _picocli_astra_db_listtables; return $?; fi
  if CompWordsContainsArray "${cmds40[@]}"; then _picocli_astra_db_truncatecollection; return $?; fi
  if CompWordsContainsArray "${cmds39[@]}"; then _picocli_astra_db_deletecollection; return $?; fi
  if CompWordsContainsArray "${cmds38[@]}"; then _picocli_astra_db_describecollection; return $?; fi
  if CompWordsContainsArray "${cmds37[@]}"; then _picocli_astra_db_createcollection; return $?; fi
  if CompWordsContainsArray "${cmds36[@]}"; then _picocli_astra_db_listcollections; return $?; fi
  if CompWordsContainsArray "${cmds35[@]}"; then _picocli_astra_db_deletekeyspace; return $?; fi
  if CompWordsContainsArray "${cmds34[@]}"; then _picocli_astra_db_createkeyspace; return $?; fi
  if CompWordsContainsArray "${cmds33[@]}"; then _picocli_astra_db_listkeyspaces; return $?; fi
  if CompWordsContainsArray "${cmds32[@]}"; then _picocli_astra_db_resume; return $?; fi
  if CompWordsContainsArray "${cmds31[@]}"; then _picocli_astra_db_downloadscb; return $?; fi
  if CompWordsContainsArray "${cmds30[@]}"; then _picocli_astra_db_createdotenv; return $?; fi
  if CompWordsContainsArray "${cmds29[@]}"; then _picocli_astra_db_dsbulk; return $?; fi
  if CompWordsContainsArray "${cmds28[@]}"; then _picocli_astra_db_cqlsh; return $?; fi
  if CompWordsContainsArray "${cmds27[@]}"; then _picocli_astra_db_status; return $?; fi
  if CompWordsContainsArray "${cmds26[@]}"; then _picocli_astra_db_delete; return $?; fi
  if CompWordsContainsArray "${cmds25[@]}"; then _picocli_astra_db_create; return $?; fi
  if CompWordsContainsArray "${cmds24[@]}"; then _picocli_astra_db_describe; return $?; fi
  if CompWordsContainsArray "${cmds23[@]}"; then _picocli_astra_db_get; return $?; fi
  if CompWordsContainsArray "${cmds22[@]}"; then _picocli_astra_db_list; return $?; fi
  if CompWordsContainsArray "${cmds21[@]}"; then _picocli_astra_config_home_path; return $?; fi
  if CompWordsContainsArray "${cmds20[@]}"; then _picocli_astra_config_home; return $?; fi
  if CompWordsContainsArray "${cmds19[@]}"; then _picocli_astra_config_path; return $?; fi
  if CompWordsContainsArray "${cmds18[@]}"; then _picocli_astra_config_use; return $?; fi
  if CompWordsContainsArray "${cmds17[@]}"; then _picocli_astra_config_rename; return $?; fi
  if CompWordsContainsArray "${cmds16[@]}"; then _picocli_astra_config_delete; return $?; fi
  if CompWordsContainsArray "${cmds15[@]}"; then _picocli_astra_config_describe; return $?; fi
  if CompWordsContainsArray "${cmds14[@]}"; then _picocli_astra_config_get; return $?; fi
  if CompWordsContainsArray "${cmds13[@]}"; then _picocli_astra_config_create; return $?; fi
  if CompWordsContainsArray "${cmds12[@]}"; then _picocli_astra_config_list; return $?; fi
  if CompWordsContainsArray "${cmds11[@]}"; then _picocli_astra_nuke; return $?; fi
  if CompWordsContainsArray "${cmds10[@]}"; then _picocli_astra_shellenv; return $?; fi
  if CompWordsContainsArray "${cmds9[@]}"; then _picocli_astra_upgrade; return $?; fi
  if CompWordsContainsArray "${cmds8[@]}"; then _picocli_astra_user; return $?; fi
  if CompWordsContainsArray "${cmds7[@]}"; then _picocli_astra_token; return $?; fi
  if CompWordsContainsArray "${cmds6[@]}"; then _picocli_astra_streaming; return $?; fi
  if CompWordsContainsArray "${cmds5[@]}"; then _picocli_astra_role; return $?; fi
  if CompWordsContainsArray "${cmds4[@]}"; then _picocli_astra_org; return $?; fi
  if CompWordsContainsArray "${cmds3[@]}"; then _picocli_astra_pcu; return $?; fi
  if CompWordsContainsArray "${cmds2[@]}"; then _picocli_astra_db; return $?; fi
  if CompWordsContainsArray "${cmds1[@]}"; then _picocli_astra_config; return $?; fi
  if CompWordsContainsArray "${cmds0[@]}"; then _picocli_astra_setup; return $?; fi

  # No subcommands were specified; generate completions for the top-level command.
  _picocli_astra; return $?;
}

# Generates completions for the options and subcommands of the `astra` command.
function _picocli_astra() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="setup config db pcu org role streaming token user upgrade shellenv nuke"
  local flag_opts="'-v' '--version'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `setup` subcommand.
function _picocli_astra_setup() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--token' '-t' '--env' '-e' '--name'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--token'|'-t')
      return
      ;;
    '--env'|'-e')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--name')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `config` subcommand.
function _picocli_astra_config() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="list create get describe delete rename use path home"
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--env' '-e'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
    '--env'|'-e')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `db` subcommand.
function _picocli_astra_db() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="list get describe create delete status cqlsh dsbulk create-dotenv download-scb resume list-keyspaces create-keyspace delete-keyspace list-collections create-collection describe-collection delete-collection truncate-collection list-tables describe-table delete-table truncate-table list-embedding-providers list-cdcs create-cdc delete-cdc create-region delete-region list-regions list-clouds regions endpoints"
  local flag_opts="'-v' '--vector'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `pcu` subcommand.
function _picocli_astra_pcu() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="list get describe status park unpark create update delete associate disassociate list-associations transfer-association"
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `org` subcommand.
function _picocli_astra_org() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="get id name"
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `role` subcommand.
function _picocli_astra_role() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="list get describe"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `streaming` subcommand.
function _picocli_astra_streaming() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="list get describe create delete status pulsar pulsar-token list-regions list-clouds"
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `token` subcommand.
function _picocli_astra_token() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands="list get create delete revoke"
  local flag_opts="'-c' '--copy' '--validate'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `user` subcommand.
function _picocli_astra_user() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="list get describe invite delete"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `upgrade` subcommand.
function _picocli_astra_upgrade() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--pre' '--prerelease' '--allow-reinstall'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '-v' '--version'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '-v'|'--version')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `shellenv` subcommand.
function _picocli_astra_shellenv() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--ignore-multiple-paths' '--no-update-notifier'"
  local arg_opts="'--home' '--rc'"

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--home')
      return
      ;;
    '--rc')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `nuke` subcommand.
function _picocli_astra_nuke() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--dry-run' '--yes' '-y'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--preserve-astrarc'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--preserve-astrarc')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_config_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--env' '-e'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
    '--env'|'-e')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create` subcommand.
function _picocli_astra_config_create() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'-d' '--default'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--token' '-t' '--env' '-e' '--overwrite'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
    '--token'|'-t')
      return
      ;;
    '--env'|'-e')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--overwrite')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_config_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  local KEY_option_args=("ASTRA_DB_APPLICATION_TOKEN" "ASTRA_ENV") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  AvailableProfilesCompletion_fn
  local NAME_pos_param_args=("${AvailableProfilesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "get" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${NAME_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe` subcommand.
function _picocli_astra_config_describe() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  local KEY_option_args=("ASTRA_DB_APPLICATION_TOKEN" "ASTRA_ENV") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  AvailableProfilesCompletion_fn
  local NAME_pos_param_args=("${AvailableProfilesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${NAME_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete` subcommand.
function _picocli_astra_config_delete() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
  esac
  AvailableProfilesCompletion_fn
  local NAME_pos_param_args=("${AvailableProfilesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${NAME_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `rename` subcommand.
function _picocli_astra_config_rename() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
  esac
  AvailableProfilesCompletion_fn
  local NAME_pos_param_args=("${AvailableProfilesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "rename" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${NAME_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `use` subcommand.
function _picocli_astra_config_use() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      local IFS=$'\n'
      type compopt &>/dev/null && compopt -o filenames
      COMPREPLY=( $( compgen -f -- "${curr_word}" ) ) # files
      return $?
      ;;
  esac
  AvailableProfilesCompletion_fn
  local NAME_pos_param_args=("${AvailableProfilesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "use" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${NAME_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `path` subcommand.
function _picocli_astra_config_path() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'-p' '--plain' '-i' '--info'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `home` subcommand.
function _picocli_astra_config_home() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="path"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `path` subcommand.
function _picocli_astra_config_home_path() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'-p' '--plain' '-i' '--info'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_db_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'-v' '--vector'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_db_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEY_option_args=("name" "id" "status" "cloud" "keyspace" "keyspaces" "region" "regions" "creation_time" "vector") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "get" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe` subcommand.
function _picocli_astra_db_describe() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEY_option_args=("name" "id" "status" "cloud" "keyspace" "keyspaces" "region" "regions" "creation_time" "vector") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create` subcommand.
function _picocli_astra_db_create() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists' '--allow-duplicate-names' '--non-vector' '--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r' '--cloud' '-c' '--keyspace' '-k' '--tier' '--capacity-units' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local CLOUD_option_args=("GCP" "AZURE" "AWS") # --cloud values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${CLOUD_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--tier')
      return
      ;;
    '--capacity-units')
      return
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete` subcommand.
function _picocli_astra_db_delete() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists' '--yes' '--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `status` subcommand.
function _picocli_astra_db_status() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "status" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `cqlsh` subcommand.
function _picocli_astra_db_cqlsh() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="start exec version path"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `dsbulk` subcommand.
function _picocli_astra_db_dsbulk() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="count load unload version path"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create-dotenv` subcommand.
function _picocli_astra_db_createdotenv() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--print'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--overwrite' '--file' '--keyspace' '-k' '--region' '-r' '--keys' '--preset'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEYS_option_args=("ASTRA_ORG_ID" "ASTRA_ORG_NAME" "ASTRA_ORG_TOKEN" "ASTRA_DB_ID" "ASTRA_DB_REGION" "ASTRA_DB_KEYSPACE" "ASTRA_DB_APPLICATION_TOKEN" "ASTRA_DB_ENVIRONMENT" "ASTRA_DB_SECURE_BUNDLE_PATH" "ASTRA_DB_SECURE_BUNDLE_URL" "ASTRA_DB_GRAPHQL_URL" "ASTRA_DB_GRAPHQL_URL_PLAYGROUND" "ASTRA_DB_GRAPHQL_URL_SCHEMA" "ASTRA_DB_GRAPHQL_URL_ADMIN" "ASTRA_DB_API_ENDPOINT" "ASTRA_DB_API_ENDPOINT_SWAGGER" "ASTRA_DB_REST_URL" "ASTRA_DB_REST_URL_SWAGGER" "ASTRA_STREAMING_NAME" "ASTRA_STREAMING_CLOUD" "ASTRA_STREAMING_REGION" "ASTRA_STREAMING_PULSAR_TOKEN" "ASTRA_STREAMING_BROKER_URL" "ASTRA_STREAMING_WEBSERVICE_URL" "ASTRA_STREAMING_WEBSOCKET_URL") # --keys values
  local PRESETS_option_args=("data_api_client") # --preset values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--overwrite')
      return
      ;;
    '--file')
      return
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--region'|'-r')
      return
      ;;
    '--keys')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEYS_option_args[@]}" ) )
      return $?
      ;;
    '--preset')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${PRESETS_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create-dotenv" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `download-scb` subcommand.
function _picocli_astra_db_downloadscb() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r' '-f' '--file'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
    '-f'|'--file')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "download-scb" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `resume` subcommand.
function _picocli_astra_db_resume() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "resume" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-keyspaces` subcommand.
function _picocli_astra_db_listkeyspaces() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-keyspaces" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create-keyspace` subcommand.
function _picocli_astra_db_createkeyspace() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists' '--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create-keyspace" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete-keyspace` subcommand.
function _picocli_astra_db_deletekeyspace() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists' '--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete-keyspace" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-collections` subcommand.
function _picocli_astra_db_listcollections() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--all' '-a'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-collections" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create-collection` subcommand.
function _picocli_astra_db_createcollection() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--collection' '-c' '-d' '--dimension' '--default-id' '-m' '--metric' '--indexing-allow' '--indexing-deny' '--embedding-provider' '--embedding-model' '--embedding-key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--collection'|'-c')
      return
      ;;
    '-d'|'--dimension')
      return
      ;;
    '--default-id')
      return
      ;;
    '-m'|'--metric')
      return
      ;;
    '--indexing-allow')
      return
      ;;
    '--indexing-deny')
      return
      ;;
    '--embedding-provider')
      return
      ;;
    '--embedding-model')
      return
      ;;
    '--embedding-key')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create-collection" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe-collection` subcommand.
function _picocli_astra_db_describecollection() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--collection' '-c'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--collection'|'-c')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe-collection" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete-collection` subcommand.
function _picocli_astra_db_deletecollection() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--collection' '-c'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--collection'|'-c')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete-collection" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `truncate-collection` subcommand.
function _picocli_astra_db_truncatecollection() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--collection' '-c'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--collection'|'-c')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "truncate-collection" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-tables` subcommand.
function _picocli_astra_db_listtables() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--all' '-a'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-tables" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe-table` subcommand.
function _picocli_astra_db_describetable() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '-t'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table'|'-t')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe-table" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete-table` subcommand.
function _picocli_astra_db_deletetable() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '-t'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table'|'-t')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete-table" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `truncate-table` subcommand.
function _picocli_astra_db_truncatetable() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '-t'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table'|'-t')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "truncate-table" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-embedding-providers` subcommand.
function _picocli_astra_db_listembeddingproviders() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-embedding-providers" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-cdcs` subcommand.
function _picocli_astra_db_listcdcs() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-cdcs" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create-cdc` subcommand.
function _picocli_astra_db_createcdc() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '--tenant' '--topic-partitions'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table')
      return
      ;;
    '--tenant')
      return
      ;;
    '--topic-partitions')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create-cdc" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete-cdc` subcommand.
function _picocli_astra_db_deletecdc() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--cdc-id' '--keyspace' '-k' '--table' '--tenant'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  TenantNamesCompletion_fn
  local TENANT_option_args=("${TenantNamesCompletion_arr[@]}")

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--cdc-id')
      return
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table')
      return
      ;;
    '--tenant')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${TENANT_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete-cdc" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create-region` subcommand.
function _picocli_astra_db_createregion() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--async' '--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create-region" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete-region` subcommand.
function _picocli_astra_db_deleteregion() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--async' '--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
    '--timeout')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete-region" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-regions` subcommand.
function _picocli_astra_db_listregions() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-regions" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-clouds` subcommand.
function _picocli_astra_db_listclouds() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `regions` subcommand.
function _picocli_astra_db_regions() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="classic serverless vector"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `endpoints` subcommand.
function _picocli_astra_db_endpoints() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="list api data-api swagger playground"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `start` subcommand.
function _picocli_astra_db_cqlsh_start() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--debug'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--encoding' '--connect-timeout' '--secure-connect-bundle' '-b' '--keyspace' '-k' '--request-timeout' '--region' '-r'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--encoding')
      return
      ;;
    '--connect-timeout')
      return
      ;;
    '--secure-connect-bundle'|'-b')
      return
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--request-timeout')
      return
      ;;
    '--region'|'-r')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "start" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `exec` subcommand.
function _picocli_astra_db_cqlsh_exec() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--debug'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--encoding' '--connect-timeout' '--secure-connect-bundle' '-b' '--keyspace' '-k' '--request-timeout' '--region' '-r' '-e' '--execute' '-f' '--file'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--encoding')
      return
      ;;
    '--connect-timeout')
      return
      ;;
    '--secure-connect-bundle'|'-b')
      return
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--request-timeout')
      return
      ;;
    '--region'|'-r')
      return
      ;;
    '-e'|'--execute')
      return
      ;;
    '-f'|'--file')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "exec" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `version` subcommand.
function _picocli_astra_db_cqlsh_version() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--debug'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--encoding' '--connect-timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--encoding')
      return
      ;;
    '--connect-timeout')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `path` subcommand.
function _picocli_astra_db_cqlsh_path() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `count` subcommand.
function _picocli_astra_db_dsbulk_count() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '-t' '--encoding' '--max-concurrent-queries' '--log-dir' '--region' '-r' '--dsbulk-config' '--dsbulk-flag' '-F' '-query' '--schema.query'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table'|'-t')
      return
      ;;
    '--encoding')
      return
      ;;
    '--max-concurrent-queries')
      return
      ;;
    '--log-dir')
      return
      ;;
    '--region'|'-r')
      return
      ;;
    '--dsbulk-config')
      return
      ;;
    '--dsbulk-flag'|'-F')
      return
      ;;
    '-query'|'--schema.query')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "count" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `load` subcommand.
function _picocli_astra_db_dsbulk_load() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--header' '--dry-run' '--allow-missing-fields'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '-t' '--encoding' '--max-concurrent-queries' '--log-dir' '--region' '-r' '--dsbulk-config' '--dsbulk-flag' '-F' '--url' '--delimiter' '-m' '--schema.mapping' '--skip-records' '--max-errors'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table'|'-t')
      return
      ;;
    '--encoding')
      return
      ;;
    '--max-concurrent-queries')
      return
      ;;
    '--log-dir')
      return
      ;;
    '--region'|'-r')
      return
      ;;
    '--dsbulk-config')
      return
      ;;
    '--dsbulk-flag'|'-F')
      return
      ;;
    '--url')
      return
      ;;
    '--delimiter')
      return
      ;;
    '-m'|'--schema.mapping')
      return
      ;;
    '--skip-records')
      return
      ;;
    '--max-errors')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "load" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `unload` subcommand.
function _picocli_astra_db_dsbulk_unload() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--header'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--keyspace' '-k' '--table' '-t' '--encoding' '--max-concurrent-queries' '--log-dir' '--region' '-r' '--dsbulk-config' '--dsbulk-flag' '-F' '--url' '--delimiter' '-m' '--schema.mapping' '--skip-records' '--max-errors' '-query' '--schema.query'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--keyspace'|'-k')
      return
      ;;
    '--table'|'-t')
      return
      ;;
    '--encoding')
      return
      ;;
    '--max-concurrent-queries')
      return
      ;;
    '--log-dir')
      return
      ;;
    '--region'|'-r')
      return
      ;;
    '--dsbulk-config')
      return
      ;;
    '--dsbulk-flag'|'-F')
      return
      ;;
    '--url')
      return
      ;;
    '--delimiter')
      return
      ;;
    '-m'|'--schema.mapping')
      return
      ;;
    '--skip-records')
      return
      ;;
    '--max-errors')
      return
      ;;
    '-query'|'--schema.query')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "unload" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `version` subcommand.
function _picocli_astra_db_dsbulk_version() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `path` subcommand.
function _picocli_astra_db_dsbulk_path() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `classic` subcommand.
function _picocli_astra_db_regions_classic() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-f' '--filter' '--cloud' '-c' '-z' '--zone'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local FILTER_option_args=("GCP" "AZURE" "AWS") # --cloud values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-f'|'--filter')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FILTER_option_args[@]}" ) )
      return $?
      ;;
    '-z'|'--zone')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `serverless` subcommand.
function _picocli_astra_db_regions_serverless() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-f' '--filter' '--cloud' '-c' '-z' '--zone'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local FILTER_option_args=("GCP" "AZURE" "AWS") # --cloud values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-f'|'--filter')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FILTER_option_args[@]}" ) )
      return $?
      ;;
    '-z'|'--zone')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `vector` subcommand.
function _picocli_astra_db_regions_vector() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-f' '--filter' '--cloud' '-c' '-z' '--zone'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local FILTER_option_args=("GCP" "AZURE" "AWS") # --cloud values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-f'|'--filter')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FILTER_option_args[@]}" ) )
      return $?
      ;;
    '-z'|'--zone')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_db_endpoints_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `api` subcommand.
function _picocli_astra_db_endpoints_api() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "api" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `data-api` subcommand.
function _picocli_astra_db_endpoints_dataapi() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "data-api" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `swagger` subcommand.
function _picocli_astra_db_endpoints_swagger() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "swagger" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `playground` subcommand.
function _picocli_astra_db_endpoints_playground() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--region' '-r'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
  esac
  DbNamesCompletion_fn
  local DB_pos_param_args=("${DbNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "playground" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${DB_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_pcu_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_pcu_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEY_option_args=("title" "description" "id" "status" "cloud" "region" "type" "min" "max" "reserved") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "get" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe` subcommand.
function _picocli_astra_pcu_describe() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEY_option_args=("title" "description" "id" "status" "cloud" "region" "type" "min" "max" "reserved") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `status` subcommand.
function _picocli_astra_pcu_status() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "status" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `park` subcommand.
function _picocli_astra_pcu_park() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--timeout')
      return
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "park" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `unpark` subcommand.
function _picocli_astra_pcu_unpark() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--async'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--timeout'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--timeout')
      return
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "unpark" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create` subcommand.
function _picocli_astra_pcu_create() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists' '--allow-duplicate-names'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--cloud' '-c' '--region' '-r' '--description' '-d' '--instance-type' '-it' '--provision-type' '-pt' '--min' '--max' '--reserved'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local CLOUD_option_args=("GCP" "AZURE" "AWS") # --cloud values
  local TYPE_option_args=("SHARED" "DEDICATED") # --provision-type values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${CLOUD_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
    '--description'|'-d')
      return
      ;;
    '--instance-type'|'-it')
      return
      ;;
    '--provision-type'|'-pt')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${TYPE_option_args[@]}" ) )
      return $?
      ;;
    '--min')
      return
      ;;
    '--max')
      return
      ;;
    '--reserved')
      return
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `update` subcommand.
function _picocli_astra_pcu_update() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--allow-duplicate-names'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--title' '-t' '--cloud' '-c' '--region' '-r' '--description' '-d' '--instance-type' '-it' '--provision-type' '-pt' '--min' '--max' '--reserved'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local CLOUD_option_args=("GCP" "AZURE" "AWS") # --cloud values
  local TYPE_option_args=("SHARED" "DEDICATED") # --provision-type values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--title'|'-t')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${CLOUD_option_args[@]}" ) )
      return $?
      ;;
    '--region'|'-r')
      return
      ;;
    '--description'|'-d')
      return
      ;;
    '--instance-type'|'-it')
      return
      ;;
    '--provision-type'|'-pt')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${TYPE_option_args[@]}" ) )
      return $?
      ;;
    '--min')
      return
      ;;
    '--max')
      return
      ;;
    '--reserved')
      return
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "update" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete` subcommand.
function _picocli_astra_pcu_delete() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists' '--yes'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `associate` subcommand.
function _picocli_astra_pcu_associate() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")
  PcuAssocTargetsCompletion_fn
  local TARGET_pos_param_args=("${PcuAssocTargetsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "associate" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    elif (( currIndex >= 1 && currIndex <= 1 )); then
      positionals=$( compReplyArray "${TARGET_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `disassociate` subcommand.
function _picocli_astra_pcu_disassociate() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")
  PcuAssocTargetsCompletion_fn
  local TARGET_pos_param_args=("${PcuAssocTargetsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "disassociate" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    elif (( currIndex >= 1 && currIndex <= 1 )); then
      positionals=$( compReplyArray "${TARGET_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-associations` subcommand.
function _picocli_astra_pcu_listassociations() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--all' '-a'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuGroupsCompletion_fn
  local GROUP_pos_param_args=("${PcuGroupsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "list-associations" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${GROUP_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `transfer-association` subcommand.
function _picocli_astra_pcu_transferassociation() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--or-create' '--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--from' '-f' '--to' '-t'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  PcuGroupsCompletion_fn
  local GROUP_option_args=("${PcuGroupsCompletion_arr[@]}")
  PcuGroupsCompletion_fn
  local GROUP_option_args=("${PcuGroupsCompletion_arr[@]}")

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--from'|'-f')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${GROUP_option_args[@]}" ) )
      return $?
      ;;
    '--to'|'-t')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${GROUP_option_args[@]}" ) )
      return $?
      ;;
  esac
  PcuAssocTargetsCompletion_fn
  local TARGET_pos_param_args=("${PcuAssocTargetsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "transfer-association" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TARGET_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_org_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `id` subcommand.
function _picocli_astra_org_id() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `name` subcommand.
function _picocli_astra_org_name() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_role_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_role_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  RoleNamesCompletion_fn
  local ROLE_pos_param_args=("${RoleNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "get" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${ROLE_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe` subcommand.
function _picocli_astra_role_describe() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  RoleNamesCompletion_fn
  local ROLE_pos_param_args=("${RoleNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${ROLE_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_streaming_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_streaming_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEY_option_args=("status" "cloud" "pulsar_token" "region") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "get" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe` subcommand.
function _picocli_astra_streaming_describe() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-k' '--key'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local KEY_option_args=("status" "cloud" "pulsar_token" "region") # --key values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-k'|'--key')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${KEY_option_args[@]}" ) )
      return $?
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create` subcommand.
function _picocli_astra_streaming_create() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '--plan' '-e' '--email' '--cluster' '--region' '-r' '--cloud' '-c'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local CLOUD_option_args=("GCP" "AZURE" "AWS") # --cloud values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '--plan')
      return
      ;;
    '-e'|'--email')
      return
      ;;
    '--cluster')
      return
      ;;
    '--region'|'-r')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${CLOUD_option_args[@]}" ) )
      return $?
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "create" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete` subcommand.
function _picocli_astra_streaming_delete() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `status` subcommand.
function _picocli_astra_streaming_status() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "status" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `pulsar` subcommand.
function _picocli_astra_streaming_pulsar() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}

  local commands="shell version path"
  local flag_opts=""
  local arg_opts=""

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `pulsar-token` subcommand.
function _picocli_astra_streaming_pulsartoken() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "pulsar-token" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-regions` subcommand.
function _picocli_astra_streaming_listregions() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-f' '--filter' '--cloud' '-c'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  local FILTER_option_args=("GCP" "AZURE" "AWS") # --cloud values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-f'|'--filter')
      return
      ;;
    '--cloud'|'-c')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FILTER_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list-clouds` subcommand.
function _picocli_astra_streaming_listclouds() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `shell` subcommand.
function _picocli_astra_streaming_pulsar_shell() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'-F' '--fail-on-error' '-np' '--no-progress'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-e' '--execute' '-f' '--file'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-e'|'--execute')
      return
      ;;
    '-f'|'--file')
      return
      ;;
  esac
  TenantNamesCompletion_fn
  local TENANT_pos_param_args=("${TenantNamesCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "shell" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${TENANT_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `version` subcommand.
function _picocli_astra_streaming_pulsar_version() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `path` subcommand.
function _picocli_astra_streaming_pulsar_path() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_token_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_token_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'-c' '--copy' '--validate'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `create` subcommand.
function _picocli_astra_token_create() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-r' '--role' '-d' '--description'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values
  RoleNamesCompletion_fn
  local ROLE_option_args=("${RoleNamesCompletion_arr[@]}")

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-r'|'--role')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ROLE_option_args[@]}" ) )
      return $?
      ;;
    '-d'|'--description')
      return
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete` subcommand.
function _picocli_astra_token_delete() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `revoke` subcommand.
function _picocli_astra_token_revoke() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `list` subcommand.
function _picocli_astra_user_list() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `get` subcommand.
function _picocli_astra_user_get() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  UserEmailsCompletion_fn
  local USER_pos_param_args=("${UserEmailsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "get" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${USER_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `describe` subcommand.
function _picocli_astra_user_describe() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts=""
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  UserEmailsCompletion_fn
  local USER_pos_param_args=("${UserEmailsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "describe" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${USER_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `invite` subcommand.
function _picocli_astra_user_invite() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-not-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env' '-r' '--roles'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
    '-r'|'--roles')
      return
      ;;
  esac
  UserEmailsCompletion_fn
  local USER_pos_param_args=("${UserEmailsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "invite" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${USER_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Generates completions for the options and subcommands of the `delete` subcommand.
function _picocli_astra_user_delete() {
  # Get completion data
  local curr_word=${COMP_WORDS[COMP_CWORD]}
  local prev_word=${COMP_WORDS[COMP_CWORD-1]}

  local commands=""
  local flag_opts="'--if-exists'"
  local arg_opts="'--output' '-o' '-V' '--verbose' '-q' '--quiet' '--spinner' '--no-input' '--color' '--dump-logs' '--config-file' '-cf' '--profile' '-p' '--token' '--env'"
  local FORMAT_option_args=("human" "json" "csv") # --output values
  local WHEN_option_args=("auto" "never" "always") # --color values
  AvailableProfilesCompletion_fn
  local NAME_option_args=("${AvailableProfilesCompletion_arr[@]}")
  local ENV_option_args=("prod" "dev" "test") # --env values

  type compopt &>/dev/null && compopt +o default

  case ${prev_word} in
    '--output'|'-o')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${FORMAT_option_args[@]}" ) )
      return $?
      ;;
    '-V'|'--verbose')
      return
      ;;
    '-q'|'--quiet')
      return
      ;;
    '--spinner')
      return
      ;;
    '--no-input')
      return
      ;;
    '--color')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${WHEN_option_args[@]}" ) )
      return $?
      ;;
    '--dump-logs')
      return
      ;;
    '--config-file'|'-cf')
      return
      ;;
    '--profile'|'-p')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${NAME_option_args[@]}" ) )
      return $?
      ;;
    '--token')
      return
      ;;
    '--env')
      local IFS=$'\n'
      COMPREPLY=( $( compReplyArray "${ENV_option_args[@]}" ) )
      return $?
      ;;
  esac
  UserEmailsCompletion_fn
  local USER_pos_param_args=("${UserEmailsCompletion_arr[@]}")

  if [[ "${curr_word}" == -* ]]; then
    COMPREPLY=( $(compgen -W "${flag_opts} ${arg_opts}" -- "${curr_word}") )
  else
    local positionals=""
    local currIndex
    currIndex=$(currentPositionalIndex "delete" "${arg_opts}" "${flag_opts}")
    if (( currIndex >= 0 && currIndex <= 0 )); then
      positionals=$( compReplyArray "${USER_pos_param_args[@]}" )
    fi
    local IFS=$'\n'
    COMPREPLY=( $(compgen -W "${commands// /$'\n'}${IFS}${positionals}" -- "${curr_word}") )
  fi
}

# Define a completion specification (a compspec) for the
# `astra`, `astra.sh`, and `astra.bash` commands.
# Uses the bash `complete` builtin (see [6]) to specify that shell function
# `_complete_astra` is responsible for generating possible completions for the
# current word on the command line.
# The `-o default` option means that if the function generated no matches, the
# default Bash completions and the Readline default filename completions are performed.
complete -F _complete_astra -o default astra astra.sh astra.bash

