code: def _register(self):
      super()._register()
      self._parser.set_defaults(subfunc=self._list)
      subparsers = self._parser.add_subparsers(dest="action")
  
      list_parser = subparsers.add_parser(
          "list",
          help="List gateways",
          formatter_class=self._parser.formatter_class,
      )
      list_parser.add_argument(
          "-v",
          "--verbose",
          action="store_true",
          help="Show more information",
      )
      list_parser.set_defaults(subfunc=self._list)
  
      create_parser = subparsers.add_parser(
          "create",
          help="Add a gateway",
          formatter_class=self._parser.formatter_class,
      )
      create_parser.set_defaults(subfunc=self._create)
      create_parser.add_argument(
          "--backend", choices=["aws", "gcp", "azure"], required=True
      )
      create_parser.add_argument("--region", required=True)
      create_parser.add_argument(
          "--set-default",
          action="store_true",
          help="Set as default gateway for the project",
      )
      create_parser.add_argument(
          "--name", help="Set a custom name for the gateway"
      )
      create_parser.add_argument(
          "--domain",
          help="Set the domain for the gateway",
          required=True,
      )
  
      delete_parser = subparsers.add_parser(
          "delete",
          help="Delete a gateway",
          formatter_class=self._parser.formatter_class,
      )
      delete_parser.set_defaults(subfunc=self._delete)
      delete_parser.add_argument("name", help="The name of the gateway")
      delete_parser.add_argument(
          "-y",
          "--yes",
          action="store_true",
          help="Don't ask for confirmation",
      )
  
      update_parser = subparsers.add_parser(
          "update",
          help="Update a gateway",
          formatter_class=self._parser.formatter_class,
      )
      update_parser.set_defaults(subfunc=self._update)
      update_parser.add_argument("name", help="The name of the gateway")
      update_parser.add_argument(
          "--set-default",
          action="store_true",
          help="Set it the default gateway for the project",
      )
      update_parser.add_argument(
          "--domain", help="Set the domain for the gateway"
      )
  
file_path: dstack/src/dstack/_internal/cli/commands/gateway.py
imports: import argparse
  from dstack._internal.cli.commands import APIBaseCommand
  from dstack._internal.cli.utils.common import confirm_ask, console
  from dstack._internal.cli.utils.gateway import print_gateways_table
  from dstack._internal.core.models.backends.base import BackendType
label_desc: Use image node_id 1 for calling the GatewayCommand obj's underlying member method code with example usage: obj._register() without return types