Skip to content
Merged
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
14 changes: 13 additions & 1 deletion robosystems_client/models/block_source_graph_result.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from typing import TYPE_CHECKING, Any, TypeVar, cast

from attrs import define as _attrs_define
from attrs import field as _attrs_field
Expand All @@ -25,11 +25,14 @@ class BlockSourceGraphResult:
any purge. Default: False.
purged_report_count (int | Unset): Number of previously-shared reports deleted from this graph. Zero unless
`purge` was set. Default: 0.
purged_report_ids (list[str] | Unset): Ids of the previously-shared reports deleted from this graph. Empty
unless `purge` was set.
"""

block: BlockedSourceGraphResponse
already_blocked: bool | Unset = False
purged_report_count: int | Unset = 0
purged_report_ids: list[str] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

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

purged_report_count = self.purged_report_count

purged_report_ids: list[str] | Unset = UNSET
if not isinstance(self.purged_report_ids, Unset):
purged_report_ids = self.purged_report_ids

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
Expand All @@ -50,6 +57,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["already_blocked"] = already_blocked
if purged_report_count is not UNSET:
field_dict["purged_report_count"] = purged_report_count
if purged_report_ids is not UNSET:
field_dict["purged_report_ids"] = purged_report_ids

return field_dict

Expand All @@ -64,10 +73,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

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

purged_report_ids = cast(list[str], d.pop("purged_report_ids", UNSET))

block_source_graph_result = cls(
block=block,
already_blocked=already_blocked,
purged_report_count=purged_report_count,
purged_report_ids=purged_report_ids,
)

block_source_graph_result.additional_properties = d
Expand Down