models.py•2.46 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T02:07:31+00:00
from __future__ import annotations
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel, Field
class State(Enum):
LIFECYCLE_STATE_UNSPECIFIED = 'LIFECYCLE_STATE_UNSPECIFIED'
ACTIVE = 'ACTIVE'
DISABLED = 'DISABLED'
DELETED = 'DELETED'
class Type(Enum):
DATABASE_INSTANCE_TYPE_UNSPECIFIED = 'DATABASE_INSTANCE_TYPE_UNSPECIFIED'
DEFAULT_DATABASE = 'DEFAULT_DATABASE'
USER_DATABASE = 'USER_DATABASE'
class DatabaseInstance(BaseModel):
databaseUrl: Optional[str] = Field(
None,
description='Output only. Output Only. The globally unique hostname of the database.',
)
name: Optional[str] = Field(
None,
description='The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`.',
)
project: Optional[str] = Field(
None,
description='Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`.',
)
state: Optional[State] = Field(
None, description="Output only. The database's lifecycle state. Read-only."
)
type: Optional[Type] = Field(
None,
description='Immutable. The database instance type. On creation only USER_DATABASE is allowed, which is also the default when omitted.',
)
class DisableDatabaseInstanceRequest(BaseModel):
pass
class ListDatabaseInstancesResponse(BaseModel):
instances: Optional[List[DatabaseInstance]] = Field(
None,
description='List of each DatabaseInstance that is in the parent Firebase project.',
)
nextPageToken: Optional[str] = Field(
None,
description='If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListDatabaseInstances` to find the next group of database instances. Page tokens are short-lived and should not be persisted.',
)
class ReenableDatabaseInstanceRequest(BaseModel):
pass
class UndeleteDatabaseInstanceRequest(BaseModel):
pass
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'