1
+ # pylint: disable=line-too-long,useless-suppression
1
2
# coding=utf-8
2
3
# --------------------------------------------------------------------------
3
4
# Copyright (c) Microsoft Corporation. All rights reserved.
4
5
# Licensed under the MIT License. See License.txt in the project root for license information.
5
6
# Code generated by Microsoft (R) Python Code Generator.
6
7
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8
# --------------------------------------------------------------------------
8
- try :
9
- from collections .abc import MutableMapping
10
- except ImportError :
11
- from collections import MutableMapping # pylint: disable=deprecated-class
9
+ from collections .abc import MutableMapping
12
10
from io import IOBase
13
11
import json
14
12
from typing import Any , Callable , Dict , IO , Iterator , List , Optional , TypeVar , Union , cast , overload
@@ -429,7 +427,7 @@ def begin_infer_from_custom_model_id(
429
427
content_type : str = "application/json" ,
430
428
id : Optional [List [str ]] = None ,
431
429
** kwargs : Any ,
432
- ) -> LROPoller [_models .RadiologyInsightsInferenceResult ]:
430
+ ) -> LROPoller [_models .RadiologyInsightsCustomInferenceResponse ]:
433
431
"""Infer radiology insights using a custom model.
434
432
435
433
:keyword inference_data: Contains the list of patients, and configuration data. Required.
@@ -440,46 +438,46 @@ def begin_infer_from_custom_model_id(
440
438
:keyword id: Models to be used for inference. If this is not specified, the model will use the
441
439
default model for inference. Default value is None.
442
440
:paramtype id: list[str]
443
- :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult . The
444
- RadiologyInsightsInferenceResult is compatible with MutableMapping
441
+ :return: An instance of LROPoller that returns RadiologyInsightsCustomInferenceResponse . The
442
+ RadiologyInsightsCustomInferenceResponse is compatible with MutableMapping
445
443
:rtype:
446
- ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult ]
444
+ ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsCustomInferenceResponse ]
447
445
:raises ~azure.core.exceptions.HttpResponseError:
448
446
"""
449
447
450
448
@overload
451
449
def begin_infer_from_custom_model_id (
452
450
self , body : JSON , * , content_type : str = "application/json" , ** kwargs : Any
453
- ) -> LROPoller [_models .RadiologyInsightsInferenceResult ]:
451
+ ) -> LROPoller [_models .RadiologyInsightsCustomInferenceResponse ]:
454
452
"""Infer radiology insights using a custom model.
455
453
456
454
:param body: Required.
457
455
:type body: JSON
458
456
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
459
457
Default value is "application/json".
460
458
:paramtype content_type: str
461
- :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult . The
462
- RadiologyInsightsInferenceResult is compatible with MutableMapping
459
+ :return: An instance of LROPoller that returns RadiologyInsightsCustomInferenceResponse . The
460
+ RadiologyInsightsCustomInferenceResponse is compatible with MutableMapping
463
461
:rtype:
464
- ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult ]
462
+ ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsCustomInferenceResponse ]
465
463
:raises ~azure.core.exceptions.HttpResponseError:
466
464
"""
467
465
468
466
@overload
469
467
def begin_infer_from_custom_model_id (
470
468
self , body : IO [bytes ], * , content_type : str = "application/json" , ** kwargs : Any
471
- ) -> LROPoller [_models .RadiologyInsightsInferenceResult ]:
469
+ ) -> LROPoller [_models .RadiologyInsightsCustomInferenceResponse ]:
472
470
"""Infer radiology insights using a custom model.
473
471
474
472
:param body: Required.
475
473
:type body: IO[bytes]
476
474
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
477
475
Default value is "application/json".
478
476
:paramtype content_type: str
479
- :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult . The
480
- RadiologyInsightsInferenceResult is compatible with MutableMapping
477
+ :return: An instance of LROPoller that returns RadiologyInsightsCustomInferenceResponse . The
478
+ RadiologyInsightsCustomInferenceResponse is compatible with MutableMapping
481
479
:rtype:
482
- ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult ]
480
+ ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsCustomInferenceResponse ]
483
481
:raises ~azure.core.exceptions.HttpResponseError:
484
482
"""
485
483
@@ -491,7 +489,7 @@ def begin_infer_from_custom_model_id(
491
489
inference_data : _models .RadiologyInsightsData = _Unset ,
492
490
id : Optional [List [str ]] = None ,
493
491
** kwargs : Any ,
494
- ) -> LROPoller [_models .RadiologyInsightsInferenceResult ]:
492
+ ) -> LROPoller [_models .RadiologyInsightsCustomInferenceResponse ]:
495
493
"""Infer radiology insights using a custom model.
496
494
497
495
:param body: Is either a JSON type or a IO[bytes] type. Required.
@@ -501,17 +499,17 @@ def begin_infer_from_custom_model_id(
501
499
:keyword id: Models to be used for inference. If this is not specified, the model will use the
502
500
default model for inference. Default value is None.
503
501
:paramtype id: list[str]
504
- :return: An instance of LROPoller that returns RadiologyInsightsInferenceResult . The
505
- RadiologyInsightsInferenceResult is compatible with MutableMapping
502
+ :return: An instance of LROPoller that returns RadiologyInsightsCustomInferenceResponse . The
503
+ RadiologyInsightsCustomInferenceResponse is compatible with MutableMapping
506
504
:rtype:
507
- ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsInferenceResult ]
505
+ ~azure.core.polling.LROPoller[~azure.healthinsights.radiologyinsights.models.RadiologyInsightsCustomInferenceResponse ]
508
506
:raises ~azure.core.exceptions.HttpResponseError:
509
507
"""
510
508
_headers = case_insensitive_dict (kwargs .pop ("headers" , {}) or {})
511
509
_params = kwargs .pop ("params" , {}) or {}
512
510
513
511
content_type : Optional [str ] = kwargs .pop ("content_type" , _headers .pop ("Content-Type" , None ))
514
- cls : ClsType [_models .RadiologyInsightsInferenceResult ] = kwargs .pop ("cls" , None )
512
+ cls : ClsType [_models .RadiologyInsightsCustomInferenceResponse ] = kwargs .pop ("cls" , None )
515
513
polling : Union [bool , PollingMethod ] = kwargs .pop ("polling" , True )
516
514
lro_delay = kwargs .pop ("polling_interval" , self ._config .polling_interval )
517
515
cont_token : Optional [str ] = kwargs .pop ("continuation_token" , None )
@@ -536,7 +534,9 @@ def get_long_running_output(pipeline_response):
536
534
"str" , response .headers .get ("Operation-Location" )
537
535
)
538
536
539
- deserialized = _deserialize (_models .RadiologyInsightsInferenceResult , response .json ().get ("result" , {}))
537
+ deserialized = _deserialize (
538
+ _models .RadiologyInsightsCustomInferenceResponse , response .json ().get ("result" , {})
539
+ )
540
540
if cls :
541
541
return cls (pipeline_response , deserialized , response_headers ) # type: ignore
542
542
return deserialized
@@ -554,12 +554,12 @@ def get_long_running_output(pipeline_response):
554
554
else :
555
555
polling_method = polling
556
556
if cont_token :
557
- return LROPoller [_models .RadiologyInsightsInferenceResult ].from_continuation_token (
557
+ return LROPoller [_models .RadiologyInsightsCustomInferenceResponse ].from_continuation_token (
558
558
polling_method = polling_method ,
559
559
continuation_token = cont_token ,
560
560
client = self ._client ,
561
561
deserialization_callback = get_long_running_output ,
562
562
)
563
- return LROPoller [_models .RadiologyInsightsInferenceResult ](
563
+ return LROPoller [_models .RadiologyInsightsCustomInferenceResponse ](
564
564
self ._client , raw_result , get_long_running_output , polling_method # type: ignore
565
565
)
0 commit comments