From b7a92a999782c601d03df4fa7f9d6648e07a1968 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 16 Apr 2018 18:48:16 +0000 Subject: [PATCH] Generated from f03560745b3d5ce46009cb8e9897bf4d6f397bf9 Set language non-required parameter --- .../operations/text_moderation_operations.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/text_moderation_operations.py b/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/text_moderation_operations.py index 597e20c7f554..01fba3932999 100644 --- a/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/text_moderation_operations.py +++ b/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/text_moderation_operations.py @@ -34,19 +34,19 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def screen_text( - self, language, text_content_type, text_content, autocorrect=False, pii=False, list_id=None, classify=False, custom_headers=None, raw=False, callback=None, **operation_config): + self, text_content_type, text_content, language=None, autocorrect=False, pii=False, list_id=None, classify=False, custom_headers=None, raw=False, callback=None, **operation_config): """Detect profanity and match against custom and shared blacklists. Detects profanity in more than 100 languages and match against custom and shared blacklists. - :param language: Language of the terms. - :type language: str :param text_content_type: The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' :type text_content_type: str :param text_content: Content to screen. :type text_content: Generator + :param language: Language of the text. + :type language: str :param autocorrect: Autocorrect text. :type autocorrect: bool :param pii: Detect personal identifiable information. @@ -80,7 +80,8 @@ def screen_text( # Construct parameters query_parameters = {} - query_parameters['language'] = self._serialize.query("language", language, 'str') + if language is not None: + query_parameters['language'] = self._serialize.query("language", language, 'str') if autocorrect is not None: query_parameters['autocorrect'] = self._serialize.query("autocorrect", autocorrect, 'bool') if pii is not None: