Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions robosystems_client/api/backup/get_backup_download_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ def sync_detailed(
) -> Response[Any | BackupDownloadUrlResponse | HTTPValidationError]:
"""Get temporary download URL for backup

Generate a temporary download URL for a backup (unencrypted backups only). The filename carries the
extension listed as `download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB
database file `{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-
compressed database file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first:
`brew install zstd`, `apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.

Args:
graph_id (str):
Expand Down Expand Up @@ -128,11 +128,11 @@ def sync(
) -> Any | BackupDownloadUrlResponse | HTTPValidationError | None:
"""Get temporary download URL for backup

Generate a temporary download URL for a backup (unencrypted backups only). The filename carries the
extension listed as `download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB
database file `{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-
compressed database file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first:
`brew install zstd`, `apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.

Args:
graph_id (str):
Expand Down Expand Up @@ -164,11 +164,11 @@ async def asyncio_detailed(
) -> Response[Any | BackupDownloadUrlResponse | HTTPValidationError]:
"""Get temporary download URL for backup

Generate a temporary download URL for a backup (unencrypted backups only). The filename carries the
extension listed as `download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB
database file `{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-
compressed database file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first:
`brew install zstd`, `apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.

Args:
graph_id (str):
Expand Down Expand Up @@ -203,11 +203,11 @@ async def asyncio(
) -> Any | BackupDownloadUrlResponse | HTTPValidationError | None:
"""Get temporary download URL for backup

Generate a temporary download URL for a backup (unencrypted backups only). The filename carries the
extension listed as `download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB
database file `{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-
compressed database file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first:
`brew install zstd`, `apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.

Args:
graph_id (str):
Expand Down
20 changes: 12 additions & 8 deletions robosystems_client/api/graph_operations/restore_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ def sync_detailed(
) -> Response[ErrorResponse | OperationEnvelope]:
"""Restore Backup

Only encrypted backups can be restored. Not allowed on entity graphs (use `materialize` instead) or
shared repositories.
Not allowed on entity graphs (use `materialize` instead) or shared repositories. Destructive: the
existing database is snapshotted, then overwritten. Monitor progress via SSE at
`/v1/operations/{operation_id}/stream`.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
Expand Down Expand Up @@ -152,8 +153,9 @@ def sync(
) -> ErrorResponse | OperationEnvelope | None:
"""Restore Backup

Only encrypted backups can be restored. Not allowed on entity graphs (use `materialize` instead) or
shared repositories.
Not allowed on entity graphs (use `materialize` instead) or shared repositories. Destructive: the
existing database is snapshotted, then overwritten. Monitor progress via SSE at
`/v1/operations/{operation_id}/stream`.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
Expand Down Expand Up @@ -188,8 +190,9 @@ async def asyncio_detailed(
) -> Response[ErrorResponse | OperationEnvelope]:
"""Restore Backup

Only encrypted backups can be restored. Not allowed on entity graphs (use `materialize` instead) or
shared repositories.
Not allowed on entity graphs (use `materialize` instead) or shared repositories. Destructive: the
existing database is snapshotted, then overwritten. Monitor progress via SSE at
`/v1/operations/{operation_id}/stream`.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
Expand Down Expand Up @@ -227,8 +230,9 @@ async def asyncio(
) -> ErrorResponse | OperationEnvelope | None:
"""Restore Backup

Only encrypted backups can be restored. Not allowed on entity graphs (use `materialize` instead) or
shared repositories.
Not allowed on entity graphs (use `materialize` instead) or shared repositories. Destructive: the
existing database is snapshotted, then overwritten. Monitor progress via SSE at
`/v1/operations/{operation_id}/stream`.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
Expand Down
9 changes: 0 additions & 9 deletions robosystems_client/models/backup_create_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ class BackupCreateRequest:
is the hard ceiling: the storage lifecycle expires backup objects then regardless of the requested value.
Default: 30.
compression (bool | Unset): Enable compression (always enabled for optimal storage) Default: True.
encryption (bool | Unset): Enable encryption (encrypted backups cannot be downloaded) Default: False.
schedule (None | str | Unset): Optional cron schedule for automated backups
"""

backup_format: str | Unset = "full_dump"
backup_type: str | Unset = "full"
retention_days: int | Unset = 30
compression: bool | Unset = True
encryption: bool | Unset = False
schedule: None | str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

Expand All @@ -44,8 +42,6 @@ def to_dict(self) -> dict[str, Any]:

compression = self.compression

encryption = self.encryption

schedule: None | str | Unset
if isinstance(self.schedule, Unset):
schedule = UNSET
Expand All @@ -63,8 +59,6 @@ def to_dict(self) -> dict[str, Any]:
field_dict["retention_days"] = retention_days
if compression is not UNSET:
field_dict["compression"] = compression
if encryption is not UNSET:
field_dict["encryption"] = encryption
if schedule is not UNSET:
field_dict["schedule"] = schedule

Expand All @@ -81,8 +75,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

compression = d.pop("compression", UNSET)

encryption = d.pop("encryption", UNSET)

def _parse_schedule(data: object) -> None | str | Unset:
if data is None:
return data
Expand All @@ -97,7 +89,6 @@ def _parse_schedule(data: object) -> None | str | Unset:
backup_type=backup_type,
retention_days=retention_days,
compression=compression,
encryption=encryption,
schedule=schedule,
)

