Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2023-09-29 16:05:40 -07:00
parent 31cd9e532d
commit 12c164620b
268 changed files with 22464 additions and 18287 deletions

View File

@ -6,58 +6,54 @@ from ..types import UNSET, Unset
WN = TypeVar("WN", bound="PathGetInfo")
@attr.s(auto_attribs=True)
class PathGetInfo:
"""The response from the `PathGetInfo` command.""" # noqa: E501
""" The response from the `PathGetInfo` command. """ # noqa: E501
from ..models.path_segment_info import PathSegmentInfo
segments: Union[Unset, List[PathSegmentInfo]] = UNSET
from ..models.path_segment_info import PathSegmentInfo
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
segments: Union[Unset, List[PathSegmentInfo]] = UNSET
def to_dict(self) -> Dict[str, Any]:
from ..models.path_segment_info import PathSegmentInfo
segments: Union[Unset, List[PathSegmentInfo]] = UNSET
if not isinstance(self.segments, Unset):
segments = self.segments
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if segments is not UNSET:
field_dict['segments'] = segments
def to_dict(self) -> Dict[str, Any]:
from ..models.path_segment_info import PathSegmentInfo
return field_dict
segments: Union[Unset, List[PathSegmentInfo]] = UNSET
if not isinstance(self.segments, Unset):
segments = self.segments
@classmethod
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
d = src_dict.copy()
from ..models.path_segment_info import PathSegmentInfo
segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET))
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if segments is not UNSET:
field_dict["segments"] = segments
return field_dict
path_get_info = cls(
segments= segments,
)
@classmethod
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
d = src_dict.copy()
from ..models.path_segment_info import PathSegmentInfo
path_get_info.additional_properties = d
return path_get_info
segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET))
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
path_get_info = cls(
segments=segments,
)
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
path_get_info.additional_properties = d
return path_get_info
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
def __contains__(self, key: str) -> bool:
return key in self.additional_properties