ADT
psengine.detection.detection_rule
¶
DetectionRule
¶
Bases: RFBaseModel
Detection rule model to validate output of the /search
endpoint.
This class supports hashing, equality comparison, string representation, and total
ordering of DetectionRule
instances.
Hashing
Returns a hash value based on id_
and the updated timestamp.
Equality
Checks equality between two DetectionRule
instances based on id_
and updated time.
Greater-than Comparison
Defines a greater-than comparison between two DetectionRule
instances based on
the updated timestamp and id_
.
String Representation
Returns a string representation of the DetectionRule
instance including id_
,
created timestamp, updated timestamp, and title.
Total ordering
The ordering of DetectionRule
instances is determined primarily by the updated timestamp.
If two instances have the same updated timestamp, id_
is used as a secondary criterion.
model_config
class-attribute
instance-attribute
¶
__eq__
¶
__eq__(other: DetectionRule)
__gt__
¶
__gt__(other: DetectionRule)
__hash__
¶
__str__
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|
Source code in psengine/common_models.py
DetectionRuleSearchOut
¶
Bases: RFBaseModel
Model to validate /search
endpoint payload sent.
filter_
class-attribute
instance-attribute
¶
filter_: Optional[SearchFilter] = Field(
alias='filter', default={}
)
model_config
class-attribute
instance-attribute
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
PARAMETER | DESCRIPTION |
---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|