@@ -26,7 +26,8 @@ class SiteItem(object):
26
26
_tier_explorer_capacity : Optional [int ] = None
27
27
_tier_viewer_capacity : Optional [int ] = None
28
28
29
- def __str__ (self ):
29
+ # TODO should have a debug representation that just lists all the attributes?
30
+ def __repr__ (self ):
30
31
return (
31
32
"<"
32
33
+ __name__
@@ -98,6 +99,7 @@ def __init__(
98
99
time_zone = None ,
99
100
auto_suspend_refresh_enabled : bool = True ,
100
101
auto_suspend_refresh_inactivity_window : int = 30 ,
102
+ attribute_capture_enabled : bool = True ,
101
103
):
102
104
self ._admin_mode = None
103
105
self ._id : Optional [str ] = None
@@ -151,6 +153,7 @@ def __init__(
151
153
self .time_zone = time_zone
152
154
self .auto_suspend_refresh_enabled = auto_suspend_refresh_enabled
153
155
self .auto_suspend_refresh_inactivity_window = auto_suspend_refresh_inactivity_window
156
+ self .attribute_capture_enabled = attribute_capture_enabled
154
157
155
158
@property
156
159
def admin_mode (self ) -> Optional [str ]:
@@ -592,6 +595,14 @@ def auto_suspend_refresh_enabled(self) -> bool:
592
595
def auto_suspend_refresh_enabled (self , value : bool ):
593
596
self ._auto_suspend_refresh_enabled = value
594
597
598
+ @property
599
+ def attribute_capture_enabled (self ) -> bool :
600
+ return self ._attribute_capture_enabled
601
+
602
+ @attribute_capture_enabled .setter
603
+ def attribute_capture_enabled (self , value : bool ):
604
+ self ._attribute_capture_enabled = value
605
+
595
606
def replace_license_tiers_with_user_quota (self , value : int ) -> None :
596
607
self .tier_creator_capacity = None
597
608
self .tier_explorer_capacity = None
@@ -654,6 +665,7 @@ def _parse_common_tags(self, site_xml, ns):
654
665
time_zone ,
655
666
auto_suspend_refresh_enabled ,
656
667
auto_suspend_refresh_inactivity_window ,
668
+ attribute_capture_enabled ,
657
669
) = self ._parse_element (site_xml , ns )
658
670
659
671
self ._set_values (
@@ -708,6 +720,7 @@ def _parse_common_tags(self, site_xml, ns):
708
720
time_zone ,
709
721
auto_suspend_refresh_enabled ,
710
722
auto_suspend_refresh_inactivity_window ,
723
+ attribute_capture_enabled ,
711
724
)
712
725
return self
713
726
@@ -764,6 +777,7 @@ def _set_values(
764
777
time_zone ,
765
778
auto_suspend_refresh_enabled ,
766
779
auto_suspend_refresh_inactivity_window ,
780
+ attribute_capture_enabled ,
767
781
):
768
782
if id is not None :
769
783
self ._id = id
@@ -871,6 +885,8 @@ def _set_values(
871
885
self .auto_suspend_refresh_enabled = auto_suspend_refresh_enabled
872
886
if auto_suspend_refresh_inactivity_window is not None :
873
887
self .auto_suspend_refresh_inactivity_window = auto_suspend_refresh_inactivity_window
888
+ if attribute_capture_enabled is not None :
889
+ self .attribute_capture_enabled = attribute_capture_enabled
874
890
875
891
@classmethod
876
892
def from_response (cls , resp , ns ) -> List ["SiteItem" ]:
@@ -930,6 +946,7 @@ def from_response(cls, resp, ns) -> List["SiteItem"]:
930
946
time_zone ,
931
947
auto_suspend_refresh_enabled ,
932
948
auto_suspend_refresh_inactivity_window ,
949
+ attribute_capture_enabled ,
933
950
) = cls ._parse_element (site_xml , ns )
934
951
935
952
site_item = cls (name , content_url )
@@ -985,6 +1002,7 @@ def from_response(cls, resp, ns) -> List["SiteItem"]:
985
1002
time_zone ,
986
1003
auto_suspend_refresh_enabled ,
987
1004
auto_suspend_refresh_inactivity_window ,
1005
+ attribute_capture_enabled ,
988
1006
)
989
1007
all_site_items .append (site_item )
990
1008
return all_site_items
@@ -1066,6 +1084,7 @@ def _parse_element(site_xml, ns):
1066
1084
1067
1085
flows_enabled = string_to_bool (site_xml .get ("flowsEnabled" , "" ))
1068
1086
cataloging_enabled = string_to_bool (site_xml .get ("catalogingEnabled" , "" ))
1087
+ attribute_capture_enabled = string_to_bool (site_xml .get ("attributeCaptureEnabled" , "" ))
1069
1088
1070
1089
return (
1071
1090
id ,
@@ -1119,6 +1138,7 @@ def _parse_element(site_xml, ns):
1119
1138
time_zone ,
1120
1139
auto_suspend_refresh_enabled ,
1121
1140
auto_suspend_refresh_inactivity_window ,
1141
+ attribute_capture_enabled ,
1122
1142
)
1123
1143
1124
1144
0 commit comments