3030from groundlight_openapi_client .model .payload_template_request import PayloadTemplateRequest
3131from groundlight_openapi_client .model .rule_request import RuleRequest
3232from groundlight_openapi_client .model .status_enum import StatusEnum
33- from groundlight_openapi_client .model .verb_enum import VerbEnum
3433from groundlight_openapi_client .model .webhook_action_request import WebhookActionRequest
3534from model import (
3635 ROI ,
@@ -302,7 +301,7 @@ def create_alert( # pylint: disable=too-many-locals, too-many-arguments # noqa
302301 name = name ,
303302 enabled = enabled ,
304303 action = actions ,
305- condition = ConditionRequest (verb = VerbEnum ( condition .verb ) , parameters = condition .parameters ),
304+ condition = ConditionRequest (verb = condition .verb , parameters = condition .parameters ),
306305 snooze_time_enabled = snooze_time_enabled ,
307306 snooze_time_value = snooze_time_value ,
308307 snooze_time_unit = snooze_time_unit ,
@@ -318,7 +317,7 @@ def create_rule( # pylint: disable=too-many-locals # noqa: PLR0913
318317 channel : Union [str , ChannelEnum ],
319318 recipient : str ,
320319 * ,
321- alert_on : Union [ str , VerbEnum ] = "CHANGED_TO" ,
320+ alert_on : str = "CHANGED_TO" ,
322321 enabled : bool = True ,
323322 include_image : bool = False ,
324323 condition_parameters : Union [str , dict , None ] = None ,
@@ -393,8 +392,6 @@ def create_rule( # pylint: disable=too-many-locals # noqa: PLR0913
393392
394393 if condition_parameters is None :
395394 condition_parameters = {}
396- if isinstance (alert_on , str ):
397- alert_on = VerbEnum (alert_on .upper ())
398395 if isinstance (channel , str ):
399396 channel = ChannelEnum (channel .upper ())
400397 if isinstance (condition_parameters , str ):
@@ -839,7 +836,7 @@ def update_detector_escalation_type(self, detector: Union[str, Detector], escala
839836 raise ValueError ("escalation_type must be either 'STANDARD' or 'NO_HUMAN_LABELING'" )
840837 self .detectors_api .update_detector (
841838 detector ,
842- patched_detector_request = PatchedDetectorRequest (escalation_type = EscalationTypeEnum ( escalation_type ) ),
839+ patched_detector_request = PatchedDetectorRequest (escalation_type = escalation_type ),
843840 )
844841
845842 def create_counting_detector ( # noqa: PLR0913 # pylint: disable=too-many-arguments, too-many-locals
0 commit comments