time_operation_rule_data
Module for TimeOperationRuleData class
!!! classes TimeOperationRuleData
TimeOperationRuleData (RuleData)
Base class for rule data related to time operations
Source code in entities/time_operation_rule_data.py
class TimeOperationRuleData(RuleData):
"""Base class for rule data related to time operations"""
def __init__(
self,
name: str,
operation: TimeOperationType,
):
super().__init__(name)
self._operation = operation
self._percentile_value = 0
self._time_scale = "year"
@property
def operation(self) -> TimeOperationType:
"""Operation type"""
return self._operation
@property
def percentile_value(self) -> float:
"""Operation parameter"""
return self._percentile_value
@percentile_value.setter
def percentile_value(self, percentile_value: float):
self._percentile_value = percentile_value
@property
def time_scale(self) -> str:
"""Time scale type"""
return self._time_scale
@time_scale.setter
def time_scale(self, time_scale: str):
self._time_scale = time_scale
operation: TimeOperationType
property
readonly
Operation type
percentile_value: float
property
writable
Operation parameter
time_scale: str
property
writable
Time scale type