Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Commit fd05bf9

Browse files
1 parent 69b693a commit fd05bf9

239 files changed

Lines changed: 157 additions & 92841 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google/cloud/firestore_admin_v1/types/database.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
class Database(proto.Message):
3535
r"""A Cloud Firestore Database.
3636
37+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
38+
3739
Attributes:
3840
name (str):
3941
The resource name of the Database. Format:
@@ -117,11 +119,31 @@ class Database(proto.Message):
117119
source_info (google.cloud.firestore_admin_v1.types.Database.SourceInfo):
118120
Output only. Information about the provenance
119121
of this database.
122+
free_tier (bool):
123+
Output only. Background: Free tier is the
124+
ability of a Firestore database to use a small
125+
amount of resources every day without being
126+
charged. Once usage exceeds the free tier limit
127+
further usage is charged.
128+
129+
Whether this database can make use of the free
130+
tier. Only one database per project can be
131+
eligible for the free tier.
132+
133+
The first (or next) database that is created in
134+
a project without a free tier database will be
135+
marked as eligible for the free tier. Databases
136+
that are created while there is a free tier
137+
database will not be eligible for the free tier.
138+
139+
This field is a member of `oneof`_ ``_free_tier``.
120140
etag (str):
121141
This checksum is computed by the server based
122142
on the value of other fields, and may be sent on
123143
update and delete requests to ensure the client
124144
has an up-to-date value before proceeding.
145+
database_edition (google.cloud.firestore_admin_v1.types.Database.DatabaseEdition):
146+
Immutable. The edition of the database.
125147
"""
126148

127149
class DatabaseType(proto.Enum):
@@ -238,6 +260,23 @@ class DeleteProtectionState(proto.Enum):
238260
DELETE_PROTECTION_DISABLED = 1
239261
DELETE_PROTECTION_ENABLED = 2
240262

263+
class DatabaseEdition(proto.Enum):
264+
r"""The edition of the database.
265+
266+
Values:
267+
DATABASE_EDITION_UNSPECIFIED (0):
268+
Not used.
269+
STANDARD (1):
270+
Standard edition.
271+
272+
This is the default setting if not specified.
273+
ENTERPRISE (2):
274+
Enterprise edition.
275+
"""
276+
DATABASE_EDITION_UNSPECIFIED = 0
277+
STANDARD = 1
278+
ENTERPRISE = 2
279+
241280
class CmekConfig(proto.Message):
242281
r"""The CMEK (Customer Managed Encryption Key) configuration for
243282
a Firestore database. If not present, the database is secured by
@@ -485,10 +524,20 @@ class CustomerManagedEncryptionOptions(proto.Message):
485524
number=26,
486525
message=SourceInfo,
487526
)
527+
free_tier: bool = proto.Field(
528+
proto.BOOL,
529+
number=30,
530+
optional=True,
531+
)
488532
etag: str = proto.Field(
489533
proto.STRING,
490534
number=99,
491535
)
536+
database_edition: DatabaseEdition = proto.Field(
537+
proto.ENUM,
538+
number=28,
539+
enum=DatabaseEdition,
540+
)
492541

493542

494543
__all__ = tuple(sorted(__protobuf__.manifest))

google/cloud/firestore_admin_v1/types/index.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@ class Index(proto.Message):
6969
associated field.
7070
state (google.cloud.firestore_admin_v1.types.Index.State):
7171
Output only. The serving state of the index.
72+
density (google.cloud.firestore_admin_v1.types.Index.Density):
73+
Immutable. The density configuration of the
74+
index.
75+
multikey (bool):
76+
Optional. Whether the index is multikey. By default, the
77+
index is not multikey. For non-multikey indexes, none of the
78+
paths in the index definition reach or traverse an array,
79+
except via an explicit array index. For multikey indexes, at
80+
most one of the paths in the index definition reach or
81+
traverse an array, except via an explicit array index.
82+
Violations will result in errors.
83+
84+
Note this field only applies to index with
85+
MONGODB_COMPATIBLE_API ApiScope.
86+
shard_count (int):
87+
Optional. The number of shards for the index.
7288
"""
7389

7490
class QueryScope(proto.Enum):
@@ -111,9 +127,12 @@ class ApiScope(proto.Enum):
111127
DATASTORE_MODE_API (1):
112128
The index can only be used by the Firestore
113129
in Datastore Mode query API.
130+
MONGODB_COMPATIBLE_API (2):
131+
The index can only be used by the MONGODB_COMPATIBLE_API.
114132
"""
115133
ANY_API = 0
116134
DATASTORE_MODE_API = 1
135+
MONGODB_COMPATIBLE_API = 2
117136

118137
class State(proto.Enum):
119138
r"""The state of an index. During index creation, an index will be in
@@ -152,6 +171,37 @@ class State(proto.Enum):
152171
READY = 2
153172
NEEDS_REPAIR = 3
154173

174+
class Density(proto.Enum):
175+
r"""The density configuration for the index.
176+
177+
Values:
178+
DENSITY_UNSPECIFIED (0):
179+
Unspecified. It will use database default
180+
setting. This value is input only.
181+
SPARSE_ALL (1):
182+
In order for an index entry to be added, the document must
183+
contain all fields specified in the index.
184+
185+
This is the only allowed value for indexes having ApiScope
186+
``ANY_API`` and ``DATASTORE_MODE_API``.
187+
SPARSE_ANY (2):
188+
In order for an index entry to be added, the
189+
document must contain at least one of the fields
190+
specified in the index. Non-existent fields are
191+
treated as having a NULL value when generating
192+
index entries.
193+
DENSE (3):
194+
An index entry will be added regardless of
195+
whether the document contains any of the fields
196+
specified in the index. Non-existent fields are
197+
treated as having a NULL value when generating
198+
index entries.
199+
"""
200+
DENSITY_UNSPECIFIED = 0
201+
SPARSE_ALL = 1
202+
SPARSE_ANY = 2
203+
DENSE = 3
204+
155205
class IndexField(proto.Message):
156206
r"""A field in an index. The field_path describes which field is
157207
indexed, the value_mode describes how the field value is indexed.
@@ -298,6 +348,19 @@ class FlatIndex(proto.Message):
298348
number=4,
299349
enum=State,
300350
)
351+
density: Density = proto.Field(
352+
proto.ENUM,
353+
number=6,
354+
enum=Density,
355+
)
356+
multikey: bool = proto.Field(
357+
proto.BOOL,
358+
number=7,
359+
)
360+
shard_count: int = proto.Field(
361+
proto.INT32,
362+
number=8,
363+
)
301364

302365

303366
__all__ = tuple(sorted(__protobuf__.manifest))

owl-bot-staging/firestore/v1/.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

owl-bot-staging/firestore/v1/.flake8

Lines changed: 0 additions & 33 deletions
This file was deleted.

owl-bot-staging/firestore/v1/MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

owl-bot-staging/firestore/v1/README.rst

Lines changed: 0 additions & 143 deletions
This file was deleted.

owl-bot-staging/firestore/v1/docs/_static/custom.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)