@@ -84,7 +84,7 @@ def build_text_translation_get_supported_languages_request( # pylint: disable=n
84
84
85
85
def build_text_translation_translate_request (
86
86
* ,
87
- to : List [str ],
87
+ to_language : List [str ],
88
88
client_trace_id : Optional [str ] = None ,
89
89
from_language : Optional [str ] = None ,
90
90
text_type : Optional [Union [str , _models .TextType ]] = None ,
@@ -110,7 +110,7 @@ def build_text_translation_translate_request(
110
110
_url = "/translate"
111
111
112
112
# Construct parameters
113
- _params ["to" ] = [_SERIALIZER .query ("to " , q , "str" ) if q is not None else "" for q in to ]
113
+ _params ["to" ] = [_SERIALIZER .query ("to_language " , q , "str" ) if q is not None else "" for q in to_language ]
114
114
if from_language is not None :
115
115
_params ["from" ] = _SERIALIZER .query ("from_language" , from_language , "str" )
116
116
if text_type is not None :
@@ -209,7 +209,7 @@ def build_text_translation_find_sentence_boundaries_request( # pylint: disable=
209
209
210
210
211
211
def build_text_translation_lookup_dictionary_entries_request ( # pylint: disable=name-too-long
212
- * , from_language : str , to : str , client_trace_id : Optional [str ] = None , ** kwargs : Any
212
+ * , from_language : str , to_language : str , client_trace_id : Optional [str ] = None , ** kwargs : Any
213
213
) -> HttpRequest :
214
214
_headers = case_insensitive_dict (kwargs .pop ("headers" , {}) or {})
215
215
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
@@ -223,7 +223,7 @@ def build_text_translation_lookup_dictionary_entries_request( # pylint: disable
223
223
224
224
# Construct parameters
225
225
_params ["from" ] = _SERIALIZER .query ("from_language" , from_language , "str" )
226
- _params ["to" ] = _SERIALIZER .query ("to " , to , "str" )
226
+ _params ["to" ] = _SERIALIZER .query ("to_language " , to_language , "str" )
227
227
_params ["api-version" ] = _SERIALIZER .query ("api_version" , api_version , "str" )
228
228
229
229
# Construct headers
@@ -237,7 +237,7 @@ def build_text_translation_lookup_dictionary_entries_request( # pylint: disable
237
237
238
238
239
239
def build_text_translation_lookup_dictionary_examples_request ( # pylint: disable=name-too-long
240
- * , from_language : str , to : str , client_trace_id : Optional [str ] = None , ** kwargs : Any
240
+ * , from_language : str , to_language : str , client_trace_id : Optional [str ] = None , ** kwargs : Any
241
241
) -> HttpRequest :
242
242
_headers = case_insensitive_dict (kwargs .pop ("headers" , {}) or {})
243
243
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
@@ -251,7 +251,7 @@ def build_text_translation_lookup_dictionary_examples_request( # pylint: disabl
251
251
252
252
# Construct parameters
253
253
_params ["from" ] = _SERIALIZER .query ("from_language" , from_language , "str" )
254
- _params ["to" ] = _SERIALIZER .query ("to " , to , "str" )
254
+ _params ["to" ] = _SERIALIZER .query ("to_language " , to_language , "str" )
255
255
_params ["api-version" ] = _SERIALIZER .query ("api_version" , api_version , "str" )
256
256
257
257
# Construct headers
@@ -460,7 +460,7 @@ def translate(
460
460
self ,
461
461
body : List [_models .InputTextItem ],
462
462
* ,
463
- to : List [str ],
463
+ to_language : List [str ],
464
464
client_trace_id : Optional [str ] = None ,
465
465
from_language : Optional [str ] = None ,
466
466
text_type : Optional [Union [str , _models .TextType ]] = None ,
@@ -483,13 +483,13 @@ def translate(
483
483
484
484
:param body: Defines the content of the request. Required.
485
485
:type body: list[~azure.ai.translation.text.models.InputTextItem]
486
- :keyword to : Specifies the language of the output text. The target language must be one of the
487
- supported languages included
486
+ :keyword to_language : Specifies the language of the output text. The target language must be
487
+ one of the supported languages included
488
488
in the translation scope. For example, use to=de to translate to German.
489
489
It's possible to translate to multiple languages simultaneously by repeating the parameter in
490
490
the query string.
491
491
For example, use to=de&to=it to translate to German and Italian. Required.
492
- :paramtype to : list[str]
492
+ :paramtype to_language : list[str]
493
493
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
494
494
value is None.
495
495
:paramtype client_trace_id: str
@@ -636,7 +636,7 @@ def translate(
636
636
self ,
637
637
body : IO [bytes ],
638
638
* ,
639
- to : List [str ],
639
+ to_language : List [str ],
640
640
client_trace_id : Optional [str ] = None ,
641
641
from_language : Optional [str ] = None ,
642
642
text_type : Optional [Union [str , _models .TextType ]] = None ,
@@ -659,13 +659,13 @@ def translate(
659
659
660
660
:param body: Defines the content of the request. Required.
661
661
:type body: IO[bytes]
662
- :keyword to : Specifies the language of the output text. The target language must be one of the
663
- supported languages included
662
+ :keyword to_language : Specifies the language of the output text. The target language must be
663
+ one of the supported languages included
664
664
in the translation scope. For example, use to=de to translate to German.
665
665
It's possible to translate to multiple languages simultaneously by repeating the parameter in
666
666
the query string.
667
667
For example, use to=de&to=it to translate to German and Italian. Required.
668
- :paramtype to : list[str]
668
+ :paramtype to_language : list[str]
669
669
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
670
670
value is None.
671
671
:paramtype client_trace_id: str
@@ -805,7 +805,7 @@ def translate(
805
805
self ,
806
806
body : Union [List [_models .InputTextItem ], IO [bytes ]],
807
807
* ,
808
- to : List [str ],
808
+ to_language : List [str ],
809
809
client_trace_id : Optional [str ] = None ,
810
810
from_language : Optional [str ] = None ,
811
811
text_type : Optional [Union [str , _models .TextType ]] = None ,
@@ -828,13 +828,13 @@ def translate(
828
828
:param body: Defines the content of the request. Is either a [InputTextItem] type or a
829
829
IO[bytes] type. Required.
830
830
:type body: list[~azure.ai.translation.text.models.InputTextItem] or IO[bytes]
831
- :keyword to : Specifies the language of the output text. The target language must be one of the
832
- supported languages included
831
+ :keyword to_language : Specifies the language of the output text. The target language must be
832
+ one of the supported languages included
833
833
in the translation scope. For example, use to=de to translate to German.
834
834
It's possible to translate to multiple languages simultaneously by repeating the parameter in
835
835
the query string.
836
836
For example, use to=de&to=it to translate to German and Italian. Required.
837
- :paramtype to : list[str]
837
+ :paramtype to_language : list[str]
838
838
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
839
839
value is None.
840
840
:paramtype client_trace_id: str
@@ -987,7 +987,7 @@ def translate(
987
987
_content = json .dumps (body , cls = SdkJSONEncoder , exclude_readonly = True ) # type: ignore
988
988
989
989
_request = build_text_translation_translate_request (
990
- to = to ,
990
+ to_language = to_language ,
991
991
client_trace_id = client_trace_id ,
992
992
from_language = from_language ,
993
993
text_type = text_type ,
@@ -1515,7 +1515,7 @@ def lookup_dictionary_entries(
1515
1515
body : List [_models .InputTextItem ],
1516
1516
* ,
1517
1517
from_language : str ,
1518
- to : str ,
1518
+ to_language : str ,
1519
1519
client_trace_id : Optional [str ] = None ,
1520
1520
content_type : str = "application/json" ,
1521
1521
** kwargs : Any
@@ -1531,10 +1531,10 @@ def lookup_dictionary_entries(
1531
1531
The source language must be one of the supported languages included in the dictionary scope.
1532
1532
Required.
1533
1533
:paramtype from_language: str
1534
- :keyword to : Specifies the language of the output text.
1534
+ :keyword to_language : Specifies the language of the output text.
1535
1535
The target language must be one of the supported languages included in the dictionary scope.
1536
1536
Required.
1537
- :paramtype to : str
1537
+ :paramtype to_language : str
1538
1538
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
1539
1539
value is None.
1540
1540
:paramtype client_trace_id: str
@@ -1630,7 +1630,7 @@ def lookup_dictionary_entries(
1630
1630
body : IO [bytes ],
1631
1631
* ,
1632
1632
from_language : str ,
1633
- to : str ,
1633
+ to_language : str ,
1634
1634
client_trace_id : Optional [str ] = None ,
1635
1635
content_type : str = "application/json" ,
1636
1636
** kwargs : Any
@@ -1646,10 +1646,10 @@ def lookup_dictionary_entries(
1646
1646
The source language must be one of the supported languages included in the dictionary scope.
1647
1647
Required.
1648
1648
:paramtype from_language: str
1649
- :keyword to : Specifies the language of the output text.
1649
+ :keyword to_language : Specifies the language of the output text.
1650
1650
The target language must be one of the supported languages included in the dictionary scope.
1651
1651
Required.
1652
- :paramtype to : str
1652
+ :paramtype to_language : str
1653
1653
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
1654
1654
value is None.
1655
1655
:paramtype client_trace_id: str
@@ -1738,7 +1738,7 @@ def lookup_dictionary_entries(
1738
1738
body : Union [List [_models .InputTextItem ], IO [bytes ]],
1739
1739
* ,
1740
1740
from_language : str ,
1741
- to : str ,
1741
+ to_language : str ,
1742
1742
client_trace_id : Optional [str ] = None ,
1743
1743
** kwargs : Any
1744
1744
) -> List [_models .DictionaryLookupItem ]:
@@ -1754,10 +1754,10 @@ def lookup_dictionary_entries(
1754
1754
The source language must be one of the supported languages included in the dictionary scope.
1755
1755
Required.
1756
1756
:paramtype from_language: str
1757
- :keyword to : Specifies the language of the output text.
1757
+ :keyword to_language : Specifies the language of the output text.
1758
1758
The target language must be one of the supported languages included in the dictionary scope.
1759
1759
Required.
1760
- :paramtype to : str
1760
+ :paramtype to_language : str
1761
1761
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
1762
1762
value is None.
1763
1763
:paramtype client_trace_id: str
@@ -1859,7 +1859,7 @@ def lookup_dictionary_entries(
1859
1859
1860
1860
_request = build_text_translation_lookup_dictionary_entries_request (
1861
1861
from_language = from_language ,
1862
- to = to ,
1862
+ to_language = to_language ,
1863
1863
client_trace_id = client_trace_id ,
1864
1864
content_type = content_type ,
1865
1865
api_version = self ._config .api_version ,
@@ -1905,7 +1905,7 @@ def lookup_dictionary_examples(
1905
1905
body : List [_models .DictionaryExampleTextItem ],
1906
1906
* ,
1907
1907
from_language : str ,
1908
- to : str ,
1908
+ to_language : str ,
1909
1909
client_trace_id : Optional [str ] = None ,
1910
1910
content_type : str = "application/json" ,
1911
1911
** kwargs : Any
@@ -1921,10 +1921,10 @@ def lookup_dictionary_examples(
1921
1921
The source language must be one of the supported languages included in the dictionary scope.
1922
1922
Required.
1923
1923
:paramtype from_language: str
1924
- :keyword to : Specifies the language of the output text.
1924
+ :keyword to_language : Specifies the language of the output text.
1925
1925
The target language must be one of the supported languages included in the dictionary scope.
1926
1926
Required.
1927
- :paramtype to : str
1927
+ :paramtype to_language : str
1928
1928
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
1929
1929
value is None.
1930
1930
:paramtype client_trace_id: str
@@ -1992,7 +1992,7 @@ def lookup_dictionary_examples(
1992
1992
body : IO [bytes ],
1993
1993
* ,
1994
1994
from_language : str ,
1995
- to : str ,
1995
+ to_language : str ,
1996
1996
client_trace_id : Optional [str ] = None ,
1997
1997
content_type : str = "application/json" ,
1998
1998
** kwargs : Any
@@ -2008,10 +2008,10 @@ def lookup_dictionary_examples(
2008
2008
The source language must be one of the supported languages included in the dictionary scope.
2009
2009
Required.
2010
2010
:paramtype from_language: str
2011
- :keyword to : Specifies the language of the output text.
2011
+ :keyword to_language : Specifies the language of the output text.
2012
2012
The target language must be one of the supported languages included in the dictionary scope.
2013
2013
Required.
2014
- :paramtype to : str
2014
+ :paramtype to_language : str
2015
2015
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
2016
2016
value is None.
2017
2017
:paramtype client_trace_id: str
@@ -2067,7 +2067,7 @@ def lookup_dictionary_examples(
2067
2067
body : Union [List [_models .DictionaryExampleTextItem ], IO [bytes ]],
2068
2068
* ,
2069
2069
from_language : str ,
2070
- to : str ,
2070
+ to_language : str ,
2071
2071
client_trace_id : Optional [str ] = None ,
2072
2072
** kwargs : Any
2073
2073
) -> List [_models .DictionaryExampleItem ]:
@@ -2083,10 +2083,10 @@ def lookup_dictionary_examples(
2083
2083
The source language must be one of the supported languages included in the dictionary scope.
2084
2084
Required.
2085
2085
:paramtype from_language: str
2086
- :keyword to : Specifies the language of the output text.
2086
+ :keyword to_language : Specifies the language of the output text.
2087
2087
The target language must be one of the supported languages included in the dictionary scope.
2088
2088
Required.
2089
- :paramtype to : str
2089
+ :paramtype to_language : str
2090
2090
:keyword client_trace_id: A client-generated GUID to uniquely identify the request. Default
2091
2091
value is None.
2092
2092
:paramtype client_trace_id: str
@@ -2155,7 +2155,7 @@ def lookup_dictionary_examples(
2155
2155
2156
2156
_request = build_text_translation_lookup_dictionary_examples_request (
2157
2157
from_language = from_language ,
2158
- to = to ,
2158
+ to_language = to_language ,
2159
2159
client_trace_id = client_trace_id ,
2160
2160
content_type = content_type ,
2161
2161
api_version = self ._config .api_version ,
0 commit comments