|
13 | 13 | import warnings |
14 | 14 |
|
15 | 15 | # FIXME: have to manually reconfigure import path for multiapi operation mixin |
16 | | -from ..._async_lro import AnalyzeHealthcareEntitiesAsyncLROPoller, AnalyzeHealthcareEntitiesAsyncLROPollingMethod |
17 | | -from ..._async_lro import AsyncAnalyzeBatchActionsLROPoller, AsyncAnalyzeBatchActionsLROPollingMethod |
| 16 | +from ..._async_lro import AnalyzeHealthcareEntitiesAsyncLROPoller, AnalyzeHealthcareEntitiesAsyncLROPollingMethod, AsyncAnalyzeBatchActionsLROPoller, AsyncAnalyzeBatchActionsLROPollingMethod |
18 | 17 | from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error |
19 | 18 | from azure.core.pipeline import PipelineResponse |
20 | 19 | from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest |
@@ -57,6 +56,8 @@ async def analyze_status( |
57 | 56 | api_version = self._get_api_version('analyze_status') |
58 | 57 | if api_version == 'v3.1-preview.3': |
59 | 58 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 59 | + elif api_version == 'v3.1-preview.4': |
| 60 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
60 | 61 | else: |
61 | 62 | raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) |
62 | 63 | mixin_instance = OperationClass() |
@@ -86,12 +87,14 @@ async def begin_analyze( |
86 | 87 | :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod |
87 | 88 | :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. |
88 | 89 | :return: An instance of AsyncAnalyzeBatchActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) |
89 | | - :rtype: ~...._async_lro.AsyncAnalyzeBatchActionsLROPoller[~azure.ai.textanalytics.v3_1_preview_3.models.AnalyzeJobState] |
| 90 | + :rtype: ~....._async_lro.AsyncAnalyzeBatchActionsLROPoller[~azure.ai.textanalytics.v3_1_preview_3.models.AnalyzeJobState] |
90 | 91 | :raises ~azure.core.exceptions.HttpResponseError: |
91 | 92 | """ |
92 | 93 | api_version = self._get_api_version('begin_analyze') |
93 | 94 | if api_version == 'v3.1-preview.3': |
94 | 95 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 96 | + elif api_version == 'v3.1-preview.4': |
| 97 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
95 | 98 | else: |
96 | 99 | raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) |
97 | 100 | mixin_instance = OperationClass() |
@@ -126,6 +129,8 @@ async def begin_cancel_health_job( |
126 | 129 | api_version = self._get_api_version('begin_cancel_health_job') |
127 | 130 | if api_version == 'v3.1-preview.3': |
128 | 131 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 132 | + elif api_version == 'v3.1-preview.4': |
| 133 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
129 | 134 | else: |
130 | 135 | raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) |
131 | 136 | mixin_instance = OperationClass() |
@@ -170,6 +175,8 @@ async def begin_health( |
170 | 175 | api_version = self._get_api_version('begin_health') |
171 | 176 | if api_version == 'v3.1-preview.3': |
172 | 177 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 178 | + elif api_version == 'v3.1-preview.4': |
| 179 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
173 | 180 | else: |
174 | 181 | raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) |
175 | 182 | mixin_instance = OperationClass() |
@@ -211,6 +218,8 @@ async def entities_linking( |
211 | 218 | from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
212 | 219 | elif api_version == 'v3.1-preview.3': |
213 | 220 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 221 | + elif api_version == 'v3.1-preview.4': |
| 222 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
214 | 223 | else: |
215 | 224 | raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) |
216 | 225 | mixin_instance = OperationClass() |
@@ -253,6 +262,8 @@ async def entities_recognition_general( |
253 | 262 | from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
254 | 263 | elif api_version == 'v3.1-preview.3': |
255 | 264 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 265 | + elif api_version == 'v3.1-preview.4': |
| 266 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
256 | 267 | else: |
257 | 268 | raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) |
258 | 269 | mixin_instance = OperationClass() |
@@ -303,6 +314,8 @@ async def entities_recognition_pii( |
303 | 314 | api_version = self._get_api_version('entities_recognition_pii') |
304 | 315 | if api_version == 'v3.1-preview.3': |
305 | 316 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 317 | + elif api_version == 'v3.1-preview.4': |
| 318 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
306 | 319 | else: |
307 | 320 | raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) |
308 | 321 | mixin_instance = OperationClass() |
@@ -344,6 +357,8 @@ async def health_status( |
344 | 357 | api_version = self._get_api_version('health_status') |
345 | 358 | if api_version == 'v3.1-preview.3': |
346 | 359 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 360 | + elif api_version == 'v3.1-preview.4': |
| 361 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
347 | 362 | else: |
348 | 363 | raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) |
349 | 364 | mixin_instance = OperationClass() |
@@ -385,6 +400,8 @@ async def key_phrases( |
385 | 400 | from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
386 | 401 | elif api_version == 'v3.1-preview.3': |
387 | 402 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 403 | + elif api_version == 'v3.1-preview.4': |
| 404 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
388 | 405 | else: |
389 | 406 | raise ValueError("API version {} does not have operation 'key_phrases'".format(api_version)) |
390 | 407 | mixin_instance = OperationClass() |
@@ -427,6 +444,8 @@ async def languages( |
427 | 444 | from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
428 | 445 | elif api_version == 'v3.1-preview.3': |
429 | 446 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 447 | + elif api_version == 'v3.1-preview.4': |
| 448 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
430 | 449 | else: |
431 | 450 | raise ValueError("API version {} does not have operation 'languages'".format(api_version)) |
432 | 451 | mixin_instance = OperationClass() |
@@ -469,6 +488,8 @@ async def sentiment( |
469 | 488 | from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
470 | 489 | elif api_version == 'v3.1-preview.3': |
471 | 490 | from ..v3_1_preview_3.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
| 491 | + elif api_version == 'v3.1-preview.4': |
| 492 | + from ..v3_1_preview_4.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass |
472 | 493 | else: |
473 | 494 | raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) |
474 | 495 | mixin_instance = OperationClass() |
|
0 commit comments