1414
1515
1616if TYPE_CHECKING :
17+ from datadog_api_client .v2 .model .monitor_notification_rule_conditional_recipients import (
18+ MonitorNotificationRuleConditionalRecipients ,
19+ )
1720 from datadog_api_client .v2 .model .monitor_notification_rule_filter import MonitorNotificationRuleFilter
1821 from datadog_api_client .v2 .model .monitor_notification_rule_filter_tags import MonitorNotificationRuleFilterTags
1922
@@ -36,15 +39,20 @@ def additional_properties_type(_):
3639
3740 @cached_property
3841 def openapi_types (_ ):
42+ from datadog_api_client .v2 .model .monitor_notification_rule_conditional_recipients import (
43+ MonitorNotificationRuleConditionalRecipients ,
44+ )
3945 from datadog_api_client .v2 .model .monitor_notification_rule_filter import MonitorNotificationRuleFilter
4046
4147 return {
48+ "conditional_recipients" : (MonitorNotificationRuleConditionalRecipients ,),
4249 "filter" : (MonitorNotificationRuleFilter ,),
4350 "name" : (str ,),
4451 "recipients" : ([str ],),
4552 }
4653
4754 attribute_map = {
55+ "conditional_recipients" : "conditional_recipients" ,
4856 "filter" : "filter" ,
4957 "name" : "name" ,
5058 "recipients" : "recipients" ,
@@ -53,25 +61,32 @@ def openapi_types(_):
5361 def __init__ (
5462 self_ ,
5563 name : str ,
56- recipients : List [ str ] ,
64+ conditional_recipients : Union [ MonitorNotificationRuleConditionalRecipients , UnsetType ] = unset ,
5765 filter : Union [MonitorNotificationRuleFilter , MonitorNotificationRuleFilterTags , UnsetType ] = unset ,
66+ recipients : Union [List [str ], UnsetType ] = unset ,
5867 ** kwargs ,
5968 ):
6069 """
6170 Attributes of the monitor notification rule.
6271
72+ :param conditional_recipients: Use conditional recipients to define different recipients for different situations.
73+ :type conditional_recipients: MonitorNotificationRuleConditionalRecipients, optional
74+
6375 :param filter: Filter used to associate the notification rule with monitors.
6476 :type filter: MonitorNotificationRuleFilter, optional
6577
6678 :param name: The name of the monitor notification rule.
6779 :type name: str
6880
6981 :param recipients: A list of recipients to notify. Uses the same format as the monitor ``message`` field. Must not start with an '@'.
70- :type recipients: [str]
82+ :type recipients: [str], optional
7183 """
84+ if conditional_recipients is not unset :
85+ kwargs ["conditional_recipients" ] = conditional_recipients
7286 if filter is not unset :
7387 kwargs ["filter" ] = filter
88+ if recipients is not unset :
89+ kwargs ["recipients" ] = recipients
7490 super ().__init__ (kwargs )
7591
7692 self_ .name = name
77- self_ .recipients = recipients
0 commit comments