def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_bool_value("isDefaultRecipientsEnabled", self.is_default_recipients_enabled)
        writer.write_str_value("notificationLevel", self.notification_level)
        writer.write_collection_of_primitive_values("notificationRecipients", self.notification_recipients)
        writer.write_str_value("notificationType", self.notification_type)
        writer.write_str_value("recipientType", self.recipient_type)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/unified_role_management_policy_notification_rule.py