def url(self, name, data, data_type, **kwargs):
        """Serialize data intended for a URL path.

        :param data: The data to be serialized.
        :param str data_type: The type to be serialized from.
        :rtype: str
        :raises: TypeError if serialization fails.
        :raises: ValueError if data is None
        """
        try:
            output = self.serialize_data(data, data_type, **kwargs)
            if data_type == "bool":
                output = json.dumps(output)

            if kwargs.get("skip_quote") is True:
                output = str(output)
                # https://github.com/Azure/autorest.python/issues/2063
                output = output.replace("{", quote("{")).replace("}", quote("}"))
            else:
                output = quote(str(output), safe="")
        except SerializationError:
            raise TypeError("{} must be type {}.".format(name, data_type))
        else:
            return output
Serialize data intended for a URL path.

        :param data: The data to be serialized.
        :param str data_type: The type to be serialized from.
        :rtype: str
        :raises: TypeError if serialization fails.
        :raises: ValueError if data is None
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/monitor/ingestion/_serialization.py