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,31 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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 user-creds command group."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.DefaultUniverseOnly
@base.ReleaseTracks(
base.ReleaseTrack.ALPHA,
base.ReleaseTrack.BETA,
base.ReleaseTrack.GA,
)
class UserCreds(base.Group):
"""Manage the user creds for a Cloud Firestore Database."""

View File

@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to create a user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class Create(base.Command):
"""Creates a Cloud Firestore user creds.
## EXAMPLES
To create a user creds called test-user-creds-id under database testdb.
$ {command} test-user-creds-id --database=testdb
"""
@staticmethod
def Args(parser):
flags.AddDatabaseIdFlag(parser, required=True)
flags.AddUserCredsIdArg(parser)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.CreateUserCreds(
project,
args.database,
args.user_creds,
)

View File

@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to delete a user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class Delete(base.Command):
"""Deletes a Cloud Firestore user creds.
## EXAMPLES
To delete user creds 'test-user-creds-id' under
database testdb.
$ {command} test-user-creds-id --database='testdb'
"""
@staticmethod
def Args(parser):
"""Set args for gcloud firestore user-creds delete."""
flags.AddDatabaseIdFlag(parser, required=True)
flags.AddUserCredsIdArg(parser)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.DeleteUserCreds(
project, args.database, args.user_creds
)

View File

@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to describe a user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class Describe(base.DescribeCommand):
"""Describes a Cloud Firestore user creds.
## EXAMPLES
To describe user creds 'test-user-creds-id' under
database testdb.
$ {command} test-user-creds-id --database='testdb'
"""
@staticmethod
def Args(parser):
"""Set args for gcloud firestore user-creds describe."""
flags.AddDatabaseIdFlag(parser, required=True)
flags.AddUserCredsIdArg(parser)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.GetUserCreds(
project, args.database, args.user_creds
)

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to disable a user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class Disable(base.Command):
"""Disables a Cloud Firestore user creds.
## EXAMPLES
To disable user creds 'test-user-creds-id' under database testdb.
$ {command} test-user-creds-id --database='testdb'
"""
@staticmethod
def Args(parser):
"""Set args for gcloud firestore user-creds disable."""
flags.AddDatabaseIdFlag(parser, required=True)
flags.AddUserCredsIdArg(parser)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.DisableUserCreds(
project, args.database, args.user_creds
)

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to enable a user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class Enable(base.Command):
"""Enables a Cloud Firestore user creds.
## EXAMPLES
To enable user creds 'test-user-creds-id' under database testdb.
$ {command} test-user-creds-id --database='testdb'
"""
@staticmethod
def Args(parser):
"""Set args for gcloud firestore user-creds enable."""
flags.AddDatabaseIdFlag(parser, required=True)
flags.AddUserCredsIdArg(parser)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.EnableUserCreds(
project, args.database, args.user_creds
)

View File

@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to list user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class List(base.ListCommand):
"""Lists user creds under a Cloud Firestore database.
## EXAMPLES
To list all user creds under database testdb.
$ {command} --database='testdb'
"""
@staticmethod
def Args(parser):
flags.AddDatabaseIdFlag(parser, required=True)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.ListUserCreds(project, args.database)

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""Command to reset the password for user creds for a Firestore Database."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.firestore import user_creds
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.firestore import flags
from googlecloudsdk.core import properties
@base.DefaultUniverseOnly
class Reset(base.Command):
"""Resets a Cloud Firestore user creds.
## EXAMPLES
To reset password for user creds 'test-user-creds-id' under database testdb.
$ {command} test-user-creds-id --database='testdb'
"""
@staticmethod
def Args(parser):
"""Set args for gcloud firestore user-creds reset-password."""
flags.AddDatabaseIdFlag(parser, required=True)
flags.AddUserCredsIdArg(parser)
def Run(self, args):
project = properties.VALUES.core.project.Get(required=True)
return user_creds.ResetUserCreds(
project, args.database, args.user_creds
)