Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param data_representation:
:type data_representation: str
:param value:
:type value: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides`.
:return: Image or ClientRawResponse if raw=true
:rtype: ~azure.cognitiveservices.vision.contentmoderator.models.Image
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`APIErrorException`
"""
image_url = models.BodyModel(data_representation=data_representation, value=value)
# Construct URL
url = self.add_image_url_input.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
'listId': self._serialize.url("list_id", list_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
if tag is not None:
query_parameters['tag'] = self._serialize.query("tag", tag, 'int')
if label is not None:
query_parameters['label'] = self._serialize.query("label", label, 'str')