feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*- #
# Copyright 2022 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The gcloud firestore fields ttls command group."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.GA, base.ReleaseTrack.BETA,
base.ReleaseTrack.ALPHA)
class Ttls(base.Group):
"""Manage Time-to-live metadata for Cloud Firestore."""
pass

View File

@@ -0,0 +1,31 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: List all fields used as a Time To Live expiration setting.
description: |
List fields that give an expiration timestamp for documents in a collection group or kind.
examples: |
The following command lists all TTL fields for the whole database:
$ {command}
request:
collection: firestore.projects.databases.collectionGroups.fields
static_fields:
filter: ttlConfig:*
response:
id_field: name
arguments:
resource:
help_text: |
Collection group of the ttl.
This can be omitted to include fields across all collection groups (kinds).
is_positional: false
# By using collection_group_with_default this resource arg is correctly determined to be
# optional and can use the special '-' collection group if it's not specified.
spec: !REF googlecloudsdk.command_lib.firestore.resources:collection_group_with_default
output:
format: yaml(name, ttlConfig)

View File

@@ -0,0 +1,58 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Update the TTL configuration of the given field.
description: |
Update the TTL configuration of the given field.
This enables or disables using a field as the TTL field for its collection group or kind. Note
that only one field can be the TTL field for a collection group.
examples: |
The following command sets the `expiry` field of the `Events` collection group (kind) to be
the TTL field:
$ {command} expiry \
--collection-group=Events \
--enable-ttl
The following command disables the `expiry` field so it is no longer the TTL for the `Events`
collection group (kind):
$ {command} expiry \
--collection-group=Events \
--disable-ttl
request:
collection: firestore.projects.databases.collectionGroups.fields
modify_request_hooks:
- googlecloudsdk.command_lib.firestore.util:UpdateFieldRequestTtls
output:
format: yaml(name, ttlConfig)
async:
collection: firestore.projects.databases.operations
api_version: v1
update:
read_modify_update: false
arguments:
resource:
help_text: Field to update.
# The field is strictly required for TTLs, so we use 'field'.
spec: !REF googlecloudsdk.command_lib.firestore.resources:field
params:
# Define --enable-ttl and --disable-ttl as an arg group, required and mutually exclusive.
- group:
required: true
mutex: true
params:
- help_text: Set to enable this field as the TTL for its collection group.
arg_name: "enable-ttl"
action: store_true
type: bool
- help_text: Set to make this field no longer the TTL for its collection group.
arg_name: "disable-ttl"
action: store_true
type: bool