Segment
Module superwise.models.segment
This module implement Segment model
Classes
Segment(id: int = None, project_id: int = None, name: str = None, status: superwise.resources.superwise_enums.SegmentStatus = None, definition: Optional[List[List[superwise.models.segment.SegmentConditionDefinition]]] = None, definition_json: str = None, created_at: datetime.datetime = None, created_by: str = None, archived_at: datetime.datetime = None, **kwargs)
Segment model class
Description:
Constructor of Segment model class
Args:
id
: id of segment
name
: name of segment (string)
status
: status of the model
definition
: definition of the query: list of list SegmentConditionDefinition or the condition in the
inner list will have OR operator between them and all the inner list will have AND operator between them
definition_query
:
created_at
: the creation time of the segment
created_by
: the user created the segment
archived_at
: the archive time of the segment if exists
Ancestors (in MRO)
- superwise.models.base.BaseModel
SegmentConditionDefinition(entity_id: int, condition: superwise.resources.superwise_enums.SegmentCondition, value: Union[List[str], List[float], List[bool], float, bool, str])
Methods
to_dict(self)