11import copy
22import datetime
33import xml .etree .ElementTree as ET
4- from typing import Optional
4+ from typing import Iterable , Optional
55
66from defusedxml .ElementTree import fromstring
77
1515
1616
1717class FlowItem :
18+ """
19+ Represents a Tableau Flow item.
20+
21+ Parameters
22+ ----------
23+ project_id: str
24+ The ID of the project that the flow belongs to.
25+
26+ name: Optional[str]
27+ The name of the flow.
28+
29+ Attributes
30+ ----------
31+ connections: Iterable[ConnectionItem]
32+ The connections associated with the flow. This property is not populated
33+ by default and must be populated by calling the `populate_connections`
34+ method.
35+
36+ created_at: Optional[datetime.datetime]
37+ The date and time when the flow was created.
38+
39+ description: Optional[str]
40+ The description of the flow.
41+
42+ dqws: Iterable[DQWItem]
43+ The data quality warnings associated with the flow. This property is not
44+ populated by default and must be populated by calling the `populate_dqws`
45+ method.
46+
47+ id: Optional[str]
48+ The ID of the flow.
49+
50+ name: Optional[str]
51+ The name of the flow.
52+
53+ owner_id: Optional[str]
54+ The ID of the user who owns the flow.
55+
56+ project_name: Optional[str]
57+ The name of the project that the flow belongs to.
58+
59+ tags: set[str]
60+ The tags associated with the flow.
61+ """
62+
1863 def __repr__ (self ):
1964 return "<Flow {} '{}' ({}) Project={} createdAt={}" .format (
2065 self ._id , self .name , self .description , self .project_id , self .created_at
@@ -33,9 +78,9 @@ def __init__(self, project_id: str, name: Optional[str] = None) -> None:
3378 self .tags : set [str ] = set ()
3479 self .description : Optional [str ] = None
3580
36- self ._connections : Optional [ConnectionItem ] = None
37- self ._permissions : Optional [Permission ] = None
38- self ._data_quality_warnings : Optional [DQWItem ] = None
81+ self ._connections : Optional [Iterable [ ConnectionItem ] ] = None
82+ self ._permissions : Optional [Iterable [ Permission ] ] = None
83+ self ._data_quality_warnings : Optional [Iterable [ DQWItem ] ] = None
3984
4085 @property
4186 def connections (self ):
0 commit comments