HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/lib/googlecloudsdk/command_lib/firestore/resources.yaml
# Note: we have some duplicated resources here because of a limitation with declarative commands.
#
# In particular, some commands (e.g. composite create) need the collection group to be specified.
# But other commands (e.g. composite list) need to function if the collection group is not specified
# (a special value of '-' is used).
#
# Normally this would be configured with command level fallthroughs; however, the declarative schema
# currently only allows command level fallthroughs to be arg_fallthroughs (as opposed to generic
# python hook fallthroughs), which means we can't provide a default value in this manner.
#
# The workaround for now is just to have different commands use different resource args with
# appropriate attribute fallthroughs (which can be generic python hooks) depending on what the
# command needs.

project:
  name: project
  collection: firestore.projects
  attributes:
  - &project
    parameter_name: projectsId
    attribute_name: project
    help: |
      Project of the {resource}.
    property: core/project

database:
  name: database
  collection: firestore.projects.databases
  attributes:
  - *project
  - &database
    parameter_name: databasesId
    attribute_name: database
    help: |
      Database of the {resource}.
    fallthroughs:
    - value: (default)
      hint: |-
        the default value of argument [--database] is `(default)`

# This is for the '-' collection group which allows API calls to access index IDs without specifying
# their collection group, e.g.:
# projects/{projectsId}/databases/{databasesId}/collectionGroups/-/{indexesId}
collection_group_with_default:
  name: collection group
  collection: firestore.projects.databases.collectionGroups
  attributes:
  - *project
  - *database
  - &collection_group_with_default
    parameter_name: collectionGroupsId
    attribute_name: collection-group
    help: |
      Collection group of the {resource}.
    fallthroughs:
    - hook: googlecloudsdk.command_lib.firestore.util:GetCollectionGroupFallthrough
      hint: |-
        provide the argument [--collection-group] on the command line

collection_group:
  name: collection group
  collection: firestore.projects.databases.collectionGroups
  attributes:
  - *project
  - *database
  - &collection_group
    parameter_name: collectionGroupsId
    attribute_name: collection-group
    help: |
      Collection group of the {resource}.

# Composite index IDs are unique across all collection groups; we can use the special '-' collection
# group in API calls so that the user doesn't need to enter the actual one on the command line.
index:
  name: composite index
  collection: firestore.projects.databases.collectionGroups.indexes
  attributes:
  - *project
  - *database
  - *collection_group_with_default
  - &index
    parameter_name: indexesId
    attribute_name: index
    help: |
      Index of the {resource}.

# This resource lets us describe the special field that contains database-wide index settings. Note
# that the collection group for this field is '__default__' not '-', so we can't reuse the
# collection_group_with_default attribute.
field_with_default:
  name: field
  collection: firestore.projects.databases.collectionGroups.fields
  attributes:
  - *project
  - *database
  - parameter_name: collectionGroupsId
    attribute_name: collection-group
    help: |
      Collection group of the {resource}.
    fallthroughs:
    - hook: googlecloudsdk.command_lib.firestore.util:GetDefaultFieldCollectionGroupFallthrough
      hint: ' '
  - &field_with_default
    parameter_name: fieldsId
    attribute_name: field
    help: |
      Field of the {resource}.

      The field may be a simple field name (e.g. address) or a path to a field in a key-value map
      (e.g. address.city.neighborhood).
    fallthroughs:
    - hook: googlecloudsdk.command_lib.firestore.util:GetDefaultFieldPathFallthrough
      hint: ' '

field:
  name: field
  collection: firestore.projects.databases.collectionGroups.fields
  attributes:
  - *project
  - *database
  - *collection_group
  - &field
    parameter_name: fieldsId
    attribute_name: field
    help: |
      Field of the {resource}.

      The field may be a simple field name (e.g. address) or a path to a field in a key-value map
      (e.g. address.city.neighborhood).