public function setTravelMode($travelMode = null)
    {
        $travelModes = array_diff(TravelMode::getTravelModes(), array(TravelMode::TRANSIT));

        if (!in_array($travelMode, $travelModes) && ($travelMode !== null)) {
            throw DistanceMatrixException::invalidDistanceMatrixRequestTravelMode();
        }

        $this->travelMode = $travelMode;
    }