Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param application: Optional. Specifies the name of application using
the endpoint.
:type application: 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: ImagePrediction or ClientRawResponse if raw=true
:rtype:
~azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`CustomVisionErrorException`
"""
image_url = models.ImageUrl(url=url)
# Construct URL
url = self.classify_image_url.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
'projectId': self._serialize.url("project_id", project_id, 'str'),
'publishedName': self._serialize.url("published_name", published_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
if application is not None:
query_parameters['application'] = self._serialize.query("application", application, 'str')
# Construct headers
:param application: Optional. Specifies the name of application using
the endpoint.
:type application: 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: ImagePrediction or ClientRawResponse if raw=true
:rtype:
~azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`CustomVisionErrorException`
"""
image_url = models.ImageUrl(url=url)
# Construct URL
url = self.classify_image_url_with_no_store.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
'projectId': self._serialize.url("project_id", project_id, 'str'),
'publishedName': self._serialize.url("published_name", published_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
if application is not None:
query_parameters['application'] = self._serialize.query("application", application, 'str')
# Construct headers
:param application: Optional. Specifies the name of application using
the endpoint.
:type application: 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: ImagePrediction or ClientRawResponse if raw=true
:rtype:
~azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`CustomVisionErrorException`
"""
image_url = models.ImageUrl(url=url)
# Construct URL
url = self.detect_image_url.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
'projectId': self._serialize.url("project_id", project_id, 'str'),
'publishedName': self._serialize.url("published_name", published_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
if application is not None:
query_parameters['application'] = self._serialize.query("application", application, 'str')
# Construct headers
:param application: Optional. Specifies the name of application using
the endpoint.
:type application: 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: ImagePrediction or ClientRawResponse if raw=true
:rtype:
~azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`CustomVisionErrorException`
"""
image_url = models.ImageUrl(url=url)
# Construct URL
url = self.detect_image_url_with_no_store.metadata['url']
path_format_arguments = {
'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
'projectId': self._serialize.url("project_id", project_id, 'str'),
'publishedName': self._serialize.url("published_name", published_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
if application is not None:
query_parameters['application'] = self._serialize.query("application", application, 'str')
# Construct headers