Artificial Intelligence-based Cybersecurity for Connected and Automated Vehicles