wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_json_body

 1from typing import Any, Dict, List, Type, TypeVar, Union
 2
 3import attr
 4
 5from ..types import UNSET, Unset
 6
 7T = TypeVar("T", bound="PlateauGetTopicNameJsonBody")
 8
 9@attr.s(auto_attribs=True)
10class PlateauGetTopicNameJsonBody:
11    """ Request for topic name.
12
13    Attributes:
14        workspace_id (Union[Unset, None, int]):  Workspace identifier.
15        pipeline_name (Union[Unset, None, str]):  Pipeline name.
16        pipeline_pk_id (Union[Unset, None, int]):  Internal pipeline identifier.
17    """
18
19    workspace_id: Union[Unset, None, int] = UNSET
20    pipeline_name: Union[Unset, None, str] = UNSET
21    pipeline_pk_id: Union[Unset, None, int] = UNSET
22    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
23
24
25    def to_dict(self) -> Dict[str, Any]:
26        workspace_id = self.workspace_id
27        pipeline_name = self.pipeline_name
28        pipeline_pk_id = self.pipeline_pk_id
29
30        field_dict: Dict[str, Any] = {}
31        field_dict.update(self.additional_properties)
32        field_dict.update({
33        })
34        if workspace_id is not UNSET:
35            field_dict["workspace_id"] = workspace_id
36        if pipeline_name is not UNSET:
37            field_dict["pipeline_name"] = pipeline_name
38        if pipeline_pk_id is not UNSET:
39            field_dict["pipeline_pk_id"] = pipeline_pk_id
40
41        return field_dict
42
43
44
45    @classmethod
46    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
47        d = src_dict.copy()
48        workspace_id = d.pop("workspace_id", UNSET)
49
50        pipeline_name = d.pop("pipeline_name", UNSET)
51
52        pipeline_pk_id = d.pop("pipeline_pk_id", UNSET)
53
54        plateau_get_topic_name_json_body = cls(
55            workspace_id=workspace_id,
56            pipeline_name=pipeline_name,
57            pipeline_pk_id=pipeline_pk_id,
58        )
59
60        plateau_get_topic_name_json_body.additional_properties = d
61        return plateau_get_topic_name_json_body
62
63    @property
64    def additional_keys(self) -> List[str]:
65        return list(self.additional_properties.keys())
66
67    def __getitem__(self, key: str) -> Any:
68        return self.additional_properties[key]
69
70    def __setitem__(self, key: str, value: Any) -> None:
71        self.additional_properties[key] = value
72
73    def __delitem__(self, key: str) -> None:
74        del self.additional_properties[key]
75
76    def __contains__(self, key: str) -> bool:
77        return key in self.additional_properties
@attr.s(auto_attribs=True)
class PlateauGetTopicNameJsonBody:
10@attr.s(auto_attribs=True)
11class PlateauGetTopicNameJsonBody:
12    """ Request for topic name.
13
14    Attributes:
15        workspace_id (Union[Unset, None, int]):  Workspace identifier.
16        pipeline_name (Union[Unset, None, str]):  Pipeline name.
17        pipeline_pk_id (Union[Unset, None, int]):  Internal pipeline identifier.
18    """
19
20    workspace_id: Union[Unset, None, int] = UNSET
21    pipeline_name: Union[Unset, None, str] = UNSET
22    pipeline_pk_id: Union[Unset, None, int] = UNSET
23    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
24
25
26    def to_dict(self) -> Dict[str, Any]:
27        workspace_id = self.workspace_id
28        pipeline_name = self.pipeline_name
29        pipeline_pk_id = self.pipeline_pk_id
30
31        field_dict: Dict[str, Any] = {}
32        field_dict.update(self.additional_properties)
33        field_dict.update({
34        })
35        if workspace_id is not UNSET:
36            field_dict["workspace_id"] = workspace_id
37        if pipeline_name is not UNSET:
38            field_dict["pipeline_name"] = pipeline_name
39        if pipeline_pk_id is not UNSET:
40            field_dict["pipeline_pk_id"] = pipeline_pk_id
41
42        return field_dict
43
44
45
46    @classmethod
47    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48        d = src_dict.copy()
49        workspace_id = d.pop("workspace_id", UNSET)
50
51        pipeline_name = d.pop("pipeline_name", UNSET)
52
53        pipeline_pk_id = d.pop("pipeline_pk_id", UNSET)
54
55        plateau_get_topic_name_json_body = cls(
56            workspace_id=workspace_id,
57            pipeline_name=pipeline_name,
58            pipeline_pk_id=pipeline_pk_id,
59        )
60
61        plateau_get_topic_name_json_body.additional_properties = d
62        return plateau_get_topic_name_json_body
63
64    @property
65    def additional_keys(self) -> List[str]:
66        return list(self.additional_properties.keys())
67
68    def __getitem__(self, key: str) -> Any:
69        return self.additional_properties[key]
70
71    def __setitem__(self, key: str, value: Any) -> None:
72        self.additional_properties[key] = value
73
74    def __delitem__(self, key: str) -> None:
75        del self.additional_properties[key]
76
77    def __contains__(self, key: str) -> bool:
78        return key in self.additional_properties

Request for topic name.

Attributes: workspace_id (Union[Unset, None, int]): Workspace identifier. pipeline_name (Union[Unset, None, str]): Pipeline name. pipeline_pk_id (Union[Unset, None, int]): Internal pipeline identifier.

PlateauGetTopicNameJsonBody( workspace_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, pipeline_name: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, pipeline_pk_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
2def __init__(self, workspace_id=attr_dict['workspace_id'].default, pipeline_name=attr_dict['pipeline_name'].default, pipeline_pk_id=attr_dict['pipeline_pk_id'].default):
3    self.workspace_id = workspace_id
4    self.pipeline_name = pipeline_name
5    self.pipeline_pk_id = pipeline_pk_id
6    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class PlateauGetTopicNameJsonBody.

def to_dict(self) -> Dict[str, Any]:
26    def to_dict(self) -> Dict[str, Any]:
27        workspace_id = self.workspace_id
28        pipeline_name = self.pipeline_name
29        pipeline_pk_id = self.pipeline_pk_id
30
31        field_dict: Dict[str, Any] = {}
32        field_dict.update(self.additional_properties)
33        field_dict.update({
34        })
35        if workspace_id is not UNSET:
36            field_dict["workspace_id"] = workspace_id
37        if pipeline_name is not UNSET:
38            field_dict["pipeline_name"] = pipeline_name
39        if pipeline_pk_id is not UNSET:
40            field_dict["pipeline_pk_id"] = pipeline_pk_id
41
42        return field_dict
@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
46    @classmethod
47    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
48        d = src_dict.copy()
49        workspace_id = d.pop("workspace_id", UNSET)
50
51        pipeline_name = d.pop("pipeline_name", UNSET)
52
53        pipeline_pk_id = d.pop("pipeline_pk_id", UNSET)
54
55        plateau_get_topic_name_json_body = cls(
56            workspace_id=workspace_id,
57            pipeline_name=pipeline_name,
58            pipeline_pk_id=pipeline_pk_id,
59        )
60
61        plateau_get_topic_name_json_body.additional_properties = d
62        return plateau_get_topic_name_json_body
additional_keys: List[str]