Expand Down
11 changes: 11 additions & 0 deletions robosystems_client/models/backup_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ class BackupListResponse:
total_count (int):
graph_id (str):
is_shared_repository (bool | Unset): Whether this is a shared repository (limits apply) Default: False.
restore_supported (bool | Unset): Whether backups on this graph can be restored. False for entity graphs, which
are materialized from the extensions database (use the materialize operation instead), and for shared
repositories, which are platform-managed and download-only. Default: True.
download_quota (DownloadQuota | None | Unset): Download quota for shared repositories
"""

backups: list[BackupResponse]
total_count: int
graph_id: str
is_shared_repository: bool | Unset = False
restore_supported: bool | Unset = True
download_quota: DownloadQuota | None | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

Expand All @@ -49,6 +53,8 @@ def to_dict(self) -> dict[str, Any]:

is_shared_repository = self.is_shared_repository

restore_supported = self.restore_supported

download_quota: dict[str, Any] | None | Unset
if isinstance(self.download_quota, Unset):
download_quota = UNSET
Expand All @@ -68,6 +74,8 @@ def to_dict(self) -> dict[str, Any]:
)
if is_shared_repository is not UNSET:
field_dict["is_shared_repository"] = is_shared_repository
if restore_supported is not UNSET:
field_dict["restore_supported"] = restore_supported
if download_quota is not UNSET:
field_dict["download_quota"] = download_quota

Expand All @@ -92,6 +100,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

is_shared_repository = d.pop("is_shared_repository", UNSET)

restore_supported = d.pop("restore_supported", UNSET)

def _parse_download_quota(data: object) -> DownloadQuota | None | Unset:
if data is None:
return data
Expand All @@ -114,6 +124,7 @@ def _parse_download_quota(data: object) -> DownloadQuota | None | Unset:
total_count=total_count,
graph_id=graph_id,
is_shared_repository=is_shared_repository,
restore_supported=restore_supported,
download_quota=download_quota,
)

Expand Down
20 changes: 2 additions & 18 deletions robosystems_client/models/backup_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ class BackupResponse:
node_count (int):
relationship_count (int):
backup_duration_seconds (float):
encryption_enabled (bool):
compression_enabled (bool):
allow_export (bool):
created_at (str):
completed_at (None | str):
expires_at (None | str):
download_extension (None | str | Unset): Extension the download will carry, and therefore how to unpack it:
'.lbug.zip' is a ZIP holding the LadybugDB database file, '.lbug.zst' is zstd-compressed (`zstd -d`). Null when
the backup is encrypted and so cannot be downloaded.
'.lbug.zip' is a ZIP holding the LadybugDB database file, '.lbug.zst' is zstd-compressed (`zstd -d`). Null only
when the backup has no stored object yet.
"""

backup_id: str
Expand All @@ -49,9 +47,7 @@ class BackupResponse:
node_count: int
relationship_count: int
backup_duration_seconds: float
encryption_enabled: bool
compression_enabled: bool
allow_export: bool
created_at: str
completed_at: None | str
expires_at: None | str
Expand Down Expand Up @@ -81,12 +77,8 @@ def to_dict(self) -> dict[str, Any]:

backup_duration_seconds = self.backup_duration_seconds

encryption_enabled = self.encryption_enabled

compression_enabled = self.compression_enabled

allow_export = self.allow_export

created_at = self.created_at

completed_at: None | str
Expand Down Expand Up @@ -116,9 +108,7 @@ def to_dict(self) -> dict[str, Any]:
"node_count": node_count,
"relationship_count": relationship_count,
"backup_duration_seconds": backup_duration_seconds,
"encryption_enabled": encryption_enabled,
"compression_enabled": compression_enabled,
"allow_export": allow_export,
"created_at": created_at,
"completed_at": completed_at,
"expires_at": expires_at,
Expand Down Expand Up @@ -154,12 +144,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

backup_duration_seconds = d.pop("backup_duration_seconds")

encryption_enabled = d.pop("encryption_enabled")

compression_enabled = d.pop("compression_enabled")

allow_export = d.pop("allow_export")

created_at = d.pop("created_at")

def _parse_completed_at(data: object) -> None | str:
Expand Down Expand Up @@ -197,9 +183,7 @@ def _parse_download_extension(data: object) -> None | str | Unset:
node_count=node_count,
relationship_count=relationship_count,
backup_duration_seconds=backup_duration_seconds,
encryption_enabled=encryption_enabled,
compression_enabled=compression_enabled,
allow_export=allow_export,
created_at=created_at,
completed_at=completed_at,
expires_at=expires_at,
Expand Down