class HostConditionsSchema(Schema): host_folder = ReqString(default="", example="servers/groupA") host_labels = ReqDict(default={}, example={"db": "mssql"}) host_tags = ReqDict(default={}, example={}) host_choice = ReqNested(BIHostChoice, default={"type": "all_hosts"}, example={"type": "all_hosts"})
class ServiceConditionsSchema(HostConditionsSchema): service_regex = ReqString(default="", example="Filesystem.*") service_labels = ReqDict(default={}, example={"db": "mssql"})
class BIRulePropertiesSchema(Schema): title = ReqString(dump_default="", example="Rule title") comment = ReqString(dump_default="", example="Rule comment") docu_url = ReqString(dump_default="", example="Rule documentation") icon = ReqString(dump_default="", example="icon1.png") state_messages = ReqDict(dump_default={}, example={})